Plugin Directory

Changeset 170892


Ignore:
Timestamp:
11/06/2009 10:33:56 AM (16 years ago)
Author:
philbert_mcpleb
Message:

small fix to widget

Location:
wp-timer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-timer/trunk/WP_timer.php

    r170490 r170892  
    55Description: A simple timer for wordpress, inspired by http://xkcd.com/363/
    66Author: Dan Warden
    7 Version: 1.00
     7Version: 1.01
    88Author URI: http://www.nonamelan.co.uk
    99*/
     
    111111        if ($interval['interval']=="60")
    112112            {
    113             $time="minutes";
     113            $time="minute";
    114114            }
    115115        elseif ($interval['interval']=="3600")
    116116            {
    117             $time="hours";
     117            $time="hour";
    118118            }
    119119        elseif ($interval['interval']=="86400")
    120120            {
    121             $time="days";
     121            $time="day";
    122122            }
    123123           
    124         ?><p>It has been <?php echo $floor; ?> <?php echo $time; ?> since someone last reset this sign.</p>
     124        ?><p>It has been <?php echo $floor; ?> <?php echo $time; ?><?php if ($floor == '1')
     125            {
     126            echo '';
     127            }
     128        else
     129            {
     130            echo 's';
     131            }
     132        ?> since someone last reset this sign.</p>
    125133        <p><form method='post' action='<?php echo $_SERVER['PHP_SELF']?>'>
    126134        <input name='interval' type='hidden' value='<?php echo $interval['interval']; ?>'/>
  • wp-timer/trunk/readme.txt

    r170490 r170892  
    88A simple timer for wordpress, inspired by XKCD
    99
    10 === ChangeLog ===
     10==Description==
    1111
    12 v0.01
     12This is a small counter widget that simply shows how long it has bee since the counter was last reset. anyone is able to reset the counter using the button in the widget. This is my first wordpress widget an was used mainly as a way to teach myself how to write wordpress plugins.
    1313
    14 first version, able to show only options saved in the control panel.
     14==ChangeLog==
    1515
     16V1.01
    1617
    17 v0.02
     18Fixed small gammatical error in the widget, will now show 1 day/hour/minute instead of 1days/hours/minutes
    1819
    19 rewrite to allow for easier modification.
     20v1.00
    2021
    21 
    22 v0.03
    23 
    24 now showing message to user advsing how many days since last reset
    25 
    26 
    27 v0.04
    28 
    29 admin is now able to chosse the interval (minutes/hours/days) displayed on the main page.
    30 
    31 
    32 v0.05
    33 
    34 created form to allow reset to funtion.
     22first stable release
    3523
    3624
Note: See TracChangeset for help on using the changeset viewer.