Changeset 1841
- Timestamp:
- 11/02/09 19:05:23 (13 years ago)
- Location:
- plugins/clock
- Files:
-
- 4 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/clock/_define.php
r622 r1841 3 3 # 4 4 # This file is part of Clock. 5 # Copyright 2007-2008 Moe (http://gniark.net/)5 # Copyright 2007-2008,2009 Moe (http://gniark.net/) 6 6 # 7 7 # Clock is free software; you can redistribute it and/or modify … … 24 24 /* Description*/ "Clock widget", 25 25 /* Author */ "Moe (http://gniark.net/)", 26 /* Version */ '1.2. 1',26 /* Version */ '1.2.2', 27 27 /* Permissions */ 'admin' 28 28 ); -
plugins/clock/_prepend.php
r574 r1841 3 3 # 4 4 # This file is part of Clock. 5 # Copyright 2007-2008 Moe (http://gniark.net/)5 # Copyright 2007-2008,2009 Moe (http://gniark.net/) 6 6 # 7 7 # Clock is free software; you can redistribute it and/or modify -
plugins/clock/_widget.php
r574 r1841 3 3 # 4 4 # This file is part of Clock. 5 # Copyright 2007-2008 Moe (http://gniark.net/)5 # Copyright 2007-2008,2009 Moe (http://gniark.net/) 6 6 # 7 7 # Clock is free software; you can redistribute it and/or modify … … 26 26 public static function initWidgets(&$w) 27 27 { 28 # load locales for the blog language 29 l10n::set(dirname(__FILE__).'/locales/'. 30 $GLOBALS['core']->blog->settings->lang.'/widget'); 31 28 32 # set timezone 29 global $core; 30 $tz = $core->blog->settings->blog_timezone; 33 $tz = $GLOBALS['core']->blog->settings->blog_timezone; 31 34 32 35 $w->create('Clock',__('Clock'),array('publicClock','Show')); 33 36 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'); 35 40 36 $w->Clock->setting('timezone',__('Timezone:'), '','combo',41 $w->Clock->setting('timezone',__('Timezone:'),$tz,'combo', 37 42 dt::getZones(true,true)); 38 43 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'); 40 49 41 50 $w->Clock->setting('homeonly',__('Home page only'),false,'check'); … … 48 57 public static function Show(&$w) 49 58 { 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') { 54 60 return; 55 61 }
Note: See TracChangeset
for help on using the changeset viewer.