Hi,
I am stuck at adding that RSS ticker JS to template.
Would really appreciate if somebody could let me know what am i doing wrong, as I've been scratching my head on this for whole weekend ! :)
Here's what i did so far:
To mysite/javascript I have put two files: rssticker.js and direction in mysite/javascript/lastrss/ with bridge.php and lastRSS.php files
To my theme/client/templates/Page.ss i have put in <head>:
<script src="mysite/javascript/rssticker.js" type="text/javascript">
/***********************************************
* Advanced RSS Ticker (Ajax invocation)- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<style type="text/css">
/*Sample CSS to style the two tickers in the demo*/
.cnnclass{
width: 400px;
padding: 5px;
background-color: #F3F3F3;
border: 1px solid black;
margin-bottom: 1em;
filter:progid:DXImageTransform.Microsoft.alpha(opacity=80); /*Specify fade effect in IE. Remove if desired.*/
-moz-opacity: 0.8; /*Specify fade effect in Firefox. Remove if desired.*/
}
.cnnclass a{
text-decoration: none;
}
.bbcclass{
width: 400px;
padding: 6px;
background-color: lightyellow;
border: 1px solid #004A00;
}
.rsstitle{ /*shared class for all title elements in an RSS feed*/
font-weight: bold;
}
.rssdate{ /*shared class for all date elements in an RSS feed*/
color: gray;
font-size: 85%;
}
.rssdescription{ /*shared class for all description elements in an RSS feed*/
}
</style>
And in <body>:
<div style="height: 150px">
<script type="text/javascript">
//rssticker_ajax(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
//1) RSS_id: "Array key of RSS feed in PHP script"
//2) cachetime: Time to cache the feed in minutes (0 for no cache)
//3) divId: "ID of DIV to display ticker in. DIV dynamically created"
//4) divClass: "Class name of this ticker, for styling purposes"
//5) delay: delay between message change, in milliseconds
//6) optionalswitch: "optional arbitrary" string to create additional logic in call back function
document.write("CNN News: (Fade Effect enabled. Title+date shown)")
new rssticker_ajax("CNN", 600, "cnnbox", "cnnclass", 3000, "date")
document.write("<br />BBC News: (Title+date+description shown)")
new rssticker_ajax("BBC", 1200, "ddbox", "bbcclass", 3500, "date+description")
</script>
</div>
This causes that new div to appear on website. I can see that rssticker.js from <head> and the script from <body> are both visible in firebug. All connections to those other php files, Im calling in using /mysite/javascript/ path with site root defined.
I cant make those feeds to appear on my site.
The RSS JS files are taken from:
http://www.dynamicdrive.com/dynamicindex17/rsstickerajax/index.htm
Please help ! Im desperate!
Qlex