Serveza
Joined: 13 Oct 2003 Posts: 6
|
Posted: Thu Jan 08, 2004 9:15 pm Post subject: Using b2's built-in PHP with custom |
|
|
Okay, I desperately need help because I'm just not understanding a few things here.
This code: Code: | <?php
if(isset($_GET['fela'])) {
if(is_file(basename($_GET['fela'].".php"))) {
include(basename($_GET['fela'].".php"));
} else {
include("main.php");
}
} else {
include("main.php");
}
?>
|
goes in your .php template file, where you want your content to show up, right?
Then your links look like: http://www.blah.net/?fela=thispage, right?
And thispage can have any extension you like, while sitting in your directories, right?
Now... how does this work with b2?
Do I make the b2.php file, that includes my latest entries, into the template for the entries I desire?
Then I can just change the code above to Code: | <?php
if(isset($_GET['fela'])) {
if(is_file(basename($_GET['fela'].".php"))) {
include(basename($_GET['fela'].".php"));
} else {
include("b2/b2.php");
}
} else {
include("b2/b2.php");
}
?>
|
and it should work, right? (Assuming I've used the tutorial on moving your b2 files into their own folder - it is installed correctly, because it worked before I changed my PHP file to use this code above.)
So how come it doesn't?
I'm so, SO confused... I even read some of PHP.net's manual last night, and it still doesn't make sense to me. Argh. |
|