...

View Full Version : 1 Layout, $PutInBody, Folder.. Support



camarosource
08-03-2002, 05:55 PM
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.

firepages
08-03-2002, 06:18 PM
Well I could have the wrong end of the stick but that code is surreal... as far as I can see all that needs doing is

1)include() the appropriate document
2)ensure that all paths are relative to the calling(main.php) document

do you have any pointers to why it was done that way ? am I missing something obvious?...

if not & if you want to zip up say 1 folder and the main & main_orig.php & I will have a look - unless someone spots something I didnt??

camarosource
08-03-2002, 07:10 PM
Originally posted by firepages
Well I could have the wrong end of the stick but that code is surreal... as far as I can see all that needs doing is

1)include() the appropriate document
2)ensure that all paths are relative to the calling(main.php) document

do you have any pointers to why it was done that way ? am I missing something obvious?...

if not & if you want to zip up say 1 folder and the main & main_orig.php & I will have a look - unless someone spots something I didnt??

I really have no idea. The guy who wrote it cannot be contacted anymore.

Basically the script does 3 now.

1. Paste the pages when clicked to where $PutInBody is
2. Fix image Paths (since aren't in root directory, rather they are catagorized within folders from the root)
3. Reads the path after "?URL=" on the links and attaches the beginning full path so the link is correct "http://www.camarosource.ca/" so the link http://www.camarosource.ca/main.php?url=new/new_layout/htmls/misc_pages/themes.htm is read as http://www.camarosource.ca/new/new_layout/htmls/misc_pages/themes.htm

Or at least that is What the guy said it does :-) Perhaps you can tell me what it's doing exactly.

I changed all image paths so they are ABSOLUTE "http://www.camarosource.ca/folder/images/filename.jpg rather than /folder/images/filename.jpg

So I no longer need the coding in main.php to fix the image path URL.. That can be safely removed.

Basically all it needs to do (i beleive) is:

1. Paste the pages when clicked to where $PutInBody is
2. Reads the path after "?URL=" on the links and attaches the beginning full path so the link is correct "http://www.camarosource.ca/" so the link http://www.camarosource.ca/main.php?url=new/new_layout/htmls/misc_pages/themes.htm is read as http://www.camarosource.ca/new/new_layout/htmls/misc_pages/themes.htm

Íkii
08-03-2002, 08:07 PM
looking through main.phps (the view-source file) it seems like you have been using PHP to simply ensure a badly rooted (ie - path info in the htm files is odd) htm file is output to the client browser with the proper pictures and the links correct.

PHP is a bigger sister than that :)

Could you tell us the `backend` functionality you want to achieve from your site? Are you looking toward including URL valued subpages from various directories? Are you seeking to use a template system?

Maybe we can start thinking from 'what you want to achieve' rather than from a 'what's currently happening' point of view.

camarosource
08-04-2002, 01:34 AM
Originally posted by Íkii
looking through main.phps (the view-source file) it seems like you have been using PHP to simply ensure a badly rooted (ie - path info in the htm files is odd) htm file is output to the client browser with the proper pictures and the links correct.

PHP is a bigger sister than that :)

Could you tell us the `backend` functionality you want to achieve from your site? Are you looking toward including URL valued subpages from various directories? Are you seeking to use a template system?

Maybe we can start thinking from 'what you want to achieve' rather than from a 'what's currently happening' point of view.

Thanks for your reply.

Actually I stated in my original message what I want to do. :-)

To have 1 html where you have the pages (when links are clicked) that they display in a specific area of the layout.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum