Search Results for 'bbpress'
-
Search Results
-
The front page topics plugin was driving me crazy because I really did want to have a different number of topics for the front page, forum pages, view pages, while leaving the posts per topic page alone and not have to hack the core.
But there is a huge flaw in the fundamental design in that if you force bbpress to see a different number of topics-per-page, it will calculate the last post page entirely wrong, based on the page IT’S ON, vs the destination page.
ie. front page set to 50 topics, posts-per-topic-page set to 25, last post is #30 on the page -> bbpress will calculate the page number for the last post as PAGE ONE off the front page, because that’s what the topic count is set to for the front page.
This got me really annoyed so I researched the heck out of it and figured out this trick – it’s nasty but works (for 8.2.1 at least).
so in config.php you’ve got
// The number of topics that show on each page.
$bb->page_topics = 20;now you can make a plugin with this, edit each page limit to your heart’s desire (anything without a $limit defined uses the config.php default)
function custom_topic_limit($limit) {
switch (bb_get_location()) :
case 'front-page': $limit=45; break;
case 'forum-page': $limit=35; break;
case 'tag-page': break;
case 'topic-page': break;
case 'feed-page': break;
case 'search-page': break;
case 'profile-page': break;
case 'favorites-page': break;
case 'view-page': $limit=50; break;
case 'stats-page': $limit=50; break;
case 'login-page': break;
default: $limit=20;
endswitch;
return $limit;
}
add_action( 'bb_get_option_page_topics', 'custom_topic_limit' );
function fix_post_link ($link,$post_id) {
remove_action( 'bb_get_option_page_topics', 'custom_topic_limit' );
$bb_post = bb_get_post( get_post_id( $post_id ) );
$page = get_page_number( $bb_post->post_position );
return get_topic_link( $bb_post->topic_id, $page ) . "#post-$bb_post->post_id";
}
add_filter( 'get_post_link','fix_post_link',10, 2);The magic is in fix_post_link where it trashes whatever incorrect calculation that “get_post_link” has now done because of custom topic limits, and relculates it after unhooking the custom_topic_limit.
No core hacks required!
Topic: Encoding problem
Hello, my WP 2.2.1 installation has utf-8 encoding –
define(‘DB_CHARSET’, ‘utf8’);
But when I try to integrate WP and BBpress with the help of plugins (bbpress-latest-discussion-for-wp.0.9 and display-name.0.7.2) there are encoding problems.
When I save a post with word “Administrátor” in WP 2.2 – to MySQL it is saved “Administrátor”, which is right. But when I save a topic with word “Administrátor” in BBpress – to MySQL it is saved like “Administr�tor” (or something else – but always wrong), but on forum it can be seen right like “Administrátor”. So, I think there are problems that WP 2.2 and BBpress uses different DB CHARSET (in WP 2.2 it is utf-8, but in BBpress it is something else – I think cp1250). Is it possible to change this somewhere in source files to work properly? Thank you very much for your help…
Topic: OpenID for bbpress
Instead of xml-rpc pingbacks for 0.84 I’d love to see a more useful feature – OpenID support
Apparently wordpress.com has had openid support since March:
http://wordpress.com/blog/2007/03/06/openid/
and here’s a wordpress plugin to allow logins via openid, now we need to port it to bbpress…
http://verselogic.net/projects/wordpress/wordpress-openid-plugin/
This would allow the quarter-million wordpress.com members and 120 million other openid participants to post on any bbpress forum with verified authentication.
Topic: Theme Question
I have a theme i ported over to wp and bbpress. It has the option of being one, two and three column’s layout. Im working on getting the other columns ported over i have the basic three column working now.
Theres links under the header to click to switch to each column layout. I want to keep this feature to offer my members. My question is there a simple way for me to let users switch columns? Like using a theme switcher or some other way? Ive searched the support forum here and so far i havent found a user theme plugin switcher on here. Is there one made that im overlooking? Even if there was one just because a user switched themes in the forum doesnt mean it would switch themes in the wordpress….
Can someone help me figure out to accomplish this?
website url: http://slickwhenwet.com/forum <– work in progress