here is the plugin..
please note that the bb hook for initialization was change after the blix release (0.73). it was changed from ‘init’ to ‘bb_init’
function my_check_private_forum($test='') {
global $bb,$bb_current_user;
$login_page = $bb->path . 'bb-login.php';
if ($_SERVER['PHP_SELF'] != $login_page) {
if ( !$bb_current_user ) {
header('Location: ' . $bb->domain . $bb->path . 'bb-login.php');
}
}
}
add_action( 'bb_init', 'my_check_private_forum');
you can use this
$topics = get_latest_topics( $forum_id);
but this will give you number of topics/page that you set in your config
to get just 10 topics from the forum
$topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_time DESC LIMIT 0,10")
Yeah true.. Trent, thanks for clarifying that for everyone, and me!

spencerp
/Me didn’t get to bed yet, so.. my brain is now working in reverse, compared to your’s.. since you got the sleep.. lol!!
Needs to be an option though because with that code in there, it will exclude when most users wouldn’t really need anything excluded. As well, that is only for the sidebar part, not the widget.
Trent
This is the block of database code that Trent had “fixed” up for me, to exclude the one forum.
(Found near end of plugin file)
function wp_bb_get_discuss_sidebar() {
global $wpdb,$bbpath;
$bbtopic = $wpdb->get_results("SELECT * FROM bb_topics WHERE topic_status = 0 AND forum_id NOT IN ('3') ORDER BY topic_time DESC LIMIT 10");
Where => (‘3’) is the forum id to exclude..

spencerp
It isn’t put in as an option, (though it would be easy to do), but all it really is, is adding SQL statement to exclude a forum. Maybe a guy should put a plugin code option for number of posts displayed as well as excluding a forum.
Trent
Glad to see someone is using my plugin
The plugin has been listed before but it gone now, thank’s for re-posting it.
Maybe u can send me the fix and i add it into the plugin.
I don’t know if this plugin is listed anywhere in the forum (can’t find it), but this is a plugin that will have recent forum posts from bbPress in your WordPress blog. Sidebar or otherwise. I use it and it is a great little plugin:
Recent bbPress Discussion in WP Plugin
As well, if you want to exclude a particular forum from the list, I have a little fix. Reply if that would help you.
Trent
so1o, you’re awesome! Thanks alot!
In /index.php, made it like this:
$topics = get_latest_topics(0,1,3,4,’2′);
Now the ones from the “Blog Article Discussion” forum, are NOT showing in the “Latest Discussion” section..
Thanks again!
However.. when I did try that plugin option, it deleted ALL the threads, except for the Blog Article Discussion posts.. but, I think that’s because I used the wrong id for the forum.. lol..
When hovering over the “Blog Article Discussion” forum, it shows as “3” being the “id”.. but, in the admin control panel.. I assigned “2” for it.. so, that’s what the problem was.. Anyway.. she’s working now! Thanks again!!
spencerp
Spencer
two ways..
1) edit /index.php
change line 12 to
$topics = get_latest_topics(0,1,'x');
where x is the forum id of the ‘Blog Article Discussions’ forum
2) plugin
create a file named my-own-blog-forum-filter.php plugin in the my-plugins directory.. or any name you want.. and have the following code in it
<?php
function my_frontpage_forum_filter($where) {
$where .= " AND forum_id NOT IN ('x') ";
}
add_filter('get_latest_topics_where', 'my_frontpage_forum_filter');
?>
again replace x with the forum id that you need
ardentfrost, maybe you can help me..? I’m using the bbPress Post (0.02) by mByte, and with his plugin.. I had made a forum for the blog posts to show up, however.. I would like to make the blog posts, stay ONLY IN the “Blog Article Discussions” forum..
Instead of them showing up in the “Latest Discussions” part of the forums index page.. And just have ONLY the threads made in the forums, show in the “Latest Discussions” section of the forum.. Is there maybe something that could be done for this?
I’m basically asking to exclude one of the forums, from the “Latest Discussions” section. Thanks in advanced..

spencerp
double check the $bb->domain and $bb->path variables..
make sure you have the latest code..
disable any plugins you have… specially if they have a filter applied to bb_tags.php
also do you have custom templates or have you modified templates..
Did you install that pluign in bbPress’ my-plugins folder?
What is your Display name set to? (In your WordPress profile)
I’ve just installed bbforum to test and play around with, but have hit a niggling problem – I hope people can help.
In the breadcrumb navigation for tags, urls of this forum work:
http://www.learning2goblog.org/bbforum/tags.php?tag=bbpress
but if I click onto the “Tags” link in the breadcrumb navigation (i.e. I open
http://www.learning2goblog.org/bbforum/tags.php), the page does not load, and in Firefox I get the message
The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept cookies.
Has anyone else experienced this problem? I’m using the latest version of bbforum, no permalinks.
Thanks for any help you can give.
I wanted a way to let the topics listed under “Latest Discussion” expire after a while (eg., no longer show up if there has been no activity after a week), so I wrote this little plugin which works alright, except it messes up the forums. Each forum, when clicked, shows all posts no matter what forum they’re in.
Any help would be appreciated. This is a simple script, I just copied the $where code from functions.php and added the filter, then added my “expire after 7 days” addition. Any help would be appreciated, I’m probably just not seeing something simple.
function get_where_plugin() {
$forum = (int) $forum;
$where = 'WHERE topic_status = 0';
if ( $forum )
$where .= " AND forum_id = $forum ";
if ( !empty( $exclude ) )
$where .= " AND forum_id NOT IN ('$exclude') ";
if ( is_front() )
$where .= " AND topic_sticky <> 2 AND SUBDATE(NOW(), INTERVAL 7 DAY) < topic_time "; // 2nd part is my addition
elseif ( is_forum() || is_view() )
$where .= " AND topic_sticky = 0 ";
return $where;
}
add_filter ( 'get_latest_topics_where', 'get_where_plugin' );
To see how it’s misbehaving, you can go to http://www.rayd.org/forums/ and just click on either forum (General Chat or New Forum Discussion) and see that both contain the same data. However, it’s working great on the front page.
First off, which plugin are you using with WP for LDAP authentication?
My understanding of some of the plugins is that the user has to be created in WP first. Not sure if they automate this process or not. All that changes is the authentication process, the password from the LDAP server and maybe the cookie.
Standard WP and bbPress integration works with sharing the WP users. If the LDAP plugin doesn’t use the WP user password, not sure if this information would move over to bbPress.
Short of testing it, I would imagine it would depend on whether the password is updated in the WP users table of the database. Maybe ask the plugin author if he/she thinks this would be possible?
Another thing, there is a plugin that pulls the users out of WP into bbPress. That being said, if the username and password are stored in WP, then there shouldn’t be a problem integrating even with using LDAP.
Of course, if someone else knows something that could be added to this discussion, please do!
Trent
I’m not sure how to tell whether it’s readable? If, for example, I drop a phpinfo script into the ‘forum’ folder then I can display that OK – as I can the image in the forum/bb-images folder.
And yes – I am attempting to run the /forum/bb-admin/install/php script. For the record, trying index.php gives the same blank screen.
Puzzling! As I say my WP test site has been running successfully for a long time as has a local copy of Gallery2.
I am trying to install bbPress to my local Mac into a subfolder of my test WP installation which has been set up and working for over a year now.
This means my url is not an ‘www.example.com’ address but a 127.0.0.1 (or, in my case, my local network IP which works just as well). So I have set up config.php with this address. and the path as ‘/forum/’.
When then trying to run the install script however, it just takes me to a comletely blank page. (A similar problem was raised here: http://bbpress.org/forums/topic/143?replies=1 but received no reply).
Does anyone have any ideas what this points to?
Good thinking. Using the logged in status natural to bbPress to do this. Just looking at the code it would work, but I will test this out on my dev forum and report back as well. I could see this expanded into a plugin very easily….
Trent
Seems to have installed just fine! I’ll run around and check for any errors and report back here.. I installed that right along with my 2.1 alpha3 test blog, click the link below to see it..
http://21.spencerp.net/
spencerp
Oh wait, slaps self.. I just noticed this: “We’ve only tested bbPress integration with the most recent stable release of WordPress, 2.0.5.”
Alright, hmm.. maybe I’ll give it a shot then once.. maybe, I will have to cross the fingers though lol.. Wish me luck peoples!
spencerp
When you go to your profile preferences there should be a new section… look here:
http://la-school.com/bbpress/profile.php?id=2&tab=edit (Login: Test / test )
even after installing the plugin to get display names showing, the top of any forum topic still says
# Started 1 minute ago by admin
# Latest reply from admin
how can i fix this?
Hi Null, to do that you need to change your template a bit and create a new hook, which is dead easy, and a testament to the flexibility of the event model that underpins both WP&bb.
- Copy
topic.php from bb-templates into my-templates (you may need to create this folder).
- Find the for loop near line 29 – it will read something like this:
<?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
- Immediately before it (outside the loop, but inside the
<?php) add the line $need_to_show_ad=true;
- Then change the line
<?php bb_post_template(); ?> to read <?php bb_post_template(); if ($need_to_show_ad) { do_action('showadvert'); $need_to_show_ad=false; } ?>
- Finally, change the action in the plugin so it fires on your newly created hook
add_action('showadvert', array('bb_adsense','wide_advert'));
… and an admin page? Maybe when bbPress matures!