Search Results for 'code'
-
Search Results
-
Topic: How to get a list of forums
I just want a simple list. I tried
$forums = get_posts( array( ‘post_type’ => bbp_get_forum_post_type(), ‘numberposts’ => 99 ) );
But that does not return private posts. (Digging into get_posts is a huge maze of code.)I was hoping just to use the Admin All Forums code as a guide, but I cannot find it! What in BB Press generates that form?
Thanks,
Anthony
Topic: Import forums Issue (Phpbb)
I tried to import Phpbb forum to bbpress, with the import tool :
http://codex.bbpress.org/import-forums/
I disable Forums and start the process, and i have this :
“Repair any missing information: Continue
Conversion Complete
No replies to convert
No tags to convert
No topics to convert
No forum parents to convert
No forums to convert
No passwords to clear
No users to convert
Starting Conversion
”My informations :
– phpBB
– Port : 3306
– Name BDD : The name in my wp-config (i use the same base for forum and a wordpress installation)
– Name user BDD : The user in my wp-config
– Pass : The Pass in my wp-config
– Prefix : PhpBB3
and Start.
I show all the informations many times and they are all right… I don’t understand where is the problem.
Thanks for your responses
Hi guys I am trying to list the 3 freshest bbpress topics from a specific forum. How Can I do that?
This is my code for displaying latest 3 topics from bbpress (not specific forum):
get_results("SELECT post_title, guid, post_date, post_type, post_modified, post_type from wp_posts where post_type LIKE 'topic' && post_type LIKE 'topic' ORDER by post_date DESC limit 3","ARRAY_N"); if ($forumslist) { foreach ($forumslist as $row) { echo '<li><a href="'.$row[1].'" rel="nofollow">'.$row[0].'</a>'.date('F d, Y', strtotime($row[2])).'</li>'; } } else echo 'Error fetching data'; ?>Now I would like to get the most fresh topics under a certain parent. So I know I can do something like:
$forumslist1 = $wpdb->get_results("SELECT post_title, guid, post_date, post_modified, post_type, post_parent from wp_posts where post_type LIKE 'topic' && post_parent LIKE '1263' ORDER by post_modified DESC limit 3","ARRAY_N");but how can I order those by freshness? You can see I tried to order them by post_modified but I didnt have luck there…
So I need to know how to get the freshest topics…
Thanks,
Mario