bbcnewsticker A simple BBC style news ticker

  1. Requirements
  2. Usage
  3. Resources

This widget is a wrapper for the jQuery plugin BBCnewsTicker.

It's a news ticker in the style of that used on the BBC news site.

Requirements

Yii 1.6 or above

Usage

  • Extract the content of the zip file into protected/extensions

  • Add the widget code in the view file.

You have to set the items array (or more options). The text is the 'key'. If you want to render the text as link you have to assign a 'value' too.

$this->widget('ext.bbcnewsticker.EBBCNewsTicker',
			array('items'=>array(
			               'Yii Framework is great',
			               'Download from here'=>'http://www.yiiframework.com/download/',
                                        ...
			               )
			 )
);

All options:

$this->widget('ext.bbcnewsticker.EBBCNewsTicker',
			array('items'=>array(
			               'Yii Framework is great',
			               'Download from here'=>'http://www.yiiframework.com/download/',
                                        ...
			               )
                              'wrapperTag'=>'div', //if you want a wrapper around the newsticker
                              'wrapperHtmlOptions'=>array('class'=>'mynewsticker'),
                              'options'=>array(
		'tickerRate' => 100, // time gap between display of each letter (ms)
		'startDelay' => 100, // delay before first run of the ticker (ms)
		'loopDelay' => 2000, //time for which full text of each item is shown at end of print-out (ms)
		'placeHolder1' => ' |', // character placeholder shown on even loops
		'placeHolder2' => '_', // character placeholder shown on odd loops
		'controls' => false,  // show resume / stop controls (see below for the markup added)
		'ownControls' => false,  // use own markup for controls (sets controls = true)
		'stopOnHover' => true,  // trigger the stop action on hovering over the links
		'resumeOffHover' => false  // trigger the resume action on mouseout from the links. NB the links must be block display for this to work reliably with stopOnHover
	)   
			 )
);

Customizing the layout

  • Set the wrapperTag and assign your own css-classes to the wrapperHtmlOptions
  • Edit the css file: assets/bbcnewticker.css

Resources

3 0
2 followers
480 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Joblo
Created on: Sep 24, 2011
Last updated: 13 years ago

Downloads

show all