Changeset 195671
- Timestamp:
- 01/20/2010 06:17:38 AM (16 years ago)
- Location:
- wplistcal
- Files:
-
- 6 edited
- 1 copied
-
tags/1.3.5 (copied) (copied from wplistcal/trunk)
-
tags/1.3.5/admin.inc.php (modified) (15 diffs)
-
tags/1.3.5/readme.txt (modified) (4 diffs)
-
tags/1.3.5/wplistcal.php (modified) (3 diffs)
-
trunk/admin.inc.php (modified) (15 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/wplistcal.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wplistcal/tags/1.3.5/admin.inc.php
r185503 r195671 99 99 } 100 100 else { 101 $create_time = date ($time_format, $event['event_create_time']);101 $create_time = date_i18n($time_format, $event['event_create_time']); 102 102 } 103 103 if($event['event_modified_time'] == '0') { … … 105 105 } 106 106 else { 107 $modified_time = date ($time_format, $event['event_modified_time']);107 $modified_time = date_i18n($time_format, $event['event_modified_time']); 108 108 } 109 109 … … 223 223 <div id="startwrap" class="inside"> 224 224 <div style="clear:both;float:none;"> 225 <label class="wplc_date_label"> Start:</label>225 <label class="wplc_date_label"><?php _e('Start:', $wplc_domain); ?></label> 226 226 <div class="wplc_date_body"> 227 227 <?php … … 262 262 </div> 263 263 <div style="padding-top:15px;clear:both;float:none;"> 264 <label class="wplc_date_label"> End:</label>264 <label class="wplc_date_label"><?php _e('End:', $wplc_domain); ?></label> 265 265 <div class="wplc_date_body"> 266 266 <?php … … 451 451 global $wplc_domain, $wplc_dir, $wplc_plugin; 452 452 453 add_object_page(__("Events" ), __("Events"), 2, $wplc_plugin, "wplc_show_admin_write_page", $wplc_dir."/icon.gif");453 add_object_page(__("Events", $wplc_domain), __("Events", $wplc_domain), 2, $wplc_plugin, "wplc_show_admin_write_page", $wplc_dir."/icon.gif"); 454 454 455 455 add_submenu_page($wplc_plugin, __("Add New Event", $wplc_domain), __("Add New", $wplc_domain), "edit_posts", $wplc_plugin, "wplc_show_admin_write_page"); … … 592 592 <div class="tablenav"> 593 593 <div class="tablenav-pages"> 594 <span class="displaying-num"><?php _e(sprintf("Displaying %d-%d of %d", $offset+1, $offset+count($events), $totalevents), $wplc_domain); ?></span>594 <span class="displaying-num"><?php printf(__('Displaying %d-%d of %d', $wplc_domain), $offset+1, $offset+count($events), $totalevents); ?></span> 595 595 <?php 596 596 if($offset + $itemsperpage < $totalevents) { … … 629 629 $class = $i % 2 == 0 ? " class='alternate'" : ""; 630 630 $useformat = $events[$i]['event_allday'] == 1 ? $allday_format : $dateformat; 631 $start = date ($useformat, $events[$i]['event_start_time']);632 $end = date ($useformat, $events[$i]['event_end_time']);631 $start = date_i18n($useformat, $events[$i]['event_start_time']); 632 $end = date_i18n($useformat, $events[$i]['event_end_time']); 633 633 ?> 634 634 … … 660 660 <div class="tablenav"> 661 661 <div class="tablenav-pages"> 662 <span class="displaying-num"><?php _e(sprintf("Displaying %d-%d of %d", $offset+1, $offset+count($events), $totalevents), $wplc_domain); ?></span>662 <span class="displaying-num"><?php printf(__("Displaying %d-%d of %d", $wplc_domain), $offset+1, $offset+count($events), $totalevents); ?></span> 663 663 <?php 664 664 if($offset + $itemsperpage < $totalevents) { … … 793 793 $num = wplc_cleanup_events(); 794 794 if($num > 0) { 795 $message = sprintf(__("%d old ".($num == 1 ? "event" : "events")." deleted.", $wplc_domain), $num); 795 if($num == 1) 796 $message = __("1 old event deleted.", $wplc_domain); 797 else 798 $message = sprintf(__('%d old events deleted.', $wplc_domain), $num); 796 799 $class = "updated"; 797 800 } … … 850 853 } 851 854 855 add_action('admin_init', 'wplc_register_settings'); 856 function wplc_register_settings() { 857 register_setting('wplc', 'wplc_display_mode'); 858 register_setting('wplc', 'wplc_event_format'); 859 register_setting('wplc', 'wplc_date_format'); 860 register_setting('wplc', 'wplc_use_24hr_time'); 861 register_setting('wplc', 'wplc_hide_same_date'); 862 register_setting('wplc', 'wplc_date2_time_format'); 863 register_setting('wplc', 'wplc_max_events'); 864 register_setting('wplc', 'wplc_advance_days'); 865 register_setting('wplc', 'wplc_show_past_events'); 866 register_setting('wplc', 'wplc_event_order'); 867 register_setting('wplc', 'wplc_no_events_msg'); 868 register_setting('wplc', 'wplc_manage_items_per_page'); 869 register_setting('wplc', 'wplc_open_links_in_new_window'); 870 register_setting('wplc', 'wplc_nofollow_links'); 871 } 872 852 873 function wplc_show_admin_options_page() { 853 874 wplc_setup(); … … 877 898 <div class="wrap"> 878 899 <form method="post" action="options.php"> 879 <?php wp_nonce_field('update-options'); ?>900 <?php settings_fields('wplc'); ?> 880 901 <h2><?php _e("WPListCal Options", $wplc_domain); ?></h2> 881 902 <table class="form-table"> … … 888 909 <fieldset style="margin-left: 25px;border:none;"> 889 910 <legend style="float:left; margin-top:2px;"><?php _e("Event Format", $wplc_domain); ?> <a href="javascript:;" title="<?php _e("The following variables are available:", $wplc_domain); ?> %NAME%, %LINK%, %LINKEDNAME%, %LOCATION%, %DESCRIPTION%, %START%, %END%, and %AUTHOR%. 890 891 Put words into curly brackets to make them dependent on the first variable in the bracketed statement. Use '^' to escape brackets or to stop a variable from being the dependent variable for a statement." style="cursor:help;">?</a>:</legend>911 912 <?php _e("Put words into curly brackets to make them dependent on the first variable in the bracketed statement. Use '^' to escape brackets or to stop a variable from being the dependent variable for a statement.", $wplc_domain); ?>" style="cursor:help;">?</a>:</legend> 892 913 <div> 893 914 <textarea name="wplc_event_format" id="wplc_event_format" style="width:350px; height:50px;" class="large-text code"<?php echo get_option('wplc_display_mode') == 'list' ? "" : "disabled='disabled'"; ?>><?php echo htmlentities(get_option('wplc_event_format')); ?></textarea> … … 904 925 <span class="setting-description"><a href="http://codex.wordpress.org/Formatting_Date_and_Time"><?php _e("Documentation on date formatting", $wplc_domain); ?></a>. <?php _e("Click "Save Changes" to update sample output.", $wplc_domain); ?></span> 905 926 <br /> 906 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date (get_option('wplc_date_format'), wplc_time()); ?>927 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date_i18n(get_option('wplc_date_format'), wplc_time()); ?> 907 928 </td> 908 929 </tr> … … 929 950 <div> 930 951 <input type="text" name="wplc_date2_time_format" id="wplc_date2_time_format" value="<?php echo get_option('wplc_date2_time_format'); ?>"<?php echo $hide_same_date ? "" : "disabled='disabled'"; ?> class="small-text" /> 931 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date (get_option('wplc_date2_time_format'), wplc_time()); ?>952 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date_i18n(get_option('wplc_date2_time_format'), wplc_time()); ?> 932 953 </div> 933 954 </fieldset> … … 1002 1023 </tr> 1003 1024 </table> 1004 <input type="hidden" name="action" value="update" />1005 <input type="hidden" name="page_options" value="wplc_display_mode,wplc_event_format,wplc_date_format,wplc_use_24hr_time,wplc_hide_same_date,wplc_date2_time_format,wplc_max_events,wplc_advance_days,wplc_show_past_events,wplc_no_events_msg,wplc_manage_items_per_page,wplc_open_links_in_new_window,wplc_nofollow_links" />1006 1025 <p class="submit"><input type="submit" name="Submit" value="<?php _e("Save Changes", $wplc_domain); ?>" class="button-primary" /></p> 1007 1026 </form> -
wplistcal/tags/1.3.5/readme.txt
r185503 r195671 4 4 Tags: calendar, events 5 5 Requires at least: 2.7 6 Tested up to: 2.97 Stable tag: 1.3. 46 Tested up to: 3.0-alpha 7 Stable tag: 1.3.5 8 8 Text Domain: wplistcal 9 9 … … 16 16 = Version Guide = 17 17 18 * WordPress 2.7 or later → Use WPListCal 1.3. 4(current stable release)18 * WordPress 2.7 or later → Use WPListCal 1.3.5 (current stable release) 19 19 * WordPress 2.5-2.6.3 → Use WPListCal 1.0.8.2 20 20 * WordPress 2.0.3-2.3.3 → Use WPListCal 1.0.2 … … 116 116 WPListCal is specialized to provide clean list or table based output for you to style or reparse any way you'd like. Other calendar plugins force you to use a gregorian calendar view which may be inappropriate for many applications. 117 117 118 = Does WPListCal work on WordPress 2.8? =119 120 WPListCal 1.2.2 and later work on WordPress 2.8121 122 = When I click settings in the plugins page, I get the error "Cannot load wplc-options." =123 124 WPListCal 1.2 solves this issue125 126 118 = Why do some of my events show N/A for author and create date? = 127 119 … … 145 137 146 138 == Changelog == 139 140 = 1.3.5 = 141 142 * FIXED: WordPressMU support on options page (thanks Gabriel Mazetto for the patch) 143 * FIXED: Multiple i18n bugs, now using date_i18n to allow localized dates (thanks Jonas for the patch) 147 144 148 145 = 1.3.4 = -
wplistcal/tags/1.3.5/wplistcal.php
r185503 r195671 4 4 Plugin URI: http://www.jonathankern.com/code/wplistcal 5 5 Description: WPListCal will display a simple listing of events anywhere on your Wordpress site. 6 Version: 1.3. 46 Version: 1.3.5 7 7 Author: Jonathan Kern 8 8 Author URI: http://www.jonathankern.com … … 62 62 // Localization setup 63 63 function wplc_setup() { 64 global $wplc_domain, $wplc_is_setup ;64 global $wplc_domain, $wplc_is_setup, $wplc_plugin; 65 65 if($wplc_is_setup) 66 66 return; 67 load_plugin_textdomain($wplc_domain, $wplc_dir);67 load_plugin_textdomain($wplc_domain, false, dirname($wplc_plugin)); 68 68 $wplc_is_setup = true; 69 69 } … … 387 387 for($i=0, $len=count($events); $i<$len; $i++) { 388 388 // Prepare event string 389 $start = date ($date_format, $events[$i]['event_start_time']);390 $end = date ($date_format, $events[$i]['event_end_time']);389 $start = date_i18n($date_format, $events[$i]['event_start_time']); 390 $end = date_i18n($date_format, $events[$i]['event_end_time']); 391 391 // Check for same date 392 if( $hide_same_date) {392 if(strcasecmp($hide_same_date, 'true') == 0) { 393 393 $start_date = date("Ymd", $events[$i]['event_start_time']); 394 394 $end_date = date("Ymd", $events[$i]['event_end_time']); 395 395 396 if($start_date == $end_date) { 397 $end = date ($date2_time_format, $events[$i]['event_end_time']);396 if($start_date == $end_date) { 397 $end = date_i18n($date2_time_format, $events[$i]['event_end_time']); 398 398 } 399 399 } -
wplistcal/trunk/admin.inc.php
r185503 r195671 99 99 } 100 100 else { 101 $create_time = date ($time_format, $event['event_create_time']);101 $create_time = date_i18n($time_format, $event['event_create_time']); 102 102 } 103 103 if($event['event_modified_time'] == '0') { … … 105 105 } 106 106 else { 107 $modified_time = date ($time_format, $event['event_modified_time']);107 $modified_time = date_i18n($time_format, $event['event_modified_time']); 108 108 } 109 109 … … 223 223 <div id="startwrap" class="inside"> 224 224 <div style="clear:both;float:none;"> 225 <label class="wplc_date_label"> Start:</label>225 <label class="wplc_date_label"><?php _e('Start:', $wplc_domain); ?></label> 226 226 <div class="wplc_date_body"> 227 227 <?php … … 262 262 </div> 263 263 <div style="padding-top:15px;clear:both;float:none;"> 264 <label class="wplc_date_label"> End:</label>264 <label class="wplc_date_label"><?php _e('End:', $wplc_domain); ?></label> 265 265 <div class="wplc_date_body"> 266 266 <?php … … 451 451 global $wplc_domain, $wplc_dir, $wplc_plugin; 452 452 453 add_object_page(__("Events" ), __("Events"), 2, $wplc_plugin, "wplc_show_admin_write_page", $wplc_dir."/icon.gif");453 add_object_page(__("Events", $wplc_domain), __("Events", $wplc_domain), 2, $wplc_plugin, "wplc_show_admin_write_page", $wplc_dir."/icon.gif"); 454 454 455 455 add_submenu_page($wplc_plugin, __("Add New Event", $wplc_domain), __("Add New", $wplc_domain), "edit_posts", $wplc_plugin, "wplc_show_admin_write_page"); … … 592 592 <div class="tablenav"> 593 593 <div class="tablenav-pages"> 594 <span class="displaying-num"><?php _e(sprintf("Displaying %d-%d of %d", $offset+1, $offset+count($events), $totalevents), $wplc_domain); ?></span>594 <span class="displaying-num"><?php printf(__('Displaying %d-%d of %d', $wplc_domain), $offset+1, $offset+count($events), $totalevents); ?></span> 595 595 <?php 596 596 if($offset + $itemsperpage < $totalevents) { … … 629 629 $class = $i % 2 == 0 ? " class='alternate'" : ""; 630 630 $useformat = $events[$i]['event_allday'] == 1 ? $allday_format : $dateformat; 631 $start = date ($useformat, $events[$i]['event_start_time']);632 $end = date ($useformat, $events[$i]['event_end_time']);631 $start = date_i18n($useformat, $events[$i]['event_start_time']); 632 $end = date_i18n($useformat, $events[$i]['event_end_time']); 633 633 ?> 634 634 … … 660 660 <div class="tablenav"> 661 661 <div class="tablenav-pages"> 662 <span class="displaying-num"><?php _e(sprintf("Displaying %d-%d of %d", $offset+1, $offset+count($events), $totalevents), $wplc_domain); ?></span>662 <span class="displaying-num"><?php printf(__("Displaying %d-%d of %d", $wplc_domain), $offset+1, $offset+count($events), $totalevents); ?></span> 663 663 <?php 664 664 if($offset + $itemsperpage < $totalevents) { … … 793 793 $num = wplc_cleanup_events(); 794 794 if($num > 0) { 795 $message = sprintf(__("%d old ".($num == 1 ? "event" : "events")." deleted.", $wplc_domain), $num); 795 if($num == 1) 796 $message = __("1 old event deleted.", $wplc_domain); 797 else 798 $message = sprintf(__('%d old events deleted.', $wplc_domain), $num); 796 799 $class = "updated"; 797 800 } … … 850 853 } 851 854 855 add_action('admin_init', 'wplc_register_settings'); 856 function wplc_register_settings() { 857 register_setting('wplc', 'wplc_display_mode'); 858 register_setting('wplc', 'wplc_event_format'); 859 register_setting('wplc', 'wplc_date_format'); 860 register_setting('wplc', 'wplc_use_24hr_time'); 861 register_setting('wplc', 'wplc_hide_same_date'); 862 register_setting('wplc', 'wplc_date2_time_format'); 863 register_setting('wplc', 'wplc_max_events'); 864 register_setting('wplc', 'wplc_advance_days'); 865 register_setting('wplc', 'wplc_show_past_events'); 866 register_setting('wplc', 'wplc_event_order'); 867 register_setting('wplc', 'wplc_no_events_msg'); 868 register_setting('wplc', 'wplc_manage_items_per_page'); 869 register_setting('wplc', 'wplc_open_links_in_new_window'); 870 register_setting('wplc', 'wplc_nofollow_links'); 871 } 872 852 873 function wplc_show_admin_options_page() { 853 874 wplc_setup(); … … 877 898 <div class="wrap"> 878 899 <form method="post" action="options.php"> 879 <?php wp_nonce_field('update-options'); ?>900 <?php settings_fields('wplc'); ?> 880 901 <h2><?php _e("WPListCal Options", $wplc_domain); ?></h2> 881 902 <table class="form-table"> … … 888 909 <fieldset style="margin-left: 25px;border:none;"> 889 910 <legend style="float:left; margin-top:2px;"><?php _e("Event Format", $wplc_domain); ?> <a href="javascript:;" title="<?php _e("The following variables are available:", $wplc_domain); ?> %NAME%, %LINK%, %LINKEDNAME%, %LOCATION%, %DESCRIPTION%, %START%, %END%, and %AUTHOR%. 890 891 Put words into curly brackets to make them dependent on the first variable in the bracketed statement. Use '^' to escape brackets or to stop a variable from being the dependent variable for a statement." style="cursor:help;">?</a>:</legend>911 912 <?php _e("Put words into curly brackets to make them dependent on the first variable in the bracketed statement. Use '^' to escape brackets or to stop a variable from being the dependent variable for a statement.", $wplc_domain); ?>" style="cursor:help;">?</a>:</legend> 892 913 <div> 893 914 <textarea name="wplc_event_format" id="wplc_event_format" style="width:350px; height:50px;" class="large-text code"<?php echo get_option('wplc_display_mode') == 'list' ? "" : "disabled='disabled'"; ?>><?php echo htmlentities(get_option('wplc_event_format')); ?></textarea> … … 904 925 <span class="setting-description"><a href="http://codex.wordpress.org/Formatting_Date_and_Time"><?php _e("Documentation on date formatting", $wplc_domain); ?></a>. <?php _e("Click "Save Changes" to update sample output.", $wplc_domain); ?></span> 905 926 <br /> 906 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date (get_option('wplc_date_format'), wplc_time()); ?>927 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date_i18n(get_option('wplc_date_format'), wplc_time()); ?> 907 928 </td> 908 929 </tr> … … 929 950 <div> 930 951 <input type="text" name="wplc_date2_time_format" id="wplc_date2_time_format" value="<?php echo get_option('wplc_date2_time_format'); ?>"<?php echo $hide_same_date ? "" : "disabled='disabled'"; ?> class="small-text" /> 931 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date (get_option('wplc_date2_time_format'), wplc_time()); ?>952 <strong><?php _e("Output:", $wplc_domain); ?></strong> <?php echo date_i18n(get_option('wplc_date2_time_format'), wplc_time()); ?> 932 953 </div> 933 954 </fieldset> … … 1002 1023 </tr> 1003 1024 </table> 1004 <input type="hidden" name="action" value="update" />1005 <input type="hidden" name="page_options" value="wplc_display_mode,wplc_event_format,wplc_date_format,wplc_use_24hr_time,wplc_hide_same_date,wplc_date2_time_format,wplc_max_events,wplc_advance_days,wplc_show_past_events,wplc_no_events_msg,wplc_manage_items_per_page,wplc_open_links_in_new_window,wplc_nofollow_links" />1006 1025 <p class="submit"><input type="submit" name="Submit" value="<?php _e("Save Changes", $wplc_domain); ?>" class="button-primary" /></p> 1007 1026 </form> -
wplistcal/trunk/readme.txt
r185503 r195671 4 4 Tags: calendar, events 5 5 Requires at least: 2.7 6 Tested up to: 2.97 Stable tag: 1.3. 46 Tested up to: 3.0-alpha 7 Stable tag: 1.3.5 8 8 Text Domain: wplistcal 9 9 … … 16 16 = Version Guide = 17 17 18 * WordPress 2.7 or later → Use WPListCal 1.3. 4(current stable release)18 * WordPress 2.7 or later → Use WPListCal 1.3.5 (current stable release) 19 19 * WordPress 2.5-2.6.3 → Use WPListCal 1.0.8.2 20 20 * WordPress 2.0.3-2.3.3 → Use WPListCal 1.0.2 … … 116 116 WPListCal is specialized to provide clean list or table based output for you to style or reparse any way you'd like. Other calendar plugins force you to use a gregorian calendar view which may be inappropriate for many applications. 117 117 118 = Does WPListCal work on WordPress 2.8? =119 120 WPListCal 1.2.2 and later work on WordPress 2.8121 122 = When I click settings in the plugins page, I get the error "Cannot load wplc-options." =123 124 WPListCal 1.2 solves this issue125 126 118 = Why do some of my events show N/A for author and create date? = 127 119 … … 145 137 146 138 == Changelog == 139 140 = 1.3.5 = 141 142 * FIXED: WordPressMU support on options page (thanks Gabriel Mazetto for the patch) 143 * FIXED: Multiple i18n bugs, now using date_i18n to allow localized dates (thanks Jonas for the patch) 147 144 148 145 = 1.3.4 = -
wplistcal/trunk/wplistcal.php
r185503 r195671 4 4 Plugin URI: http://www.jonathankern.com/code/wplistcal 5 5 Description: WPListCal will display a simple listing of events anywhere on your Wordpress site. 6 Version: 1.3. 46 Version: 1.3.5 7 7 Author: Jonathan Kern 8 8 Author URI: http://www.jonathankern.com … … 62 62 // Localization setup 63 63 function wplc_setup() { 64 global $wplc_domain, $wplc_is_setup ;64 global $wplc_domain, $wplc_is_setup, $wplc_plugin; 65 65 if($wplc_is_setup) 66 66 return; 67 load_plugin_textdomain($wplc_domain, $wplc_dir);67 load_plugin_textdomain($wplc_domain, false, dirname($wplc_plugin)); 68 68 $wplc_is_setup = true; 69 69 } … … 387 387 for($i=0, $len=count($events); $i<$len; $i++) { 388 388 // Prepare event string 389 $start = date ($date_format, $events[$i]['event_start_time']);390 $end = date ($date_format, $events[$i]['event_end_time']);389 $start = date_i18n($date_format, $events[$i]['event_start_time']); 390 $end = date_i18n($date_format, $events[$i]['event_end_time']); 391 391 // Check for same date 392 if( $hide_same_date) {392 if(strcasecmp($hide_same_date, 'true') == 0) { 393 393 $start_date = date("Ymd", $events[$i]['event_start_time']); 394 394 $end_date = date("Ymd", $events[$i]['event_end_time']); 395 395 396 if($start_date == $end_date) { 397 $end = date ($date2_time_format, $events[$i]['event_end_time']);396 if($start_date == $end_date) { 397 $end = date_i18n($date2_time_format, $events[$i]['event_end_time']); 398 398 } 399 399 }
Note: See TracChangeset
for help on using the changeset viewer.