Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Navigation Problem With My Site, Is there any easier way?
BooZker
post Jun 28 2006, 09:56 PM
Post #1


Mad Scientist of 2006
*********

Group: [HOSTED]
Posts: 750
Joined: 27-April 06
From: Washington State in the USA
Member No.: 22,661
T17 GFX Crew



Well if you go to my site http://ojproductions.net and go to the home page you'll see the main nav bar above. With Home, Pictures, Video etc. I want to put a Forum button, but i have a lot of pages and i don't wanna put it in the nava bar in every page. I have like 50 pages (Under videos you'll see video pages on the left. That's a lot of them) So is there any easy way of putting it in all the pages without opening each webpage and adding it? I have Dreamweaver 8 also if you know how to do it with that.

If you know how THANKS A LOT. Check out my forum also haha http://ojproductions.net/forum
Go to the top of the page
 
+Quote Post
illdevilinc
post Jun 28 2006, 10:31 PM
Post #2


Premium Member
********

Group: Members
Posts: 157
Joined: 28-January 06
From: San leandro, California, USA
Member No.: 17,828



QUOTE(BooZker @ Jun 28 2006, 01:56 PM) *

Well if you go to my site http://ojproductions.net and go to the home page you'll see the main nav bar above. With Home, Pictures, Video etc. I want to put a Forum button, but i have a lot of pages and i don't wanna put it in the nava bar in every page. I have like 50 pages (Under videos you'll see video pages on the left. That's a lot of them) So is there any easy way of putting it in all the pages without opening each webpage and adding it? I have Dreamweaver 8 also if you know how to do it with that.

If you know how THANKS A LOT. Check out my forum also haha http://ojproductions.net/forum

Im not sure how to slove your problem right now, but there is a way that you can solve future problems like this. I recommend you put the navagation and the O&J Production image in a header. Im not sure if Dreamweaver will do this but with Microsoft Frontpage (if you have it) you can make a header and the header will automaticly go on everypage you have in that site. But the only problem with that is that you will have to delete the header and the image from every other page. But, after you get threw all of that you can simply use your header to make all changes to your navigation. If you want to do that but dont have frontpage let me know in a PM and i may be able to help you.
P.S.
I am a Dreamweaver and Frontpage user smile.gif
Go to the top of the page
 
+Quote Post
BooZker
post Jun 28 2006, 10:50 PM
Post #3


Mad Scientist of 2006
*********

Group: [HOSTED]
Posts: 750
Joined: 27-April 06
From: Washington State in the USA
Member No.: 22,661
T17 GFX Crew



OK i think ill PM you. Thanks. If there is anyone else that might know how to fix this post it please.
Go to the top of the page
 
+Quote Post
uiop
post Jun 28 2006, 11:09 PM
Post #4


Premium Member
********

Group: Members
Posts: 192
Joined: 20-December 05
Member No.: 15,962



I'm sorry if I didn't understand your question completely, but I'll try to answer it.

I belive that you could use something called SSI (Server Side Includes) and/or the PHP include command. You can find information on how to use both of these on Google.
Go to the top of the page
 
+Quote Post
BooZker
post Jun 28 2006, 11:11 PM
Post #5


Mad Scientist of 2006
*********

Group: [HOSTED]
Posts: 750
Joined: 27-April 06
From: Washington State in the USA
Member No.: 22,661
T17 GFX Crew



What should i look for though on google?
Go to the top of the page
 
+Quote Post
jlhaslip
post Jun 29 2006, 12:29 AM
Post #6


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 4,300
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol
myCENT:46.50



try w3cschools.com for information about php includes. Or php.net might be a better source..
Then maybe you could have two Headers. One "include" with the Forum Button and one without. Then you "include" the correct Header on each page you build, although it might be simpler to just have the Button on every page. IMHO.
Go to the top of the page
 
+Quote Post
Paul
post Jun 29 2006, 01:45 AM
Post #7


Premium Member
********

Group: Members
Posts: 174
Joined: 25-February 06
From: Austin, TX
Member No.: 19,113
myCENT:ZERO



I came accross this problem a few years ago (when I did not use PHP for websites).

Here is a solution:
  • FIRST, MAKE A BACKUP OF ALL the files you are going to use **VERY IMPORTANT**
  • rename all you files to .php (using a mass file renamer)
  • download this mass replace tool from <a href="http://www.simonhuggins.com/arctan/replacer/download/replacer.zip" target="_blank">http://www.simonhuggins.com/arctan/replace...ad/replacer.zip</a>
  • Now, copy the header code of your website
    QUOTE
    <tr>

    <td><img src="images/header.jpg" alt="logo" width="798" height="238" border="0" usemap="#Map" /></td>
    </tr>
    <tr>
    <td><img src="images/AK-tutTemplate02_05.jpg" alt="nav bar" width="21" height="28" /><a href="home.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/home2.jpg',1)"><img src="images/home.jpg" name="Image14" width="58" height="28" border="0" id="Image14" /></a><img src="images/AK-tutTemplate02_07.jpg" alt="nav bar" width="100" height="28" /><a href="videos.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','images/videos2.jpg',1)"><img src="images/videos.jpg" name="Image13" width="58" height="28" border="0" id="Image13" /></a><img src="images/AK-tutTemplate02_09.jpg" alt="nav bar" width="102" height="28" /><a href="pictures.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','images/pictures2.jpg',1)"><img src="images/pictures.jpg" name="Image15" width="58" height="28" border="0" id="Image15" /></a><img src="images/AK-tutTemplate02_11.jpg" alt="Nav bar" width="97" height="28" /><a href="downloads.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','images/downloads2.jpg',1)"><img src="images/downloads.jpg" name="Image16" width="98" height="28" border="0" id="Image16" /></a><img src="images/AK-tutTemplate02_13.jpg" alt="nav bar" width="89" height="28" /><a href="contactus.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','images/contactus2.jpg',1)"><img src="images/contactus.jpg" name="Image17" width="96" height="28" border="0" id="Image17" /></a><img src="images/AK-tutTemplate02_15.jpg" alt="nav bar" width="21" height="28" /></td>
    </tr>
    and paste it in a text file (notepad)
  • Now open the replace utility from step 2
  • There are four fields in this utility: Base Path, Find, Replace, and extentions
  • Under base path, browse to the location of all your site files
  • Under find, paste the new header code (with the forums link)
  • under extentions enter 'php'
  • And for the replace field, enter
    CODE
    <?php include("http://ojproductions.net/inc/header.php"); ?>
  • Now, create a file called header.php and paste the NEW header code in it. And upload this file to a folder called 'inc'
  • Now go back to the replace utility, and find '.html' and replace with '.php' (Since we have changed file extentions, we will need to change internal links.)
  • Upload all the files to your server and it should work fine
I reccomend creating a separate footer and header file and including them in the templates. This will make it simpler to edit the template and links wink.gif

If you need any help PM me biggrin.gif

This post has been edited by Paul: Jun 29 2006, 01:47 AM
Go to the top of the page
 
+Quote Post
BooZker
post Jun 30 2006, 01:10 AM
Post #8


Mad Scientist of 2006
*********

Group: [HOSTED]
Posts: 750
Joined: 27-April 06
From: Washington State in the USA
Member No.: 22,661
T17 GFX Crew



QUOTE
I came accross this problem a few years ago (when I did not use PHP for websites).

Here is a solution:
FIRST, MAKE A BACKUP OF ALL the files you are going to use **VERY IMPORTANT**
rename all you files to .php (using a mass file renamer)
download this mass replace tool from <a href="http://www.simonhuggins.com/arctan/replacer/download/replacer.zip" target="_blank">http://www.simonhuggins.com/arctan/replace...ad/replacer.zip</a>
Now, copy the header code of your website
QUOTE
<tr>

<td><img src="images/header.jpg" alt="logo" width="798" height="238" border="0" usemap="#Map" /></td>
</tr>
<tr>
<td><img src="images/AK-tutTemplate02_05.jpg" alt="nav bar" width="21" height="28" /><a href="home.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/home2.jpg',1)"><img src="images/home.jpg" name="Image14" width="58" height="28" border="0" id="Image14" /></a><img src="images/AK-tutTemplate02_07.jpg" alt="nav bar" width="100" height="28" /><a href="videos.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','images/videos2.jpg',1)"><img src="images/videos.jpg" name="Image13" width="58" height="28" border="0" id="Image13" /></a><img src="images/AK-tutTemplate02_09.jpg" alt="nav bar" width="102" height="28" /><a href="pictures.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','images/pictures2.jpg',1)"><img src="images/pictures.jpg" name="Image15" width="58" height="28" border="0" id="Image15" /></a><img src="images/AK-tutTemplate02_11.jpg" alt="Nav bar" width="97" height="28" /><a href="downloads.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','images/downloads2.jpg',1)"><img src="images/downloads.jpg" name="Image16" width="98" height="28" border="0" id="Image16" /></a><img src="images/AK-tutTemplate02_13.jpg" alt="nav bar" width="89" height="28" /><a href="contactus.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','images/contactus2.jpg',1)"><img src="images/contactus.jpg" name="Image17" width="96" height="28" border="0" id="Image17" /></a><img src="images/AK-tutTemplate02_15.jpg" alt="nav bar" width="21" height="28" /></td>
</tr>
and paste it in a text file (notepad)
Now open the replace utility from step 2
There are four fields in this utility: Base Path, Find, Replace, and extentions
Under base path, browse to the location of all your site files
Under find, paste the new header code (with the forums link)
under extentions enter 'php'
And for the replace field, enter CODE<?php include("http://ojproductions.net/inc/header.php"); ?>
Now, create a file called header.php and paste the NEW header code in it. And upload this file to a folder called 'inc'
Now go back to the replace utility, and find '.html' and replace with '.php' (Since we have changed file extentions, we will need to change internal links.)
Upload all the files to your server and it should work fine
I reccomend creating a separate footer and header file and including them in the templates. This will make it simpler to edit the template and links

If you need any help PM me


I have done this multiple times and i can't get it to work. I have created the file and folder for the header. I have pasted the NEW header in the 'find' section and in the PHP file in the 'inc' folder, but it never turns out right. here is what it says the last time i did it
QUOTE

> File: C:\Documents and Settings\Oscar\My Documents\O&J Productions BETA\inc\header.php [1 change]
Finished. Time taken: <1s
659 files searched.
1 replacements made.
1 files updated.
No changes made. That was only a test run.
---------------------------