...

View Full Version : Header isn't showing up on pages any more, though code is there... (I think.)



toraymoray
06-11-2012, 07:00 PM
So I am trying to fix a problem that arose 3 months ago. Someone on staff made a change to the index (or maybe it was the header, i can't tell anymore) and the header/nav bar disappeared from the rest of the pages in the site. The header still appears on the index page, but that's it. If you go to www.mchistory.org/mcmh_about_museum.html you will see the header cuz I copy & pasted the code in there as one of my experiments.

www.mchistory.org (http://www.mchistory.org) is our index page.

So, i am trying to replace it, obviously without copy & pasting the code into every single one of the hundreds of pages we have in our site. It seems like the developer used java to do this, since the code reads as follows[ICODE]: <script src="header.html" language="javascript"> . This appears on pages where the header does NOT come up (http://www.mchistory.org/mcmh_exhibit_program.html).

oy! why isn't it there? i've stared at it for hours trying to figure it out, scanned forums, etc. If i just had ONE page that the header actually worked on I could probably figure out the problem and fix it. Without that I'm blind and desperately seeking help from one of you fine smart folks. I am open to any suggestions!

We are a non-profit institution, hence why I am coming to you instead of contacting the people who made our site. We don't have a contract therefore we get little to no customer service from them.

Thanks in advance. i'm prepared to answer any questions you have! and sorry the HTML is such a mess on some of the pages. I didn't do it... but I'm not saying i would have done a better job :)

toraymoray
06-11-2012, 07:10 PM
Also, i don't know if it helps, but one of the files i see are header.php, header.bak, index.bak, index.catfile

I don't know if that helps give an idea of how they may have put the header on each page.. but just in case.

SeattleMicah
06-11-2012, 07:13 PM
hi TorayMoray.

Lets try to solve newsandevents.php'

Before you do this actually can you copy and paste the code from your newsandevents.php file, reason being is because you cannot view php when viewing the source online, and I do not want to missplace any php that may be in that file which I cannot see in the source.





<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<br>
<title>About the Museum</title>
<table style="width: 754px; text-align: left; margin-left: auto;
margin-right: auto; background-color: rgb(255, 255, 255);"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style=" background-color: rgb(95, 122, 115);" colspan="8"><img
src="images/topleftcorner.jpg" alt="" width="468"
height="34"></td>
<td style="background-color: rgb(255, 255, 255);" colspan="3"><a
href="pdfs/newsletter%20pdfs/2012%20%20Mar-Apr-May%20%20Color.pdf"><img
src="images/newstletter.jpg" alt="" style="border: 0px
solid; width: 286px; height: 34px; border: 0px solid;"></a></td>
</tr>
<tr>
<td colspan="2"><img src="images/topleftToolbar_blank.jpg"
alt="" width="130" height="15"></td>
<td colspan="2"><a href="donateNow.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'donate1\',\'\',\'images/donateNowOn.jpg\',1)"><img
src="images/donateNowOff.jpg" alt="Donate Now"
name="donate1" width="99" border="0" height="15"></a></td>
<td><a href="membership.html" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'membership1\',\'\',\'images/membershipOn.jpg\',1)"><img
src="images/membershipOff.jpg" alt="" name="membership1"
width="87" border="0" height="15"></a></td>
<td colspan="2"><a href="#" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'store1\',\'\',\'images/storeOn.jpg\',1)"><img
src="images/storeOff.jpg" alt="" name="store1"
width="101" border="0" height="15"></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'links1\',\'\',\'images/linksOn.jpg\',1)"><img
src="images/linksOff.jpg" alt="" name="links1"
width="51" border="0" height="15"></a></td>
<td style=" background-color: rgb(95, 122, 115);" colspan="3"
rowspan="2"><a
href="mcmh_Greening%20of%20the%20Prairie.html"><img alt=""
src="images/irishnowopenbutton.jpg" style="border: 0px
solid; border: 0px solid; width: 286px; height: 90px;"></a></td>
</tr>
<tr>
<td style=" background-color: rgb(95, 122, 115);" colspan="8"><a
href="http://www.mchistory.org/" target="_self"><img
src="images/logo.jpg" alt="" width="468" border="0"
height="75"></a></td>
</tr>
<tr>
<td><a href="http://www.mchistory.org/mcmh_plan_visit.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'planvisit1\',\'\',\'images/planVisitOn.jpg\',1)"><img
src="images/planVisitOff.jpg" alt="" name="planvisit1"
width="114" border="0" height="20"></a></td>
<td colspan="2"><a href="newsandevents.php"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'newsevents1\',\'\',\'images/newsEventsOn.jpg\',1)"><img
src="images/newsEventsOff.jpg" alt="" name="newsevents1"
width="105" border="0" height="20"></a></td>
<td colspan="3"><a href="mcmh_about_museum.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'aboutmuseum1\',\'\',\'images/aboutMuseumOn.jpg\',1)"><img
src="images/aboutMuseumOff.jpg" alt=""
name="aboutmuseum1" width="136" border="0" height="20"></a></td>
<td colspan="3"><a href="mcmh_exhibit_program.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'exhibitsprograms1\',\'\',\'images/exhibitsProgramsOn.jpg\',1)"><img
src="images/exhibitsProgramsOff.jpg" alt=""
name="exhibitsprograms1" width="144" border="0"
height="20"></a></td>
<td><a href="mcmh_research.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'collections1\',\'\',\'images/collectionsOn.jpg\',1)"><img
src="images/collectionsOff.jpg" alt=""
name="collections1" width="170" border="0" height="20"></a></td>
<td><a href="mcmh_education.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage(\'education1\',\'\',\'images/educationOn.jpg\',1)"><img
src="images/educationOff.jpg" alt="" name="education1"
width="85" border="0" height="20"></a></td>
</tr>
<tr>
<td><img src="images/spacer.gif" alt="" width="114" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="16" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="89" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="10" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="87" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="39" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="62" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="51" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="31" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="170" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="85" height="1"></td>
</tr>
</tbody>
</table>

Above is the proper code for your header...

copy that and replace on your newsandevents.php file the code below.



<html>

<head>

SeattleMicah
06-11-2012, 07:14 PM
It may be an issue you will have to resolve with php and "including" the header into your designated file but try that first.

PLEASE REMEMBER TO BACK THINGS UP

toraymoray
06-11-2012, 07:30 PM
ok, i did that. You happened to pick the page that I never ever use. It is a php, and our marketing director is in charge of editing that page. I don't even know what a php is really. When i opened it in seamonkey and put the header html in, i saved it with a different name as not overwrite the file. it saved as .html instead of .php. here is the link: http://www.mchistory.org/newsandevents_withheader.html

SeattleMicah
06-11-2012, 07:32 PM
Can you please save it as .php

toraymoray
06-11-2012, 07:48 PM
I don't think I can with Seamonkey. If I can I don't know how. Our marketing director is the only one who edits this page, and he just edits using lucid calendar, and the news and announcements sections are edited by him in sea monkey separately. The rest of the pages are just .html pages and those are the ones I know better.

SeattleMicah
06-11-2012, 08:14 PM
Ok no problem we can try another page. (All you need to do to save a php file is save it as .php)

Lets try and resolve mcmh_exhibit_program.html.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

replace that code with the code I mentioned above.

toraymoray
06-11-2012, 10:35 PM
ok, did that. looks good.

toraymoray
06-11-2012, 10:37 PM
(as for the .php thing- I saved something as a .php and now it is a .php.html ... is that right? or is there an auto-save-as-html-option that i need to adjust to make it save as just a .php?)

SeattleMicah
06-11-2012, 10:41 PM
can you link the new mcmh_exhibit_program.html please?

it should just be .php just like http://mchistory.org/newsandevents.php

you should just be able to save it as the file name "newsandevents" and add .php, or change the selection box right below that gives the php option.

toraymoray
06-11-2012, 10:43 PM
http://www.mchistory.org/mcmh_exhibit_program.html

SeattleMicah
06-11-2012, 10:45 PM
didn't fix it?

toraymoray
06-11-2012, 10:47 PM
the header is showing up on that page. I know how to make the header show up on individual pages by copy and pasting the html like we just did. But i need to figure out how to get each page to show the header with out me having to copy past it 150 times. At one time it was like that, and i don't know how it broke... but now i'm trying to fix it.

toraymoray
06-11-2012, 10:52 PM
I've thought about doing a php include, but i was reading about it and apparently different servers read that code differently? is that true? because i guess i need to know what the right questions are to ask my server providers then. and i have to be smart about that because they charge a ridiculous amount to answer a simple question. It's a real bummer.

SeattleMicah
06-11-2012, 10:58 PM
try pasting where <--incude header--> is



<?php
include("header.php");
?>




</head>
<body style="margin:0;">


<!--- include header --->


<script language="javascript" src="header.html">
</script>
<div align="center">

this is for the newsandevents.php file.

SeattleMicah
06-11-2012, 10:58 PM
you can only use this include technique when your file if of PHP nature, if it is .html you will have to copy paste like we did

toraymoray
06-13-2012, 04:41 PM
***I tried sending this as a PM twice and i don't think it went through... so here it is again. apologies if you actually did receive this already.***

OK i put the code where you said to, it looks like this:

</head>
<body style="margin:0;">
<!--- include header --->
<!--?php
include("header.php");
?-->
<script language="javascript" src="header.html">

you can see the page here, it doesn't have a header.

toraymoray
06-13-2012, 04:42 PM
Oops, here is the link:

http://www.mchistory.org/newsandevents2.php

toraymoray
06-13-2012, 06:32 PM
Since the header is just a bunch of images, can I put the header info in the CSS part? I just don't think that I can go through each page (i'm sure there are hundreds) and re-save each as a php and then include the header.php.

I have an intern here who suggested including it as part of the CSS since its just images in the header. Could that work?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum