Page 1 of 1

1 Layout, $PutInBody, Folder.. Support

Posted: Sat Aug 03, 2002 10:43 pm
by camarosource
My site is catagorized within folders

ie. /root
/featured_rides/
/wrecks

etc.. To help organize it.

I have seen the following done on other sites (with php) but don't know how they did it.

1 layout html page. When you click links, the pages load in a specific region of layout. Friend did Main.php which allows the page to be pasted where $PutInBody is. It also reads the url after "?URL=" and attaches http://www.camarosource.ca/new/new_layout to it so it's a working link.

I don't know .php and the guy who did main.php did it a year ago and has not replied to any of my emails.
I don't need his coding in there that fixes the image paths anymore. His code also is causing PHP in main_orig.php (the layout page that main.php loads) to NOT parse php in main_orig.php. According to IRC #PHP the "eval fuction" is causing this? or something.. So I need someone to re-write/edit the script so it WILL do what I need it to do, parse php, the code in main_orig.php, paste pages when clicked in the $PutInBody area, & be able to use links that are NOT all in root.. (catagorized within many folders)

What is the best way of being able to have 1 layout html file for the entire site. Then when a link is clicked that page loads in a specific area of layout. I don't want any FRAMES, IFRAMES nor SSI..

http://www.camarosource.ca/main.phps is the main.php script renamed to .phps so you can view it.

Is anyone here willing enough to write the script that will run the site?

Thank you so very much for your time and I hope someone here is friendly enough to help more than the people on IRC php channels (Call you LAME, or just say "READ THE MANUAL"). For someone who doesn't need to know all about php as he only need it for 1 small purpose, doesn't have the time to read out a manual on php.. just wish people would remmeber the time they were looking for assistance and wished they could find someone who would help them.. And remember what it was like when all they got was "READ THE MANUAL" support. Do onto others as you would have do onto you. :-) Thanks again.

Posted: Sat Aug 03, 2002 11:08 pm
by lc
very simply to get you started.

When you see a link like http://myhome.php?id=1

Basicly it just loads the http://myhome.php page, but later on in the page/script you can load stuff according to the variables in the link. in this case $id.

So you could set it to say

if($id == "1"){
include ("another_bit_of_script.inc");
}

Which basicly sees if the link was ?id=1 and if so then it includes that bit.. if it isn't it doesn't.

This sorta thing can get complex but you can figure it out. Basicly I'd say try to figure out little bits.. try to find lots of functions on http://www.php.net and ask for a lot of help here.

Posted: Sat Aug 03, 2002 11:11 pm
by camarosource
lc wrote:very simply to get you started.

When you see a link like http://myhome.php?id=1

Basicly it just loads the http://myhome.php page, but later on in the page/script you can load stuff according to the variables in the link. in this case $id.

So you could set it to say

if($id == "1"){
include ("another_bit_of_script.inc");
}

Which basicly sees if the link was ?id=1 and if so then it includes that bit.. if it isn't it doesn't.

This sorta thing can get complex but you can figure it out. Basicly I'd say try to figure out little bits.. try to find lots of functions on http://www.php.net and ask for a lot of help here.
How come main.php (what runs the site) doesn't use any of these ".inc" and that other coding you mentioned?

Posted: Mon Aug 05, 2002 11:02 am
by lc
Sorry didn't have a look at the source code you gave.

Honestly... really honestly?

I have no idea how his thing works. It's not how I'd code it. I think that unless you can find a good experienced php scripter to refine his work... it might be best to start from scratch.

Posted: Mon Aug 05, 2002 11:05 am
by camarosource
thank you for your replies. I found someone who am now in contact with who has fixed this. Moderator: you may delete this post. Thanks again. :)