PHP Template System.. HELP ! ! ! !
#1
Posted 28 September 2004 - 03:17 PM
#2
Posted 28 September 2004 - 03:46 PM
http://www.dabu4u.co...hp/querystrings
#3
Posted 28 September 2004 - 04:34 PM
symply type:
if ($id) { include('$id'); } else { include('file.php'); }
change 'file.php' to the file you want to show up when ppl go to pbkill.com and set your links to be
<a href="file.php?id=tutorial">
changing file to the same thing as before, and tutorial the name of the file you want to include w/o the extention (i.e. neonmen, not neonmen.html)
p.s. you have to save your index file as .php not .html (index being what ever has your template)
working example of the codes above in my sig (just click the link)
#4
Posted 28 September 2004 - 05:07 PM
#5
Posted 28 September 2004 - 07:03 PM
Rc89 could you please alaberate a little more please?
#6
Posted 28 September 2004 - 08:04 PM
<a href="file.php?id=tutorial">
for the link you submit to good tutorials make it
http://www.yourdomain.com/index.php?id=tutorial
#7
Posted 28 September 2004 - 08:10 PM
if ($id) { include('$id'); } else { include('file.php'); }
what do i do with this tho... i know that other part for the links? do i put this in my index.php or my navigation.php file?
#8
Posted 28 September 2004 - 09:07 PM
#9
Posted 28 September 2004 - 11:45 PM
<div style="overflow:auto; width:yourwidthherepx; height:yourheightherepx"><?php if(!issetid)){ include("yourfilehere.php"); } else { include("id.php"; } ?> </div>
That made the scroll bars. And the px at the end of the width and height has to be there. So it would be 67px as an example for either of them. $id can be substituted for whatever you want. And the !isset part of the if statement is for the main page, without any arguments in the url. So like http://urlhere.com/index.php?id=page1 would make your layout with page.php1 in the content box. Simple.
#10
Posted 29 September 2004 - 01:50 PM
target=iframe
that way it will load insided the iframe, if you called your iframe something other then iframe make it target=what ever you caled it
#11
Posted 29 September 2004 - 08:30 PM
#12
Posted 30 September 2004 - 12:47 PM
#13
Posted 30 September 2004 - 05:19 PM
best thing that comes to my mind is php, and i don't think that the code blitz gave would exactly work
<div style="overflow:auto; width:yourwidthherepx; height:yourheightherepx"><?php if(isset(id)){ include("id.php"); } else { include("yourfilehere.php"); } ?> </div>
i switched it around a little bit to be more like the original code i gave, plus added a ( after isset, so it would be isset() not issetid)
as for the <div> code, i remember seing something like that, it should work, but all i did on my site was make a central table made-to-stretch, that way i didn't have to worry about iframes, but you did give me an idea for a place where i did have to use an iframe, thanks
#14
Posted 30 September 2004 - 05:34 PM
#15
Posted 30 September 2004 - 06:55 PM
Woops, missed that. That's what I mean. I'll just post my actual code:in his site it might work, but not an offsite like like good tutorials...
best thing that comes to my mind is php, and i don't think that the code blitz gave would exactly work<div style="overflow:auto; width:yourwidthherepx; height:yourheightherepx"><?php if(isset(id)){ include("id.php"); } else { include("yourfilehere.php"); } ?> </div>
i switched it around a little bit to be more like the original code i gave, plus added a ( after isset, so it would be isset() not issetid)
as for the <div> code, i remember seing something like that, it should work, but all i did on my site was make a central table made-to-stretch, that way i didn't have to worry about iframes, but you did give me an idea for a place where i did have to use an iframe, thanks
<div style="width:336px; height:545px; overflow:auto"><? if (!isset($id)){ include("news.php"); } else{ include("$id.php"); } ?> </div>
That's what I did.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users