Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Help with DynamicDrive javascript

posts: 130

Hello - I work at a library and we are trying to add some script found at dynamic drive to our tikiwiki website at http://dclibrary.us......thanks to this community our library tikiwiki site is moving right along....I believe there is some kind of combination of editing a .tpl file because of the part of the script that needs to be in the HEAD section, and then some use of the wiki js plugin, but could someone spell it out a little clearer for me? Thanks!

The script we are trying to add is a scrolling rss....
http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/

I have moved the script to /var/www/tiki/scripts/rsspausescroller/ and can run it fine from:

http://web1.co.douglas.or.us/tiki/scripts/rsspausescroller/demo.htm

posts: 3665 United States
  • For the portion of the script that needs to be in the HEAD section, you'll need to manually edit the header.tpl template.
    NOTE: Do not use Tiki's internal template editor — it will strip out all of the SCRIPT elements.

  • For the portion the actual page, you'll need to use the JS plugin:
    Copy to clipboard
    {JS()} //new rsspausescroller(RSS_id, divId, divClass, delay, linktarget, optionalswitch) //1) RSS_id: "Array key of RSS feed in scrollerbridge.php script" //2) divId: "ID of DIV to display ticker in. DIV is dynamically created" //3) divClass: "Class name of this ticker, for styling purposes" //4) delay: delay between message change, in milliseconds //5) linktarget: Target of links inside RSS feed. Set to "" for current page. //6) optionalswitch: "optional arbitrary" string to create additional logic for formatrssmessage() to use. // By default, optionalswitch supports "date", or "date+description" to also show these parts of a RSS feed. new rsspausescroller("cnn", "pscroller1", "rssclass", 3000, "_new") document.write("") //add a divider for demo new rsspausescroller("dynamicdrive", "pscroller2", "rssclass", 3000, "", "date+description") {JS}



HTH,

-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage


posts: 130

Thank you so much for your quick reply....

I tried the above and it doesnt look like it is working.....
Here is the url to the page:
http://www.dclibrary.us/tiki-editpage.php?page=scrollingrssfeeds

If I view the source, I believe I have the code in the header.tpl...the code is located at /var/www/tiki/scripts/rsspausescroller/



In the wiki portion, I have the following:

Image
Copy to clipboard
{JS()} new rsspausescroller("dynamicdrive", "pscroller2", "rssclass", 3000, "", "date+description") {JS}


Any ideas?


posts: 130

When I look viewsource on the page, I see the following code in place of the new rsspausescroller command....is all the extra coding in the parenthesis causing the problem, and if so, how do I stop it?

Image
Copy to clipboard
new rsspausescroller("dynamicdrive", "pscroller2", "rssclass", 3000, "", "date+description")

posts: 130

Ooops! Sorry about that, I was trying some different things yesterday and left it on one of my attempts to resolve.....

It is now set to using the js plugin....when I look at the source, I see alot of additional code within the js tags blocks, almost as if it isnt recognizing that it is a javascript block and it shouldnt parse....view the source and search for rsspausescroller and you will see what i mean.....

thanks for your help on this....I, and I am sure many others will learn alot......

posts: 3665 United States

Hm... looks like it is parsing everything as wiki text, when it shouldn't.

  • What Tiki version are you using?
  • Do you have the Allow HTML option enabled?
  • Try replacing the double quotes ( " ) with single quotes ( ' ).


Do you have a sandbox page available?


HTH,

-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage


posts: 130

I am using a very early version of 1.10......

I tried using the ' instead of " it didnt work but it didnt parse it like it did before....

Allow HTML appears to be enabled.....

JS plugin does work on some level because we use it to call another javascript file like this....

Image
Copy to clipboard
{JS(file="cville.js")}{JS}

posts: 130
Any alternatives? Should I see if I have an old version of the JS plugin and a newser one might work better? Any angle on putting this into a module and see if it will work?