Customizing BBPress
During the install of bbpress, you may have noticed a directory called bb-templates. This is the folder that contains all the default php templates, stylesheet, and images (inside images folder). It is also the place to start to begin customizing.
The best way to start off is to create a new directory inside the root folder of the bbpress install called “my-templates“. Any php templates place in this folder with the same name as in “bb-templates” will override the original files. For example, if you modify front-page.php and upload it to “my-templates”, bbpress will pull the customized front-page.php file.
It’s important to note that bbpress is expected to have a theme system similiar to WordPress in future releases. This will no doubt ease the development of themes and customizations, we just don’t know when this will be occuring.
Much like WordPress, BBpress is broken down into 2 core files used in most of the templates: header.php and footer.php. The header consits mostly of meta information (forum title, dynamic stylesheet and script location, etc), and then an opening wrapper, banner strip (where the login form is located in the default theme), and opening main div. The footer contains the closing main and wrapper divs, as well as contains a footer div with “powered by bbpress” information.
With that being said, if you read any of our customizing wordpress articles awhile back, you know the importance of the header and footer. Because these are used on every page, you can do alot of customizing by only editing them along with the stylesheet, as long as you plan to keep the main layout structure in tact.
For our custom skin we have in the works, we started by editing the header and adding in a new top bar with navigation links. Doing this allowed us to remove the banner and login form from the homepage, because we felt they we’re not needed and could fit in better in the sidebar above the tags. Our header.php now looks like this:
[php]
function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } }
var lastMod = topic_time . ' +0000'); ?>;
var page = ;
var currentUserId = ID; ?>;
var topicId = ;
var uriBase = '';
var tagLinkBase = '';
var favoritesLink = '';
var isFav = ID ) ) echo "'no'"; else echo $is_fav; ?>;