Dotclear

Changeset 1841


Ignore:
Timestamp:
11/02/09 19:05:23 (13 years ago)
Author:
Moe
Message:

Clock 1.2.2 :

  • added link to strftime() documentation in the widget (fixes #270)
Location:
plugins/clock
Files:
4 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/clock/_define.php

    r622 r1841  
    33# 
    44# This file is part of Clock. 
    5 # Copyright 2007-2008 Moe (http://gniark.net/) 
     5# Copyright 2007-2008,2009 Moe (http://gniark.net/) 
    66# 
    77# Clock is free software; you can redistribute it and/or modify 
     
    2424        /* Description*/                "Clock widget", 
    2525        /* Author */                    "Moe (http://gniark.net/)", 
    26         /* Version */                   '1.2.1', 
     26        /* Version */                   '1.2.2', 
    2727        /* Permissions */               'admin' 
    2828); 
  • plugins/clock/_prepend.php

    r574 r1841  
    33# 
    44# This file is part of Clock. 
    5 # Copyright 2007-2008 Moe (http://gniark.net/) 
     5# Copyright 2007-2008,2009 Moe (http://gniark.net/) 
    66# 
    77# Clock is free software; you can redistribute it and/or modify 
  • plugins/clock/_widget.php

    r574 r1841  
    33# 
    44# This file is part of Clock. 
    5 # Copyright 2007-2008 Moe (http://gniark.net/) 
     5# Copyright 2007-2008,2009 Moe (http://gniark.net/) 
    66# 
    77# Clock is free software; you can redistribute it and/or modify 
     
    2626     public static function initWidgets(&$w) 
    2727     { 
     28          # load locales for the blog language 
     29          l10n::set(dirname(__FILE__).'/locales/'. 
     30               $GLOBALS['core']->blog->settings->lang.'/widget'); 
     31 
    2832          # set timezone 
    29           global $core; 
    30           $tz = $core->blog->settings->blog_timezone; 
     33          $tz = $GLOBALS['core']->blog->settings->blog_timezone; 
    3134 
    3235          $w->create('Clock',__('Clock'),array('publicClock','Show')); 
    3336 
    34           $w->Clock->setting('title',__('Title:').' ('.__('optional').')',__('Local time in').' '.substr(strrchr($tz,'/'),1),'text'); 
     37          $w->Clock->setting('title',__('Title:').' ('.__('optional').')', 
     38               sprintf(__('Local time in %s'),substr(strrchr($tz,'/'),1)), 
     39               'text'); 
    3540           
    36           $w->Clock->setting('timezone',__('Timezone:'),'','combo', 
     41          $w->Clock->setting('timezone',__('Timezone:'),$tz,'combo', 
    3742               dt::getZones(true,true)); 
    3843           
    39           $w->Clock->setting('format',__('Format (see PHP strftime function) (HMS display dynamically %H:%M:%S):'),'%A, %e %B %Y, HMS','text'); 
     44          $w->Clock->setting('format', 
     45               sprintf(__('Format (see <a href="%1$s" %2$s>PHP strftime function</a>) (HMS display dynamically %%H:%%M:%%S):'), 
     46               __('http://www.php.net/manual/en/function.strftime.php'), 
     47               'onclick="return window.confirm(\''.__('Are you sure you want to leave this page?').'\')"'), 
     48               '%A, %e %B %Y, HMS','text'); 
    4049 
    4150          $w->Clock->setting('homeonly',__('Home page only'),false,'check'); 
     
    4857     public static function Show(&$w) 
    4958     { 
    50           # get blog language 
    51           global $core; 
    52  
    53           if ($w->homeonly && $core->url->type != 'default') { 
     59          if ($w->homeonly && $GLOBALS['core']->url->type != 'default') { 
    5460               return; 
    5561          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map