Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Vancouver, BC
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    1 Layout, $PutInBody, Folder.. Support

    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.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    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??
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Vancouver, BC
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?...ges/themes.htm is read as http://www.camarosource.ca/new/new_l...ges/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?...ges/themes.htm is read as http://www.camarosource.ca/new/new_l...ges/themes.htm

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #5
    New Coder
    Join Date
    Aug 2002
    Location
    Vancouver, BC
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •