Search Results for 'bbpress'
-
Search Results
-
Hey guys,
I am putting up a topic to show how I have created the layout on http://teamoverpowered.com/forums/
My aim when creating the theme was to try and create a last poster block that would work throughout the forums and sub forums list.
custom_bbp_list_forums – this function creates the sub forums under the main forum
public function custom_bbp_list_forums( $args = '' ) { // Define used variables $output = $sub_forums = $topic_count = $reply_count = $counts = ''; $i = 0; $count = array(); // Defaults and arguments $defaults = array ( 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'count_before' => ' (', 'count_after' => ')', 'count_sep' => ', ', 'separator' => ', ', 'forum_id' => '', 'show_topic_count' => true, 'show_reply_count' => true, 'show_freshness_link' => true, ); $r = bbp_parse_args( $args, $defaults, 'list_forums' ); extract( $r, EXTR_SKIP ); // Bail if there are no subforums if ( !bbp_get_forum_subforum_count( $forum_id ) ) return; // Loop through forums and create a list $sub_forums = bbp_forum_get_subforums( $forum_id ); if ( !empty( $sub_forums ) ) { // Total count (for separator) $total_subs = count( $sub_forums ); foreach ( $sub_forums as $sub_forum ) { $i++; // Separator count // Get forum details $count = array(); $show_sep = $total_subs > $i ? $separator : ''; $permalink = bbp_get_forum_permalink( $sub_forum->ID ); $title = bbp_get_forum_title( $sub_forum->ID ); // Show topic count if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) ) { $count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID ); } // Show reply count if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) ) { $count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID ); } // Counts to show if ( !empty( $count ) ) { $counts = $count_before . implode( $count_sep, $count ) . $count_after; } if ( !empty( $show_freshness_link ) ) { $freshness_link = "" . BBP_Default::teamop_get_last_poster_block( $sub_forum->ID ) . ""; } // Build this sub forums link if ($i % 2) { $class = "odd-forum-row"; } else { $class = "even-forum-row"; } $output .= "" . $link_before . '<a href="' . $permalink . '">' . $title . '</a>' . $counts . $freshness_link . $link_after . ""; } // Output the list echo apply_filters( 'bbp_list_forums', $before . $output . $after, $args ); } }I then call that function inside loop-single-forum.php like so:
BBP_Default::custom_bbp_list_forums( array ( 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'count_before' => 'Topics: ', 'count_after' => '', 'count_sep' => 'Posts: ', 'separator' => '', 'forum_id' => '', 'show_topic_count' => true, 'show_reply_count' => true, 'show_freshness_link' => true, ));Inside the first function I am also calling a second custom function called custom_get_last_poster_block
function custom_get_last_poster_block( $subforum_id = "" ) { if ( !empty( $subforum_id ) ) { $output = ""; $output .= "<a href='". bbp_get_forum_last_topic_permalink( $subforum_id ) ."'>" . bbp_get_topic_last_reply_title( bbp_get_forum_last_active_id( $subforum_id ) ) . "</a>"; $output .= ""; $output .= "by "; $output .= bbp_get_author_link( array( "post_id" => $subforum_id, "size" => 14 ) ); $output .= ""; $output .= ""; $output .= bbp_get_forum_last_active_time( $subforum_id ); $output .= ""; } else { $output = ""; $output .= "<a href='". bbp_get_forum_last_topic_permalink() ."'>" . bbp_get_topic_last_reply_title( bbp_get_forum_last_active_id() ) . "</a>"; $output .= ""; $output .= "by "; $output .= bbp_get_author_link( array( "post_id" => bbp_get_forum_last_active_id(), "size" => 14 ) ); $output .= ""; $output .= ""; $output .= bbp_get_forum_last_active_time( bbp_get_forum_last_active_id() ); $output .= ""; } return $output; }This then creates my sub forum list, I added some extra classes in I can hook onto and display:none if need. I decided when creating me theme that I would get as much information showing as possible, then just use CSS to customise it.
The final functions is one I call inside loop-single-topic.php.
public function custom_get_last_poster_block_topics() { $output .= ""; $output .= bbp_get_author_link( array( "post_id" => bbp_get_forum_last_active_id(), "size" => 14 ) ); $output .= ""; $output .= ""; $output .= bbp_get_topic_last_active_time( bbp_get_topic_last_active_id() ); $output .= ""; return $output; }This is my final function and it just adds the last poster block inside the topics list.
If you need any more help then let me know.
UPDATE: Please see the following topic for updated code
I have created a bbPress starter theme with a phpBB look and feel
Topic: Slow down; you move too fast
Hi,
Ever since updating to the latest bbpress plugin when users or admins try to post a new topic or reply to a topic we get the error “Slow down; you move too fast.” I’ve looked at other posts on this forum having the same issue but did not find anything that helped me.
Also this problem happens any time anyone posts. It is not the result of someone trying to post too much too quickly. Throttle time is set for 10 seconds. And when I try to change the throttle time it reverts back to 10 seconds. Maybe that’s a clue as to what the problem is?
Just to sum up:
The issue exists for all users and admins.
The issue happens for all posts – a person cannot be throttled because they haven’t succeeded in making one post.
The problem happened only after updating bbpress but not before.Thanks in advance for your help.
Rodney
How can i get the same editor to work in Buddypress 1.5.6 group forums? I know about an editor for text comments. But I’m using Disqus for comments. Would the text for comments editor interfere with the fancy text editor in bbpress forums and disqus comments? It’s not really a big deal,but it would be nice to know and absolutely make my day. Hopefully this can become a new feature in the future.
Havent found definitive answers anywhere since most everyone who has tried to install a bbPress theme to a current version of the bbPress plugin for WP has discovered that the stock instructions on the bbPress.org wiki and elsewhere are outdated/wrong. If you are not using stock TwentyTen as your parent theme, bbPress theming is broken out of the box – you get a theme broken/not installed message from your admin panel.
When bbPress thusly reverts to its stock look it’s ugly, unusable, and broken. Currently my forums at txmma.com/forum do not work properly as a result. when you drill down and actually try to read a topic you cannot. no content comes up. That’s outside of the fact that aesthetically there’s nothing there you would want to use.
I was wondering if anyone has successfully installed a third party bbPress theme or rolled their own, with the plugin version of bbPress, when using a custom WordPress theme (i.e. not TwentyTen).
Copying the theme files as directed in the bbPress.org instructions is useless as many have discovered.
Any advice appreciated. Thanks.
thus ending the functions before the bbPress functions came in.