Plugin Directory

Changeset 567188


Ignore:
Timestamp:
07/04/2012 02:47:59 AM (14 years ago)
Author:
fergbrain
Message:

Version 3.0.3 copy from GitHub

Location:
countdown-timer/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • countdown-timer/trunk/fergcorp_countdownTimer.php

    r561478 r567188  
    44Plugin URI: http://www.andrewferguson.net/wordpress-plugins/countdown-timer/
    55Description: Use shortcodes and a widget to count down or up to the years, months, weeks, days, hours, minutes, and/or seconds to a particular event.
    6 Version: 3.0.2
     6Version: 3.0.3
    77Author: Andrew Ferguson
    88Author URI: http://www.andrewferguson.net
     
    374374                        foreach ( $this->eventList as $thisEvent ) {
    375375                        //If the user wants, cycle through the array to find out if they have already occured, if so: set them to NULL
    376                         if ( ( $this->deleteOneTimeEvents ) && ( $thisEvent <= new DateTime() ) ) {
     376                        if ( ( $this->deleteOneTimeEvents ) && ( $thisEvent <= new DateTime() ) && ( !$thisEvent->getTimeSince() ) ) {
    377377                            $thisEvent = NULL;
    378378                        }
     
    647647     * @author Andrew Ferguson
    648648    */
    649     public function singleTimer($date){
    650        
    651         return $this->formatEvent(new Fergcorp_Countdown_Timer_Event(strtotime($date)), TRUE);
    652        
    653         //return
    654        
    655         //atEventp_countdownTimer_format('', strtotime($date), ( date('Z') - (get_option('gmt_offset') * 3600) ), true, '0', '', get_option('fergcorp_countdownTimer_timeFormat'), true);
     649    public function singleTimer( $date ){
     650       
     651        return $this->formatEvent( new Fergcorp_Countdown_Timer_Event( strtotime( $date ) ) , TRUE );
     652       
    656653    }
    657654
     
    683680            $this->eventsPresent = FALSE; //Reset the test
    684681            for($i = 0; $i < $eventCount; $i++){
    685                     $toReturn .= $this->formatEvent($this->eventList[$i], FALSE); //stripslashes($fergcorp_countdownTimer_oneTimeEvent[$i]->getTitle()), $fergcorp_countdownTimer_oneTimeEvent[$i]["date"], 0, $fergcorp_countdownTimer_oneTimeEvent[$i]["timeSince"], get_option('fergcorp_countdownTimer_timeSinceTime'), stripslashes($fergcorp_countdownTimer_oneTimeEvent[$i]["link"]), get_option('fergcorp_countdownTimer_timeFormat'), false);         
     682                if( ( '' == ( $thisTimer = $this->formatEvent($this->eventList[$i], FALSE ) ) ) && ( $eventCount < count( $this->eventList ) ) ) {
     683                    $eventCount++;
     684                }
     685                else{
     686                    $toReturn .= $thisTimer;
     687                }
    686688            }
    687689        }
     
    718720        $time_left = $thisEvent->getTimestamp() - time();
    719721       
     722        $content = '';
     723       
    720724        if(!$standAlone)
    721725            $content = "<li class = 'fergcorp_countdownTimer_event_li'>";
     
    728732        $timePrefix = "<abbr title = \"".date_i18n($this->timeFormat, $thisEvent->getTimestamp(), FALSE)."\" id = '".$thisEvent->getUID()."' class = 'fergcorp_countdownTimer_event_time'>";
    729733       
    730         if ( ( $time_left < 0 ) && ( $thisEvent->getTimeSince() ) && ( ( ( $time_left + $this->timeSinceTime ) > 0 ) || ( 0 == $this->timeSinceTime ) ) ){ //If the event has already passed and we still want to display the event
     734        if (    ( $time_left <= 0 ) &&
     735                    ( ( ( $thisEvent->getTimeSince() ) &&
     736                        ( ( ( $time_left + $this->timeSinceTime ) > 0 ) || ( 0 == $this->timeSinceTime ) ) )
     737                || ( $standAlone) ) ) {
     738                       
     739                    //If the event has already passed and we still want to display the event
     740               
    731741            $this->eventsPresent = TRUE; //Set to TRUE so we know there's an event to display
    732742            if ( $thisEvent->getTitle() ) {
     
    938948   
    939949    /**
    940      * Processes [fergcorp_cdt max=##] shortcode
     950     * Processes [fergcorp_cdt_single date="_DATE_"] shortcode
    941951     *
    942952     * @param $atts array Attributes of the shortcode
     
    951961        ), $atts));
    952962   
    953         return $this->formatEvent(new Fergcorp_Countdown_Timer_Event(strtotime($date)), TRUE);
     963        return $this->singleTimer( $date );
    954964    }
    955965   
  • countdown-timer/trunk/js/fergcorp_countdownTimer_java_debug.js

    r561478 r567188  
    11/*******************************************************************************\
    22Countdown Timer JavaScript Module
    3 Version 3.0.2 (kept in step with fergcorp_countdownTimer.php)
     3Version 3.0.3 (kept in step with fergcorp_countdownTimer.php)
    44Copyright (c) 2007-2012 Andrew Ferguson
    55---------------------------------------------------------------------------------
  • countdown-timer/trunk/readme.txt

    r561478 r567188  
    44Tags: countdown, timer, count, date, event, widget, countup, age, fun, time, international, i18n, countdown timer, wedding, localization, i18n
    55Requires at least: 3.4
    6 Tested up to: 3.4
    7 Stable tag: 3.0.2
     6Tested up to: 3.5
     7Stable tag: 3.0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    177177== Changelog ==
    178178
     179= 3.0.3 =
     180Release date: 7/3/2012
     181
     182 * Bug fix: Shortcode for events in the past will always display
     183 * Bug fix: Don't delete events that have their getTimeSince flag set
     184 * Bug fix: Fixed expired timers that didn't show counting against limit of timers displayed
     185 * Other minor code cleanup
     186
    179187= 3.0.2 =
    180188Release date: 6/20/2012
  • countdown-timer/trunk/uninstall.php

    r561478 r567188  
    22/*
    33Countdown Timer Uninstall Module
    4 Version 3.0.2 (kept in step with fergcorp_countdownTimer.php)
     4Version 3.0.3 (kept in step with fergcorp_countdownTimer.php)
    55Copyright (c) 2009-2012 Andrew Ferguson
    66---------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.