Summary: jQuery based Newsticker
Version: 2011-03-24
Prerequisites: none
Status: Alpha
Maintainer: Webbird
Categories: WikiTrails, RSS
Users: (view? / edit)
Discussion: Jticker-Talk?

Questions answered by this recipe

How can I show list items (Trail) or an RSS feed as a newsticker?


The jticker Recipe is based on jQuery (JavaScript Library) and the jQuery Plugin "InnerFade". It creates a newsticker like presentation from a list or an RSS feed. (Demo page will be available soon.)


Download the jticker.zipΔ file and extract locally. It contains the following files

  + jticker.php
  + jticker
    |-- jquery.easing.js
    |-- jquery.innerfade.js
    |-- jticker.xslt
    |-- style.css

Copy the jticker.php into your cookbook directory on your server and the jticker folder into your (farm) pub-directory. Then add the following to your localization file



Please note: The configuration options must be set before the include (see above)!

This is the URL to load the jQuery Core from. Default is https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js. You may change this if you have a local jQuery installation.

Animation speed in milliseconds. (higher values = slower). Default: 2000

Time in milliseconds to show each item (higher values = longer). Default: 5000

Easing effect to use. Default: 'linear'

Height of the ticker container. You may have to tweak this value. Default: '1em'

To tweak the layout, patch the style.css.

Example (put into your [farm]config.php)



Newsticker from unordered list

To create a newsticker from a page containing a list, use this markup:

    (:pagelist trail=<TrailPage> fmt=jticker:)

Newsticker from RSS feed

To load an RSS feed an create a ticker from the contents, use:

    (:jtickerRSS feed=<Feed-URL> [cachetime=<time>] [cachename=<Name>] [maxitems=<Number>] :)

The only option required is (of course) feed. Put the URL of the feed there.

As the code is based on the InlineRSS Recipe, read that recipe for the other options.


Change log / Release notes

Fixed for use with PHP 5.5
First release.

See also





See discussion at Jticker-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.