11
shank
Re: I would like a module that can do a countdown ticker
  • 2006/1/22 1:24

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Now if some one could figure out how to make this automatically update so you could make it say there are so many days till the next event on the tinyevents module.
s l s h a n k l e @ b e l l s o u t h . n e t

12
bradburn
Re: I would like a module that can do a countdown ticker
  • 2006/1/30 15:53

  • bradburn

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/1/26


Quote:

JMorris wrote:
Here's an amazingly simple PHP-based countdown timer I found. We chose to use this script over a Javascript version because we have a lot of dial-up visitors and adding more javascripts to the site was slowing it down.

Live demo (bottom-right block on homepage): http://cit.wvup.edu

Just paste the following code (exactly as shown) in a Custom PHP block and edit to suite:

?>
// enter target date below like this: "January 2, 2001"
$target "February 10, 2006";

// enter string of what this start date is. $top_text appears above the counter, $bottom_text displays below the counter
$top_text "There are ";
$bottom_text "until the last day to apply to graduate in May!";

//--------------------------
$now strtotime ("now");
$then strtotime ("$target");
$difference $then $now;
$num $difference/86400;
$days intval($num);
$num2 = ($num $days)*24;
$hours intval($num2);
$num3 = ($num2 $hours)*60;
$mins intval($num3);
$num4 = ($num3 $mins)*60;
?>
 echo $top_text ?>
  
    
      echo $days ?>
      :
      echo $hours ?>
      :
      echo $mins ?>
    
    
      Days
      |
      Hrs
      |
      Mins
  
  echo $bottom_text ?> 




James


When you put the expiry date in for the countdown, the count down is set to stop at Midnight. Is there a way to set which time the count down stops at? I would like the countdown to finish at a 18:00 on the expiry date, not at 00:00 when the day starts....

Does anyone know how I could do that using this script?
Many many thanks for any help!

Login

Who's Online

331 user(s) are online (267 user(s) are browsing Support Forums)


Members: 0


Guests: 331


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits