Changeset 21739
- Timestamp:
- 10/13/07 07:56:16 (9 months ago)
- Location:
- wp-useronline/trunk
- Files:
-
- 7 modified
-
readme.html (modified) (8 diffs)
-
useronline/useronline-js.php (modified) (1 diff)
-
useronline/useronline-options.php (modified) (1 diff)
-
useronline/useronline-widget.php (modified) (1 diff)
-
useronline/useronline.php (modified) (26 diffs)
-
useronline/wp-useronline.mo (modified) (previous)
-
useronline/wp-useronline.pot (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-useronline/trunk/readme.html
r17547 r21739 3 3 <head> 4 4 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 5 <title>WP-UserOnline 2.2 0Readme</title>5 <title>WP-UserOnline 2.21 Readme</title> 6 6 <style type="text/css" media="screen"> 7 7 /* Default Style */ … … 205 205 <div id="Container"> 206 206 <!-- Title --> 207 <div id="Title">WP-UserOnline 2.2 0 <span style="color: #aaaaaa;">Readme</span></div>207 <div id="Title">WP-UserOnline 2.21 <span style="color: #aaaaaa;">Readme</span></div> 208 208 209 209 <!-- Tabs --> … … 227 227 </p> 228 228 <p> 229 <strong>EMail:</strong><br />230 <strong>»</strong>231 <script type="text/javascript">232 /* <![CDATA[*/233 document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-UserOnline%202.20%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');234 /* ]]> */235 </script>236 </p>237 <p>238 229 <strong>Website:</strong><br /> 239 230 <strong>»</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a> … … 245 236 <p> 246 237 <strong>Download:</strong><br /> 247 <strong>»</strong> <a href="http://lesterchan.net/others/downloads.php?id=14" title="http://lesterchan.net/others/downloads.php?id=14">WP-UserOnline 2.2 0For WordPress 2.3.x</a><br />238 <strong>»</strong> <a href="http://lesterchan.net/others/downloads.php?id=14" title="http://lesterchan.net/others/downloads.php?id=14">WP-UserOnline 2.21 For WordPress 2.3.x</a><br /> 248 239 <strong>»</strong> <a href="http://lesterchan.net/others/downloads/wp-useronline211.zip" title="http://lesterchan.net/others/downloads/wp-useronline211.zip">WP-UserOnline 2.11 For WordPress 2.1.x And 2.2.x</a><br /> 249 240 <strong>»</strong> <a href="http://lesterchan.net/others/downloads/wp-useronline206.zip" title="http://lesterchan.net/others/downloads/wp-useronline206.zip">WP-UserOnline 2.06 For WordPress 2.0.x</a><br /> … … 272 263 <p> 273 264 <strong>Updated:</strong><br /> 274 <strong>»</strong> 1st October 2007265 <strong>»</strong> 1st January 2008 275 266 </p> 276 267 <p> … … 294 285 <ul> 295 286 <li> 287 <strong>Version 2.21 (01-01-2008)</strong> 288 <ul> 289 <li>NEW: Use date_i18n() For Localizing Date</li> 290 <li>NEW: Use number_format_i18n() Instead</li> 291 </ul> 292 </li> 293 <li> 296 294 <strong>Version 2.20 (01-10-2007)</strong> 297 295 <ul> … … 411 409 <div id="Upgrade" style="display: none;"> 412 410 <div class="SubTitle">» Upgrade Instructions</div> 413 <div class="SubSubTitle">From v1.0x To v2.2 0</div>411 <div class="SubSubTitle">From v1.0x To v2.21</div> 414 412 <ol> 415 413 <li> … … 542 540 </div> 543 541 </div> 544 <p id="Copyright">WP-UserOnline 2.2 0<br />Copyright © 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>542 <p id="Copyright">WP-UserOnline 2.21<br />Copyright © 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p> 545 543 </body> 546 544 </html> -
wp-useronline/trunk/useronline/useronline-js.php
r15777 r21739 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 1 Plugin: WP-UserOnline 2.20|5 | WordPress 2.3 Plugin: WP-UserOnline 2.21 | 6 6 | Copyright (c) 2007 Lester "GaMerZ" Chan | 7 7 | | -
wp-useronline/trunk/useronline/useronline-options.php
r15777 r21739 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 1 Plugin: WP-UserOnline 2.20|5 | WordPress 2.3 Plugin: WP-UserOnline 2.21 | 6 6 | Copyright (c) 2007 Lester "GaMerZ" Chan | 7 7 | | -
wp-useronline/trunk/useronline/useronline-widget.php
r17547 r21739 4 4 Plugin URI: http://lesterchan.net/portfolio/programming.php 5 5 Description: Adds a UserOnline Widget to display users online from WP-UserOnline Plugin. You need to activate WP-UserOnline first. 6 Version: 2.2 06 Version: 2.21 7 7 Author: Lester 'GaMerZ' Chan 8 8 Author URI: http://lesterchan.net -
wp-useronline/trunk/useronline/useronline.php
r19237 r21739 75 75 // Useronline Settings 76 76 $timeoutseconds = get_option('useronline_timeout'); 77 $timestamp = current_time('timestamp' );77 $timestamp = current_time('timestamp', 1); 78 78 $timeout = ($timestamp-$timeoutseconds); 79 79 $ip = get_ipaddress(); … … 154 154 if($useronline > $most_useronline) { 155 155 update_option('useronline_most_users', $useronline); 156 update_option('useronline_most_timestamp', current_time('timestamp' ));156 update_option('useronline_most_timestamp', current_time('timestamp', 1)); 157 157 } 158 158 } … … 167 167 $template_useronline = stripslashes(get_option('useronline_template_useronline')); 168 168 $template_useronline = str_replace('%USERONLINE_PAGE_URL%', get_option('useronline_url'), $template_useronline); 169 $template_useronline = str_replace('%USERONLINE_MOSTONLINE_COUNT%', number_format (get_most_useronline()), $template_useronline);169 $template_useronline = str_replace('%USERONLINE_MOSTONLINE_COUNT%', number_format_i18n(get_most_useronline()), $template_useronline); 170 170 $template_useronline = str_replace('%USERONLINE_MOSTONLINE_DATE%', get_most_useronline_date(), $template_useronline); 171 171 if(get_useronline_count() == 1) { 172 172 $template_useronline = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_useronline); 173 173 } else { 174 $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format (get_useronline_count()), stripslashes($useronline_naming['users']));174 $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format_i18n(get_useronline_count()), stripslashes($useronline_naming['users'])); 175 175 $template_useronline = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_useronline); 176 176 } … … 189 189 global $useronline; 190 190 if($display) { 191 echo number_format ($useronline);191 echo number_format_i18n($useronline); 192 192 } else { 193 193 return $useronline; … … 202 202 $most_useronline_users = intval(get_option('useronline_most_users')); 203 203 if($display) { 204 echo number_format ($most_useronline_users);204 echo number_format_i18n($most_useronline_users); 205 205 } else { 206 206 return $most_useronline_users; … … 214 214 function get_most_useronline_date($display = false) { 215 215 $most_useronline_timestamp = get_option('useronline_most_timestamp'); 216 $most_useronline_date = gmdate(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $most_useronline_timestamp);216 $most_useronline_date = date_i18n(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $most_useronline_timestamp); 217 217 if($display) { 218 218 echo $most_useronline_date; … … 238 238 global $current_user, $user_ID; 239 239 if(!empty($current_user) && intval($user_ID) > 0) { 240 update_user_option($user_ID, 'member_last_login', current_time('timestamp' ));240 update_user_option($user_ID, 'member_last_login', current_time('timestamp', 1)); 241 241 } 242 242 } … … 247 247 $date_format = sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')); 248 248 if($user_id == 0) { 249 return gmdate($date_format, get_user_option('member_last_login'));250 } else { 251 return gmdate($date_format, get_user_option('member_last_login',$user_id));249 return date_i18n($date_format, get_user_option('member_last_login')); 250 } else { 251 return date_i18n($date_format, get_user_option('member_last_login',$user_id)); 252 252 } 253 253 } … … 312 312 $template_browsingsite = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_browsingsite); 313 313 } else { 314 $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format (get_useronline_count()), stripslashes($useronline_naming['users']));314 $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format_i18n(get_useronline_count()), stripslashes($useronline_naming['users'])); 315 315 $template_browsingsite = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_browsingsite); 316 316 } … … 335 335 // Nice Text For Members 336 336 if($total_members > 1) { 337 $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format ($total_members), stripslashes($useronline_naming['members']));337 $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_members), stripslashes($useronline_naming['members'])); 338 338 $template_browsingsite = str_replace('%USERONLINE_MEMBERS%', $useronline_naming_members, $template_browsingsite); 339 339 } elseif($total_members == 1) { … … 345 345 // Nice Text For Guests 346 346 if($total_guests > 1) { 347 $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format ($total_guests), stripslashes($useronline_naming['guests']));347 $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_guests), stripslashes($useronline_naming['guests'])); 348 348 $template_browsingsite = str_replace('%USERONLINE_GUESTS%', $useronline_naming_guests, $template_browsingsite); 349 349 } elseif($total_guests == 1) { … … 355 355 // Nice Text For Bots 356 356 if($total_bots > 1) { 357 $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format ($total_bots), stripslashes($useronline_naming['bots']));357 $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_bots), stripslashes($useronline_naming['bots'])); 358 358 $template_browsingsite = str_replace('%USERONLINE_BOTS%', $useronline_naming_bots, $template_browsingsite); 359 359 } elseif($total_bots == 1) { … … 449 449 $template_browsingpage = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_browsingpage); 450 450 } else { 451 $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format ($total_users), stripslashes($useronline_naming['users']));451 $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_users), stripslashes($useronline_naming['users'])); 452 452 $template_browsingpage = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_browsingpage); 453 453 } … … 472 472 // Nice Text For Members 473 473 if($total_members > 1) { 474 $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format ($total_members), stripslashes($useronline_naming['members']));474 $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_members), stripslashes($useronline_naming['members'])); 475 475 $template_browsingpage = str_replace('%USERONLINE_MEMBERS%', $useronline_naming_members, $template_browsingpage); 476 476 } elseif($total_members == 1) { … … 482 482 // Nice Text For Guests 483 483 if($total_guests > 1) { 484 $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format ($total_guests), stripslashes($useronline_naming['guests']));484 $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_guests), stripslashes($useronline_naming['guests'])); 485 485 $template_browsingpage = str_replace('%USERONLINE_GUESTS%', $useronline_naming_guests, $template_browsingpage); 486 486 } elseif($total_guests == 1) { … … 492 492 // Nice Text For Bots 493 493 if($total_bots > 1) { 494 $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format ($total_bots), stripslashes($useronline_naming['bots']));494 $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_bots), stripslashes($useronline_naming['bots'])); 495 495 $template_browsingpage = str_replace('%USERONLINE_BOTS%', $useronline_naming_bots, $template_browsingpage); 496 496 } elseif($total_bots == 1) { … … 637 637 $nicetext_users = $total_users.' '.__('User', 'wp-useronline'); 638 638 } else { 639 $nicetext_users = number_format ($total_users).' '.__('Users', 'wp-useronline');639 $nicetext_users = number_format_i18n($total_users).' '.__('Users', 'wp-useronline'); 640 640 } 641 641 … … 644 644 $nicetext_members = $total_members.' '.__('Member', 'wp-useronline'); 645 645 } else { 646 $nicetext_members = number_format ($total_members).' '.__('Members', 'wp-useronline');646 $nicetext_members = number_format_i18n($total_members).' '.__('Members', 'wp-useronline'); 647 647 } 648 648 … … 652 652 $nicetext_guests = $total_guests.' '.__('Guest', 'wp-useronline'); 653 653 } else { 654 $nicetext_guests = number_format ($total_guests).' '.__('Guests', 'wp-useronline');654 $nicetext_guests = number_format_i18n($total_guests).' '.__('Guests', 'wp-useronline'); 655 655 } 656 656 … … 659 659 $nicetext_bots = $total_bots.' '.__('Bot', 'wp-useronline'); 660 660 } else { 661 $nicetext_bots = number_format ($total_bots).' '.__('Bots', 'wp-useronline');661 $nicetext_bots = number_format_i18n($total_bots).' '.__('Bots', 'wp-useronline'); 662 662 } 663 663 … … 674 674 } 675 675 $useronline_output .= "<strong>$nicetext_users</strong> ".__('online now', 'wp-useronline').": <strong>$nicetext_members</strong>, <strong>$nicetext_guests</strong> ".__('and', 'wp-useronline')." <strong>$nicetext_bots</strong>.</p>\n"; 676 $useronline_output .= '<p>'.__('Most users ever online were', 'wp-useronline')." <strong>".number_format (get_most_useronline())."</strong>, ".__('on', 'wp-useronline')." <strong>".get_most_useronline_date()."</strong></p>\n";676 $useronline_output .= '<p>'.__('Most users ever online were', 'wp-useronline')." <strong>".number_format_i18n(get_most_useronline())."</strong>, ".__('on', 'wp-useronline')." <strong>".get_most_useronline_date()."</strong></p>\n"; 677 677 // Print Out Members 678 678 if($total_members > 0) { … … 687 687 } 688 688 if($wp_stats) { 689 $useronline_output .= '<p><strong>#'.$no.' - <a href="'.useronline_stats_page_link($member['display_name']).'">'.$member['display_name'].'</a></strong> '.ip2nation_country($member['ip']).check_ip($member['ip']).' '.__('on', 'wp-useronline').' '. gmdate(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $member['timestamp']).'<br />'.$member['location'].' [<a href="'.$member['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";689 $useronline_output .= '<p><strong>#'.$no.' - <a href="'.useronline_stats_page_link($member['display_name']).'">'.$member['display_name'].'</a></strong> '.ip2nation_country($member['ip']).check_ip($member['ip']).' '.__('on', 'wp-useronline').' '.date_i18n(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $member['timestamp']).'<br />'.$member['location'].' [<a href="'.$member['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n"; 690 690 } else { 691 $useronline_output .= '<p><strong>#'.$no.' - '.$member['user_name'].'</strong> '.ip2nation_country($member['ip']).check_ip($member['ip']).' '.__('on', 'wp-useronline').' '. gmdate(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $member['timestamp']).'<br />'.$member['location'].' [<a href="'.$member['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";691 $useronline_output .= '<p><strong>#'.$no.' - '.$member['user_name'].'</strong> '.ip2nation_country($member['ip']).check_ip($member['ip']).' '.__('on', 'wp-useronline').' '.date_i18n(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $member['timestamp']).'<br />'.$member['location'].' [<a href="'.$member['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n"; 692 692 } 693 693 $no++; … … 707 707 } 708 708 if($wp_stats) { 709 $useronline_output .= '<p><strong>#'.$no.' - <a href="'.useronline_stats_page_link($guest['display_name']).'">'.$guest['display_name'].'</a></strong> '.ip2nation_country($guest['ip']).check_ip($guest['ip']).' '.__('on', 'wp-useronline').' '. gmdate(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $guest['timestamp']).'<br />'.$guest['location'].' [<a href="'.$guest['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";709 $useronline_output .= '<p><strong>#'.$no.' - <a href="'.useronline_stats_page_link($guest['display_name']).'">'.$guest['display_name'].'</a></strong> '.ip2nation_country($guest['ip']).check_ip($guest['ip']).' '.__('on', 'wp-useronline').' '.date_i18n(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $guest['timestamp']).'<br />'.$guest['location'].' [<a href="'.$guest['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n"; 710 710 } else { 711 $useronline_output .= '<p><strong>#'.$no.' - '.$guest['user_name'].'</strong> '.ip2nation_country($guest['ip']).check_ip($guest['ip']).' '.__('on', 'wp-useronline').' '. gmdate(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $guest['timestamp']).'<br />'.$guest['location'].' [<a href="'.$guest['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";711 $useronline_output .= '<p><strong>#'.$no.' - '.$guest['user_name'].'</strong> '.ip2nation_country($guest['ip']).check_ip($guest['ip']).' '.__('on', 'wp-useronline').' '.date_i18n(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $guest['timestamp']).'<br />'.$guest['location'].' [<a href="'.$guest['url'].'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n"; 712 712 } 713 713 $no++; … … 722 722 if($bots) { 723 723 foreach($bots as $bot) { 724 $useronline_output .= '<p><strong>#'.$no.' - '.$bot['display_name'].'</strong> '.check_ip($bot['ip']).' '.__('on', 'wp-useronline').' '. gmdate(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $bot['timestamp']).'<br />'.$bot['location'].' [<a href="'.$bot['url'].'">'.__('url', 'wp-useronline').'</a>]</p>'."\n";724 $useronline_output .= '<p><strong>#'.$no.' - '.$bot['display_name'].'</strong> '.check_ip($bot['ip']).' '.__('on', 'wp-useronline').' '.date_i18n(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $bot['timestamp']).'<br />'.$bot['location'].' [<a href="'.$bot['url'].'">'.__('url', 'wp-useronline').'</a>]</p>'."\n"; 725 725 $no++; 726 726 } … … 798 798 $content .= '<p><strong>'.__('WP-UserOnline', 'wp-useronline').'</strong></p>'."\n"; 799 799 $content .= '<ul>'."\n"; 800 $content .= '<li><strong>'.number_format (get_useronline_count()).'</strong> '.__('user(s) online now.', 'wp-useronline').'</li>'."\n";801 $content .= '<li>'.__('Most users ever online was', 'wp-useronline').' <strong>'.number_format (get_most_useronline()).'</strong>.</li>'."\n";800 $content .= '<li><strong>'.number_format_i18n(get_useronline_count()).'</strong> '.__('user(s) online now.', 'wp-useronline').'</li>'."\n"; 801 $content .= '<li>'.__('Most users ever online was', 'wp-useronline').' <strong>'.number_format_i18n(get_most_useronline()).'</strong>.</li>'."\n"; 802 802 $content .= '<li>'.__('On', 'wp-useronline').' <strong>'.get_most_useronline_date().'</strong>.</li>'."\n"; 803 803 $content .= '</ul>'."\n"; … … 837 837 // Add In Options 838 838 add_option('useronline_most_users', 1, 'Most Users Ever Online Count'); 839 add_option('useronline_most_timestamp', current_time('timestamp' ), 'Most Users Ever Online Date');839 add_option('useronline_most_timestamp', current_time('timestamp', 1), 'Most Users Ever Online Date'); 840 840 add_option('useronline_timeout', 300, 'Timeout In Seconds'); 841 841 add_option('useronline_bots', $bots, 'Bots Name/Useragent'); -
wp-useronline/trunk/useronline/wp-useronline.pot
r19237 r21739 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: WP-UserOnline 2.2 0\n"3 "Project-Id-Version: WP-UserOnline 2.21\n" 4 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: 2007- 09-19 00:22+0800\n"5 "PO-Revision-Date: 2007-10-13 15:52+0800\n" 6 6 "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 7 7 "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
