Extension talk:Countdown

This is broken and should be removed. I wasted 2 hours of my life thinking something was wrong elsewhere in my configuration. It is borderline malicious to post broken code/extensions on unsuspecting users.

I can't seem to get this extension to work.

I uploaded the files, added the require_once to my localsettings.php.

Anything I could be missing?


 * I fixed a small instantiation bug. Try the latest version that I just posted. --Gri6507 02:05, 25 October 2007 (UTC)

I can't get it to work, either. Text like this is displayed instead: "UNIQ70dd48541bd7958a-countdown-00000002-QINU" --201.51.194.48 18:57, 19 June 2007 (UTC)


 * Try now, I have posted a version which works for me. Kuebel 09:38, 25 September 2007 (UTC)

This issue is caused (I believe) by a php extension which encrypts the php code. I had to un-install this package to get it to work. Joelb 10:27, 6 March 2008 (UTC)

Blank Version page
I get the extension to work, except my issue is it causes my specil:version page to show blank. Is there a fix? --216.223.16.33 19:31, 12 February 2008 (UTC)


 * I've got the same problem: Empty page content (just title and left navigation) on Special:Version - I'm using MediaWiki: 1.11.1 on PHP: 5.2.5 (cgi-fcgi) with MySQL: 5.0.45-community-nt. PHP shows no errors at all if display_errors = On and error_reporting = E_ALL. Hope you can terminate that bug, I really liked that extension! --87.174.78.63 22:41, 4 March 2008 (UTC)


 * I've tested this in MW v1.11.0 and 1.11.2 with PHP: 5.1.6 (apache2handler) and MySQL: 5.0.45. I cannot reproduce the problem. Can you please make sure that you have all of the code correctly copied into your local file? --Gri6507 01:07, 6 March 2008 (UTC)


 * I have the blank Version page problem also. I fixed it by removing this part of the code:

$wgExtensionCredits['parserhook'][] = array(               'version'     => '1.2',                'name'        => 'Countdown',                'author'      => array('Peter Strömberg', 'Paul Grinberg'),                'email'       => 'pez@pezius.com, gri6507 at yahoo dot com',                'url'         => 'http://www.mediawiki.org/wiki/Extension:Countdown',                'description' => 'adds &lt;countdown&gt; tags',                );

Fix
I also encountered the blank Version page issue, after upgrading to MediaWiki 1.17.0 and PHP 5.3.2

The fix mentioned above does work, but it's overkill; the problem is actually being caused just by the "ö" character. Editing countdown.php to replace this with the html-encoded version will fix the issue.

'Peter Strömberg' becomes 'Peter Str&amp;ouml;mberg'

Adamcox82 20:16, 23 September 2011 (UTC)

Summertime
They Extension does not work correctly while summertime, don't know where the problem realy is, because I don't know the javascript timefunctions, but maybe the javascript should use the servertime to calculate the difference because the servertime is always given in UTC. --DaSch 22:09, 22 September 2008 (UTC)
 * It sounds like the issue is just with your wiki user account. Have you made sure that your user preferences are configured correctly? --Gri6507 13:11, 26 September 2008 (UTC)

SVN
I put it into my Wikis SVN

https://wecowi.svn.sourceforge.net/svnroot/wecowi/trunk/extensions/Countdown

when somebody has any patches or modified version please send it to me or ask for access to this SVN

--DaSch 15:34, 2 October 2009 (UTC)

Importance
Sorry if I ask, but what for is this cause of this extension.Is there anything really important, what I might do with it? User:Arc96
 * Rocket launches? Prisoner release dates? Election poll closure times? Leucosticte (talk) 19:29, 17 August 2012 (UTC)

Request
Hi, I was wondering if we could set a finish line such as 'It's here!' whenever the countdown reaches zero instead of negative numbers, it'd be also a good idea to give the option to add the name of the variable (such as 'hours') under something like , allowing the constant to switch into singular whenever the last digit reaches one, such as '1 second' instead of '1 seconds', and another option that lets you remove a variable when the last string of this, such as the last hour before the countdown finishes, leaving only the remaining time left shown. I'm sorry if I'm asking a lot, it's just I'd like to see this implemented on future versions, I'd do it if I knew PHP :/ thanks in advance! 186.48.30.8 19:13, 9 October 2010 (UTC)

Fix for deprecated ereg_replace in PHP 5.3
If you get an error like: [Thu Mar 17 17:08:53 2011] [error] [client 85.xxx.xxx.xxx] PHP Deprecated: Function ereg_replace is deprecated in .../mw/extensions/Countdown.php on line 53, referer: https://.../mw/index.php?title=Main_Page&action=edit

Replace the line: $counter .= $parser->unstrip($parser->recursiveTagParse(ereg_replace('<([DHMS])>','&lt;span id="' . $name . '_\1">\1&lt;/span>',$input)), $parser->mStripState). "\n";

With: $counter .= $parser->unstrip($parser->recursiveTagParse(preg_replace('/<([DHMS])>/','&lt;span id="' . $name . '_\1">\1&lt;/span>',$input)), $parser->mStripState). "\n";

--Gertoft 18:29, 17 March 2011 (UTC+1)

Is it just me or is the date 1 day out?? Like I'm counting down to today and today it says -1 days to go instead of 0 days to go.

Templates
So, there's no way to use template parameters in it? E.g.:

 * Days:  * Hours:  * Minutes:  * Seconds:  The result I get is: Lacking that functionality, it's mostly pointless. I wonder if there is a way to convert it to a parser function? Leucosticte (talk) 22:31, 16 August 2012 (UTC)
 * Days: NaN
 * Hours: NaN
 * Minutes: NaN
 * Seconds: NaN