PDA

View Full Version : Question about RSS Ticker Script



finkdawg5
10-15-2006, 12:29 AM
Hi all,

I'm using Dynamicdrive's RSS ticker script with Ajax invocation from http://www.dynamicdrive.com/dynamicindex17/rsstickerajax/index.htm



I have the script set up and it works well, but I'm woefully unfamiliar with javascript and ajax, and it's giving me quite the headache. If you look at the page I'm workin on http://www.newtonpolice.org/test/ I have the script running, but I want to add a link underneath the script, that basically takes the link from the news heading and copies it below the script where it says "read entire story". Ive tried messing with this for quite a few days now with no luck.



Is anyone familiar enough with javascript or this script in particular to help with with this? Any help, even guesses would be appreciated at this point. :p Thanks in advance!

ddadmin
10-15-2006, 06:50 AM
You can in fact customize the arrangement of the various components of the RSS entry by going inside rssticker.js, and locating this portion of the script:


var linktitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">'+this.title[this.pointer]+'</a></div>'
var description='<div class="rssdescription">'+this.description[this.pointer]+'</div>'
var feeddate='<div class="rssdate">'+this.pubdate[this.pointer]+'</div>'
if (this.logicswitch.indexOf("description")==-1) description=""
if (this.logicswitch.indexOf("date")==-1) feeddate=""
var tickercontent=linktitle+feeddate+description //STRING FOR FEED CONTENTS

In your case, the changes would look something like:


var linktitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">'+this.title[this.pointer]+'</a></div>'
var description='<div class="rssdescription">'+this.description[this.pointer]+'</div>'
var readmoretitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">Read entire story</a></div>'
var feeddate='<div class="rssdate">'+this.pubdate[this.pointer]+'</div>'
if (this.logicswitch.indexOf("description")==-1) description=""
if (this.logicswitch.indexOf("date")==-1) feeddate=""
var tickercontent=linktitle+feeddate+description+readmoretitle //STRING FOR FEED CONTENTS

Parts in red are new.

finkdawg5
10-15-2006, 06:50 PM
You are a genious! Thank you so much! :D