kwcountdown A widget wrapper for Keith Wood's Jquery Countdown

  1. Requirements
  2. Usage
  3. Resources

Just a widget wrapper for Keith Wood's JQuery Countdown extension. Localization doesn't work yet.

Requirements

  • Yii 1.1 or above (might work for Yii 1.0 but haven't really tested there)
  • JQuery core script enabled

Usage

$seconds_of_date is equal to the Unix timestamp.

Example 1: For count down to a date, put this in the view:

$this->widget('ext.kwcountdown.KWCountdown', array('until_seconds' => $seconds_of_date));

Example 2: For count down from a date, put this in the view:

$this->widget('ext.kwcountdown.KWCountdown', array('since_seconds' => $seconds_of_date));

Example 3: With other display options such as different layout. See the link to Keith Wood's site for details about other options.

$this->widget('ext.kwcountdown.KWCountdown', array('until_seconds' => $seconds_of_date, 'options' => array('layout' => 'Till the new year: <b>{dn} {dl} {hnn}{sep}{mnn}{sep}{snn}</b>' )));

Resources

Keith Wood's JQuery Countdown

5 0
13 followers
720 downloads
Yii Version: 1.1
License: MIT
Category: User Interface
Developed by: Alarice Chan
Created on: Mar 31, 2012
Last updated: 11 years ago

Downloads

show all

Related Extensions