Author Topic: Including Navigation File for Site Uniformity  (Read 7791 times)

0 Members and 1 Guest are viewing this topic.

Offline Bob La Londe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Including Navigation File for Site Uniformity
« on: August 31, 2008, 12:08:14 AM »
Powered by 4images 1.7.6

I tried to edit the header.html file to include the navigation bar included at teh top of all my other site apges, but it does not seem to process the file. 

I tried it with both php style include and SSI shtml style include statements. 

Code: [Select]
</head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<!-- INCLUDE ../../../topnav.html -->
<!--#include virtual="../../../topnav.html" -->

<br />

What do you suggest? 

The path to the gallery heaer file is  root/gallery/templates/default 
../../../topnav.html should be the path of the top navigation bar file relative to the template. 

This type of minor twek seems to work fine with my other scripts so that I have a uniform navigation bar on all pages.  What can I do with this one to make it work? 

I would like to add that I can cut and paste the raw code from the topnav file into the header file, and it seems to work fine.  It was two minor issues doing that.  For some reason there is a line feed processed ahead of the code, and of course if I modify my navigation bar I have to go to that file specifically and modify it seperately instead of just modifying one file, the navigation bar file. 
« Last Edit: August 31, 2008, 12:21:20 AM by Bob La Londe »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Including Navigation File for Site Uniformity
« Reply #1 on: August 31, 2008, 12:57:08 AM »
You can try use this instead:
Code: [Select]
</head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<?php
include "../../../topnav.html";
?>

<br />
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bob La Londe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Including Navigation File for Site Uniformity
« Reply #2 on: August 31, 2008, 01:22:19 AM »
Got me on the right path. 

Code: ("This Worked") [Select]
<?php
include "../topnav.html"
?>

I guess its being executed relative to the gallery directory rather than the default template directory.  I had assumed the header file was being parsed within the PHP file, but when I looked I found it was just being stuck in outside the PHP tags so it was not being parsed. 

Your suggestion to put PHP tags into the document got me on the right track.  Thanks. 

Offline Bob La Londe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Including Navigation File for Site Uniformity
« Reply #3 on: August 31, 2008, 01:24:57 AM »
I am still getting a line feed (blank line) before it loads the navigation file in the browser window. 

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Including Navigation File for Site Uniformity
« Reply #4 on: August 31, 2008, 01:44:00 AM »
I am still getting a line feed (blank line) before it loads the navigation file in the browser window. 
I'm not sure what do you mean?
A link to your gallery could be helpful ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bob La Londe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Including Navigation File for Site Uniformity
« Reply #5 on: August 31, 2008, 03:21:56 AM »
I am still getting a line feed (blank line) before it loads the navigation file in the browser window. 
I'm not sure what do you mean?
A link to your gallery could be helpful ;)

http://www.yumabassman.com/gallery/index.php

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Including Navigation File for Site Uniformity
« Reply #6 on: August 31, 2008, 03:49:18 AM »
you have an extra <br /> above {header} tag in home.html
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bob La Londe

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Including Navigation File for Site Uniformity
« Reply #7 on: August 31, 2008, 08:10:11 AM »
That was it thanks.  I never edited that file though.  Oh, well.  It fixed it.