Search Results for '+.+default+.+'
-
Search Results
-
Topic: plugin: bb-Polls
I am pleased to announce a new bbPress Polls plugin.
Your members can now add polls to their topics, or optionally you can allow *anyone* to add a poll to *any* topic, within a specified time period (hours) since the topic was started.
bb-Polls allows single answer or multiple answer polls.
No template edits of any kind.
There are no additional db tables added, it uses bbpress topicmeta only. Only one entry is created per poll, regardless of size or options (this allow very easy cleanup if desired for some reason).
This is a *very* early beta, however should be functional except for:
1. missing admin menu (coming soon – edit plugin directly)
2. missing administrative editing of existing polls.
3. missing some visual tweaks (plural case, etc.)
4. missing some more deluxe options (poll ending time, etc.)
5. missing multi-language support (coming soon)
If you can live with these limits and would like to help test and give me some useful, constructive feedback, please download:
http://ckon.wordpress.com/files/2007/08/bb-polls.txt?v010
(rename .txt to .php, install, activate, start a new test topic)
The beta is set so only moderators and above can create/see the polls. This will allow you to test without disturbing visitors.
Please note the visual styles may be WAY off for the default template or your own template. Unfortunately I am using a very customised template. You’ll probably have to edit the built in css which is kept clearly at the top. (the default styles will be fixed soon when I get a chance to do a trunk install this week)
Upcoming features include the ability to display all polls and the ability to display a poll anywhere within bbpress templates.
ps. I need to know if this works as in in the trunk version – I don’t see why it wouldn’t but you never know…
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!
I have a WP install with BBPress installed on the same database in a subdirectory of WP. Install went well, looked in the database and my new forum topic was written in the database but all links on the BBPress forum lead to “No input file specified”. I’m suspecting that it has something to do with the config file. Let me know if you see something wrong here:
// Change the prefix if you want to have multiple forums in a single database.
$bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!
// The full URL of your bbPress install
$bb->uri = ‘http://theasianman.com/wordpress/bbpress’;
// What are you going to call me?
$bb->name = ‘The Asian Man Forum’;
// Set to true if you want pretty permalinks, set to ‘slugs’ if you want to use slug based pretty permalinks.
$bb->mod_rewrite = false;
// Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage
// of Akismet’s powerful spam blocking, you’ll need one. You can get an Akismet key at
// http://wordpress.com/api-keys/
$bb->akismet_key = ”; // Example: ‘0123456789ab’
// The rest is only useful if you are integrating bbPress with WordPress.
// If you’re not, just leave it as it is.
$bb->wp_table_prefix = ‘wp_’; // WordPress table prefix. Example: ‘wp_’;
$bb->wp_home = ‘http://theasianman.com/wordpress’; // WordPress – Options->General: Blog address (URL) // Example: ‘http://example.com’
$bb->wp_siteurl = ‘http://theasianman.com/wordpress’; // WordPress – Options->General: WordPress address (URL) // Example: ‘http://example.com’
I’ve turned permalinks off because it seems people are having trouble with them in conjunction with GoDaddy (my clients host : ( ).
I’ve created a .htaccess file with:
Options +MultiViews
Not sure what’s up. The default forum content is not even showing up.
Cheer all and thanks in advance
Ruh roh, I think I broke something.
No pagination links on forum pages even though
<?php forum_pages(); ?>
is there – pagination shows up and works just fine on topic pages however.Seems to work here, any ideas how to debug this other than turning off two dozen plugins?
ps. also someone has to tell me oneday how to change the pagination number count and formatting without hacking the core – how do I alter that default settings array?
Topic: Topic Pages
Right now bbpress appears to default to 15 post per topic before being paged. Where is the variable to reset this to another value?