Re: renaming index.php messes up lay-out?
What does it matter that what bbpress sees at “front-page” isn’t the actual front page of your site? It’s just a moniker used throughout the program, it doesn’t have to mean anything to you.
Not a lot needs to change when adding a new page. Make a file in your forums root directory call it whatever, like null.php. set it up like this:
<?php
require_once('./bb-load.php');
***[if you need any code, put it here]***
if ( file_exists(BBPATH . 'my-templates/nullsfile.php') ) {
require( BBPATH . 'my-templates/nullsfile.php' );
} else {
echo "File does not exist in my-templates folder";
}
?>
Then make a file in your my-templates folder called nullsfile.php and make it look like an html file, but be sure to set it up like this:
<?php bb_get_header(); ?>
***[put all your html code here with calls to php functions]***
<?php bb_get_footer(); ?>
At that point, you have a page integrated into bbpress. What you do in those two files is up to you. To access the file, you just go to forumsroot/null.php (if you have pretty links turned on, you don’t need the .php part). If you need called functions, standard is to put them into a file in the my-plugins folder.
In some of the plugins I’ve made, my main file does stuff like detects if something is set in the address line by checking the $_GET[] variable, or it pulls information needed by the required my-templates file by running a database query…
That all make sense?