Just a widget wrapper for Keith Wood's JQuery Countdown extension. Localization doesn't work yet.
$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>' )));
Total 4 comments
How can I convert mysql datetime to UNIX timestamp ? My problem is: <br/> 1. now: 2012-05-15 03:05:00 <br/> 2. endDate: 2012-05-15 08:05:00 <br/> but kwcountdown doesn't count down. if i use strtotime(). it only convert date (not time) to timestamp.
i change my code to:
but it also doesn't work.
function convertDatetimeToTimestamp:
help me, please !!!
Where you implement the countdown timer, be sure to set a unique element_id:
Next, on line #87 of KWCountdown.php, change this:
to this:
What will be the format and value of $seconds_of_date.
because some one don't always put extension under the extensions dir . so do a little modifying :
to:
Leave a comment
Please login to leave your comment.