boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using b2's built-in PHP with custom

 
Post new topic   Reply to topic    boardom Forum Index -> How to ?
View previous topic :: View next topic  
Author Message
Serveza



Joined: 13 Oct 2003
Posts: 6

PostPosted: Thu Jan 08, 2004 9:15 pm    Post subject: Using b2's built-in PHP with custom Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> How to ? All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group