Incorporating s9y in existing CSS web site

Having trouble installing serendipity?
Post Reply
don0don
Regular
Posts: 21
Joined: Thu Sep 24, 2009 5:32 pm

Incorporating s9y in existing CSS web site

Post by don0don »

Last October, Garvin and others helped me incorporate Serendipity into my site using the custom Smarty template system.

Now, I have tried following the same instructions in order to incorporate Serendipity into another site and am running into a bizarre problem. All the links associated with the Javascript menu system, Flash, etc of the main site are changed on the Serendipity side to add the Serendipity root to them. For example, when you click the "About Us" menu button in the menubar on the left the "http://[domain_name].com/about.htm" is changed to "http://[domain_name]/blog/about.htm" -- which, of course, leads to an Error 404.

Also, the links for various images and flash elements are also effected in the same way.

I have tried using absolute paths in the index.tpl, but that hasn't eliminated the problem.

Here is the home page of the site in question: http://www.findsafeharbour.com

Here is the blog home page: http://www.findsafeharbour.com/blog/

Thanks!
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Incorporating s9y in existing CSS web site

Post by Don Chambers »

What is your navigation code in index.tpl?
=Don=
don0don
Regular
Posts: 21
Joined: Thu Sep 24, 2009 5:32 pm

Re: Incorporating s9y in existing CSS web site

Post by don0don »

Don Chambers wrote:What is your navigation code in index.tpl?
I don't know what you mean by navigation code. The navigation menu is generated by a menu.js Javascript file, which is invoked prior to the content table in which the blog content appears. Here is the index.tpl (which, as I said, contains full paths rather than relative paths):

Code: Select all

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

    <title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
    <meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" />
    <meta name="Powered-By" content="Serendipity v.{$head_version}" />
    <link rel="stylesheet" type="text/css" href="{$head_link_stylesheet}" />
    <link rel="alternate"  type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" />
    <link rel="alternate"  type="application/x.atom+xml"  title="{$blogTitle} Atom feed"  href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" />
{if $entry_id}
    <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" />
{/if}

{serendipity_hookPlugin hook="frontend_header"}

<!-- CHANGE THE NEXT THREE LINES -->

<meta name="Description" content="Weblog of the Safe Harbour Insurance Group, Boca Raton, Florida.">
<meta name="KeyWords" content="blog, weblog, health insurance, life insurance, disability insurance, long term care insurance, Boca Raton, Palm Beach County, Florida, independent insuarnce agents">

<!-- CHANGE THE ABOVE THREE LINES -->

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Publisher" content="PC Handyman LLC http://www.pc-handyman.net">
<meta http-equiv="Content-Language" content="en">
<meta name="Rating" content="General">



<link rel="StyleSheet" href="http://www.findsafeharbour.com/corporatestyle.css" type="text/css">
<link rel="StyleSheet" href="http://www.findsafeharbour.com/lytebox.css" type="text/css">


<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/javascripts.js"></script>
<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/pop-closeup.js"></script>
<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/lytebox.js"></script>


</head>

<body>


<!-- PAGE TABLE -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="left" valign="top">

<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/header.js"></script>




<!-- SPLIT TABLE -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="left" valign="top" class="menubackground menuwidth pageheight printhide">
<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/menu.js"></script>
<img src="/picts/spacer.gif" height="10" width="175" border="0" class="menuwidth" title="image"><br>
</td><td align="left" valign="top" class="backgrounds">




<!-- IMAGE TABLE AREA -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td width="575">
<img src="http://www.findsafeharbour.com/picts/contact.jpg" border="0" width="575" height="100" title="image"><br>
</td><td class="pictureend">
<img src="http://www.findsafeharbour.com/picts/spacer.gif" height="80" width="5" border="0" title="image"><br>
</td></tr><tr><td class="pagebars" colspan="2">
<img src="http://www.findsafeharbour.com/picts/spacer.gif" height="1" width="5" border="0" title="image"><br>
</td></tr></table>
<!-- IMAGE TABLE AREA -->


<!-- CONTENT TABLE -->

<div id="serendipity_banner">
    <h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle}</a></h1>
    <h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>
</div>

<table id="mainpane">
    <tr>
{if $leftSidebarElements > 0}
        <td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
{/if}
        <td id="content" valign="top">{$CONTENT}</td>
{if $rightSidebarElements > 0}
        <td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
{/if}
    </tr>
</table>

{serendipity_hookPlugin hook="frontend_footer"}

<!-- END CONTENT TABLE -->




</td></tr></table>
<!-- END SPLIT TABLE -->




<!-- PAGE TABLE -->
</td></tr><tr><td valign="top">




<!-- BOTTOM BAR -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="footerbar">
<img src="http://www.findsafeharbour.com/picts/spacer.gif" height="1" width="15" border="0" title="image"><br>
</td></tr></table>




<!-- COPYRIGHT -->
<table cellpadding="0" cellspacing="10" border="0" width="100%" class="footer"><tr><td align="left" valign="top">
<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/copyright.js"></script>
</td><td align="right" valign="top">
<script language="JavaScript" type="text/javascript" src="http://www.findsafeharbour.com/copyright-allwebco.js"></script>
</td></tr></table>
<!-- COPYRIGHT -->




</td></tr></table>
<!-- END PAGE TABLE -->

</body>
</html>
Thanks for taking a look at this for me.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Incorporating s9y in existing CSS web site

Post by Don Chambers »

My guess is that your js is not specifying the root domain and is only using a relative filename, such as about.php instead of http://www.yourdomainname.com/about.php.
=Don=
don0don
Regular
Posts: 21
Joined: Thu Sep 24, 2009 5:32 pm

Re: Incorporating s9y in existing CSS web site

Post by don0don »

Don Chambers wrote:My guess is that your js is not specifying the root domain and is only using a relative filename, such as about.php instead of http://www.yourdomainname.com/about.php.
Excellent! Thank you! That solved the problem with errant navigation and a couple of other formatting oddities.

However, my Flash header is still missing, and as far as I can tell I have replaced all relative paths with absolute paths, so there should be no problem in the logo.swf file being found.

Here's the header.js code:

Code: Select all

<!-- Begin

// NOTE: If you use a ' add a slash before it like this \'


var flashcolor		= "3E3E4A"		// FLASH BACKGROUND COLOR
var color		= "3E3E4A"		// HEADER BACKGROUND COLOR
var flashheight		= "100"			// HEIGHT OF THE FLASH (IN PIXELS)
var flashwidth		= "650"			// WIDTH OF THE FLASH (IN PIXELS)
var showimage 		= "yes"	 		// SHOW A SMALL IMAGE ON THE HEADER RIGHT SIDE
var imaglink		= "http://www.findsafeharbour.com/about.htm"		// SMALL IMAGE PAGE LINK
var showbar		= "yes"			// SHOW BAR UNDER HEADER






// COPYRIGHT 2008 © Allwebco Design Corporation
// Unauthorized use or sale of this script is strictly prohibited by law

// YOU DO NOT NEED TO EDIT BELOW THIS LINE

// START FLASH HEADER



document.write('<table cellpadding="0" cellspacing="0" border="0" width="100%" BGCOLOR="#'+color+'"><tr><td ALIGN="LEFT">');
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+flashwidth+'" HEIGHT="'+flashheight+'" id="logo">');
document.write('<PARAM NAME="movie" VALUE="http://www.findsafeharbour.com/logo.swf">');
document.write('<PARAM NAME="quality" VALUE="high">');
document.write('<PARAM NAME="wmode" VALUE="transparent">');
document.write('<PARAM NAME="bgcolor" VALUE="#'+flashcolor+'">');
document.write('<EMBED src="logo.swf" quality="high" wmode="transparent" bgcolor="#'+flashcolor+'"  WIDTH="'+flashwidth+'" HEIGHT="'+flashheight+'" NAME="logo" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT><br>');
document.write('</td><td align="center" width="100">');
   if (showimage == "yes") {
document.write('<a href="'+imaglink+'"><img src="http://www.findsafeharbour.com/picts/header_image.jpg" border="0" class="borders"></a><br>');
}
else {
document.write('<img src="http://www.findsafeharbour.com/picts/spacer.gif" width="10" height="10"><br>');
}
document.write('</td></tr></table>');



// HEADER BAR

   if (showbar == "yes") {
document.write('<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="pagebars">');
document.write('<img src="http://www.findsafeharbour.com/picts/spacer.gif" height="1" width="15" border="0"><br>');
document.write('</td></tr></table>');
}



// START SOUND CODE DO NOT DELETE -- REMOVE IN THE MENU.JS ONLY


function Sound()
{
if (document.all)
 {
  document.all.sound.src = "http://www.findsafeharbour.com/click.wav";
 }
}


document.write('<div id="soundlocation" style="left: -50px; position: absolute; top: 5px;">');
document.write('<bgsound id="sound" />');
document.write('</div>');


// END SOUND CODE




//  End -->
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Incorporating s9y in existing CSS web site

Post by Don Chambers »

Keep looking for lack of absolute paths... for instance, I see '<EMBED src="logo.swf"
=Don=
don0don
Regular
Posts: 21
Joined: Thu Sep 24, 2009 5:32 pm

Re: Incorporating s9y in existing CSS web site

Post by don0don »

Don Chambers wrote:Keep looking for lack of absolute paths... for instance, I see '<EMBED src="logo.swf"
Ahhh .... brilliant! I totally missed that one and that was the problem!

Thanks so much for your help!

Don
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Incorporating s9y in existing CSS web site

Post by Don Chambers »

No problem :wink:
=Don=
Post Reply