Figured it out. Kind of dumb. $topic->forum_id
Your answer is in the database. Try to find it, but if you can’t, I’ll give you the answer
OK. Thanks. It turned out bb_head() was only called (as part of an if ()
statement) when the page is a topic. So I see that my above plugin works on a topic page. Awesome.
My long-term project is a forum-access plugin where you can grant or restrict access to individual users. Not roles-based.
Does anyone know a hook to use for intercepting an individual forum listing in front-page.php? You’d think get_forum
would work, but for some reason … anyway.
I’ll keep you posted on my adventures of learning to write plugins.
I cannot think of anything you’d have to do besides re-edit your config.php unless you’ve hardcoded your domain into any custom templates.
Is that it? I am actually working with both WordPress and bbPress integrated. There is quite alot of work that needs to be done WP on the database side ( https://codex.wordpress.org/Changing_The_Site_URL ) , so I was figuring something similar would need to be done for bbPress. Although, they are sharing a database, not sure if that makes a difference. Any other thoughts?
I hope you’ll continue to populate the plugins browser with your clever works 
https://bbpress.org/plugins/
That’s very difficult to decipher, so for maintainability may I suggest you break out the code so you create variables first then use them when creating the echo statement.
It looks like you need to use call_user_func(tabel["is"])
to run the function names that you’re retrieving from the db.
Euuhh well still can’t get it to work…
I have the function:
function get_bb_menu() {
global $bbdb;
return $bbdb->get_results("SELECT * FROM $bbdb->menu WHERE
set = 'active' ORDER BY
order ASC");
}
This will give (tabel sperated with – ):
set – item – page – is – order
active – Forums – index.php – is_front() – 0
active – Statistic – statistics.php – is_bb_stats() – 1
active – Search – search.php – is_bb_search() – 2
Now I want this in a for each so it generates (note this is A PART what it should generate):
<li><a <?php if (is_bb_search())
{
echo "id="current"";
}?> href="<?php option('uri'); ?>search.php">Search</a></li>
<li><a <?php if (is_bb_stats())
{
echo "id="current"";
}?> href="<?php option('uri'); ?>statistics.php">Statistics</a></li>
But how to do this???
davidbessler,
Your theme needs to have a call to bb_head()
in its header.php.
If you’re using a version of the default header, make sure bb_head()
is actually being executed on every page load. There was a bug in early versions of bbPress that prevented bb_head()
from being called on anything but topic pages.
As an aside, if you’re adding javascript, you should definitely use bb_enqueue_script().
bb_enqueue_script( 'give-it-some-name', '/soruce/file.js');
It will be longer than we thought originally 
We guessed too optimistically. Oops!
Nah it will take some weeks before it’s released, so call down
You mean the green background when hovering?
.notice {
border: 2px solid #4c9545;
background: #abd8a2;
color: #4c9545;
font-size: 1.1em;
font-weight: bold;
padding: 10px 15px;
margin: 0 0 1.1em;
}
Not sure though
That is SWEET!! I’ve just implemented the last patch, running 0.8alpha.
Here’s my site for view: http://spencerp.net/forums/
Only thing I’m waiting on now, is the: /bb-admin/content-categories.php page itself.. I’m getting a blog 404 when going there, but of course, didn’t see that file included, so..
And also getting the 404, after clicking on the link:
http://spencerp.net/forums/category/0
But that’s to be expected right.. lol!
Anyway, hopefully this might push the “project” along a little quicker LoL!.

spencerp
/By the way, I left the same comment on your ticket Sam..
This is frustrating. Tell me why this simplest of all plugins does not work.
<?php
/*
Plugin Name: Add something to the header
Plugin URI: http://davidbessler.com
Description: My first plugin
Author: David Bessler
Author URI: http://davidbessler.com
Version: 1.0
*/
function add_something_to_the_header (){
echo "<!--Something I added-->n";
}
add_action ('bb_head' , 'add_something_to_the_header');
?>
There is no instructions on how to write plugins as far as I know. You just gotta do it like the rest of us: look through the code and figure out how it’s written. It’s not too hard and it’s written logically. You need to be able to either grep or search inside the files (there’s a way to search inside php files using windows search). If you want to look for hooks, look for add_action or add_filter and see where they all are. If you want to see how to use them, look through other plugins.
And if you have specific questions, these forums are here and there are plenty of people who try to help
I can’t begin to express how psyched I am that you did this! I really do think its a good idea and will help a lot of forums increase their activity.
By the way, it worked without a hitch and i have it installed over at http://outletzine.org/forums now
OK look at this:
$forum_restrict_keys = array(
"1" => "davidbessler,testman",
"3" => "davidbessler,",
);
function forum_restrict_check_name() {
global $bb_current_user,$forum_restrict_keys;
if ($bb_current_user){
$allowed = strpos($forum_restrict_keys[get_forum_id()], get_user_name( $bb_current_user->ID ));
if ($allowed == "") {
echo "[blocked]";
add_filter( 'get_forum_name', 'forum_restrict_blank_name');
} else {
echo "[Not blocked]";
}
}
}
function forum_restrict_blank_name (){
echo "";
}
add_action( 'get_forum_name', 'forum_restrict_check_name');
?>
That puts [blocked] instead of the forum name in a forum that user is not allowed to see, and [not blocked] on a forum he is allowed to see. How do I get the forum name back in there instead of [not blocked]?
@nateolsen, I just added ALL 3 databases into ONE database, like such:
database_name (holding all three)
bb_forums
bb_posts
bb_privatemessages
bb_tagged
bb_tags
bb_topicmeta
bb_topics
mw_archive
mw_categorylinks
mw_externallinks
mw_filearchive
mw_hitcounter
mw_image
mw_imagelinks
mw_interwiki
mw_ipblocks
mw_job
mw_langlinks
mw_logging
mw_math
mw_objectcache
mw_oldimage
mw_page
mw_pagelinks
mw_querycache
mw_querycachetwo
mw_querycache_info
mw_recentchanges
mw_redirect
mw_revision
mw_searchindex
mw_site_stats
mw_templatelinks
mw_text
mw_trackbacks
mw_transcache
mw_user
mw_user_groups
mw_user_newtalk
mw_watchlist
sk2_blacklist
wp_bad_behavior
wp_bas_log
wp_bas_os
wp_bas_pages
wp_bas_refer
wp_bas_searches
wp_bas_ua
wp_bas_visitors
wp_bbpress_post_options
wp_bbpress_post_posts
wp_categories
wp_comments
wp_link2cat
wp_linkcategories
wp_links
wp_options
wp_post2cat
wp_post2tag
wp_postmeta
wp_posts
wp_secureimage
wp_sk2_logs
wp_sk2_spams
wp_tags
wp_tag_synonyms
wp_usermeta
wp_users
Of course, used the normal database prefix for each one specifically.
It was mentioned though, that for the mw_ ones, you didn’t have to use the “mw_” prefix for when trying to mesh with bbpress/WP.. but, to play it safe, I used the default “mw_” prefix anyway.. Choice is your’s really..

@mozey, nice!! I’ll have to try that out sometime, well, when I get more time.
Thanks for tips and pointers!

spencerp
I’m REALLY new at making plugins. Let’s start there.
I’m looking to hide certain forums from a defined list of people. Or actually, I’m looking to only allow certain people to see certain forums. Anyway, I’m starting with just trying to make that happen on the front page. How do I “hijack” the page just at the point where it is about to spit out the forums on the front-page? I think this is what hooks are for right? So that I don’t need to actually edit my front-page.php?
Basically what I am looking to do, is during the “foreach” loop in front-page.php, I want to compare the upcoming forum_id with a list of usernames in an array who are allowed to see that forum. If there’s a match, it shows the forum, if not, it doesn’t.
The array looks like this:
$forum_restriction_keys = array(
"1" => "bob, sam, jim, jane",
"3" = > "bob",
);
So, to start, I need the right hook.
I would just use the full path on the server:
<?php include
('var/usr/www/yourdirectory/whatever.file'); ?>
That should work shouldn’t it?
Referencing this post
Trent
so:
Function BlahBlah () {
global $bb_current_user;
$myName = get_user_name( $bb_current_user->ID );
echo "Hello, my name is ".$myName;
}
Like that?
Where can I find a list of all these variables and functions? Like how did the author of that plugin know there was such a thing as get_user_name()
?
Thanks Trent, I am still pushing along… I understand, those late nights get to me too.
All the Best,
Orion
I am trying to use a call to navigate to the root directory in order to call on an include that is located in a directory outside of the bbPress directory.
Is there anyone out there who could help me with a BB PHP command that will bounce me back to the root directory. I tried…
<?php include('../../etc/etc'); ?>
with out results.
So, any suggestions or ideas would be greatly appreciated.
All the Best,
Orion
On my setup, (different system, same concept),
i used a centralized mysql table which contains a mesh of all of the variables of all systems!. The reason wy i did that is, some of these usertables contain information which would change the bahaviour of the software, such as roll, last login etc. SO its not a mater of authentication and session ONLY. You also need the other stuff!!!.
i ALSO used a single portal for signup/signin. THIS SHOULD NOT BE SCARY (assuming that thinking does’nt hurt your brain). A good IDE will get everything done for you (search replace globally, find all instances of a function etc).
I reccomend http://www.eclipse.org/downloads/ as an editor, and use PHP IDE as an ide ontop of eclipse. Be patiant, if you have’nt installed before, it could be a bit strang, but do take a better part of a weekend to figure out hw it works. TRUST ME, php will be your bizatch afterwards
Hehe, I’m blind!
Sorry, just open poEdit and do what it says
.