View previous topic :: View next topic |
Author |
Message |
kin
Joined: 01 Oct 2002 Posts: 30 Location: Belgium
|
Posted: Tue Jan 14, 2003 6:11 pm Post subject: Using template layout and b2 |
|
|
Hi all
I'm using a template file (locally) for the layout of my website, this means i'm using one single file (in my case called livenlog.php) and adding a parameter to the url to include another php page in that livenlog.php page. I'm testing this website locally with PHP version 4.2.0 ; Apache v1.3.24 ; mysql v3.23.49 and phpmyadmin v2.2.6 (on winXP - MSIE 6)
Code: | <?php @ include ("$page.php");
if ($page == NULL)
{
@ include ("b2/b2.php");
}
?> |
So, if i go to http://localhost/livenlog.php , my b2.php will be displayed inside that livenlog.php page but then, there's a problem with paths
eg: link to the comments
Code: | http://localhost/b2commentspopup.php?p=1&c=1 |
instead of
Code: | http://localhost/b2/b2commentspopup.php?p=1&c=1 |
Same thing for the b2register.php b2login.php etc...
Plus, if i enter this url: http://localhost/livenlog.php?page=b2/b2 (then showing b2.php) i can see my blog title but no content is displayed
Each php script that i installed is getting errors like this and i can't even include the famous Gallery script unless i open it 'individually', eg like this http://localhost/gallery/index.php
If i try http//localhost/livenlog.php?page=gallery/index then all is screwed up
Can someone help me fix that "include" template or give me a really good newbie tutorial on making templates so that i can run it with b2 and other php scripts ?
I hope i made myself clear *phew*
Thanks !!! _________________ ~»•«~ Live'n'Log in english ~»•«~ Live'n'Log in french ~»•«~ |
|
Back to top |
|
 |
kin
Joined: 01 Oct 2002 Posts: 30 Location: Belgium
|
Posted: Wed Jan 15, 2003 9:49 am Post subject: |
|
|
Pretty please anyone ? I can't develop my website anymore, I'm stuck because of this _________________ ~»•«~ Live'n'Log in english ~»•«~ Live'n'Log in french ~»•«~ |
|
Back to top |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 536 Location: Singapore
|
Posted: Wed Jan 15, 2003 12:24 pm Post subject: |
|
|
use $_GET['$page'] instead of $page _________________
++ GamerZ.Per.Sg - Complex Simplicity |
|
Back to top |
|
 |
kin
Joined: 01 Oct 2002 Posts: 30 Location: Belgium
|
Posted: Wed Jan 15, 2003 9:38 pm Post subject: |
|
|
It didn't work, it gave me a parse error. I'm going to use b2 on its own page anyway
Thanks for your suggestion thou GamerZ! I appreciate
Oh well, if anyone can still reply, i'm still around... thx _________________ ~»•«~ Live'n'Log in english ~»•«~ Live'n'Log in french ~»•«~ |
|
Back to top |
|
 |
|