WP-UserOnline - Version 2.31

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-UserOnline
Version 2.31
Comparing to
See all releases

Code changes from version 2.20 to 2.31

readme.html CHANGED
@@ -2,7 +2,7 @@
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-UserOnline 2.20 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
@@ -204,7 +204,7 @@
204
  <body>
205
  <div id="Container">
206
  <!-- Title -->
207
- <div id="Title">WP-UserOnline 2.20&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
208
 
209
  <!-- Tabs -->
210
  <ul id="Tabs">
@@ -225,15 +225,6 @@
225
  <strong>Author:</strong><br />
226
  <strong>&raquo;</strong> Lester 'GaMerZ' Chan
227
  </p>
228
- <p>
229
- <strong>EMail:</strong><br />
230
- <strong>&raquo;</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
  <strong>Website:</strong><br />
239
  <strong>&raquo;</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a>
@@ -244,10 +235,11 @@
244
  </p>
245
  <p>
246
  <strong>Download:</strong><br />
247
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads.php?id=14" title="http://lesterchan.net/others/downloads.php?id=14">WP-UserOnline 2.20 For WordPress 2.3.x</a><br />
248
- <strong>&raquo;</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
- <strong>&raquo;</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 />
250
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-useronline.zip" title="http://lesterchan.net/others/downloads/wp-useronline.zip">WP-UserOnline 1.00 For WordPress 1.5.2</a>
 
251
  </p>
252
  <p>
253
  <strong>Screenshots:</strong><br />
@@ -269,10 +261,6 @@
269
  <strong>Support Forums:</strong><br />
270
  <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=21.0" title="http://forums.lesterchan.net/index.php?board=21.0">http://forums.lesterchan.net/index.php?board=21.0</a>
271
  </p>
272
- <p>
273
- <strong>Updated:</strong><br />
274
- <strong>&raquo;</strong> 1st October 2007
275
- </p>
276
  <p>
277
  <strong>Note:</strong><br />
278
  <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.
@@ -282,7 +270,7 @@
282
  <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
283
  <script type="text/javascript">
284
  /* <![CDATA[*/
285
- document.write(' <strong>gamerz84@hotmail.com</strong>.');
286
  /* ]]> */
287
  </script>
288
  </p>
@@ -292,6 +280,30 @@
292
  <div id="Changelog" style="display: none;">
293
  <div class="SubTitle">&raquo; Changelog</div>
294
  <ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  <li>
296
  <strong>Version 2.20 (01-10-2007)</strong>
297
  <ul>
@@ -396,7 +408,7 @@
396
  </li>
397
  <li>
398
  Put:
399
- <blockquote>Folder: useronline</blockquote>
400
  </li>
401
  <li>
402
  <strong>Activate</strong> WP-UserOnline Plugin
@@ -410,7 +422,7 @@
410
  <!-- Upgrade Instructions -->
411
  <div id="Upgrade" style="display: none;">
412
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
413
- <div class="SubSubTitle">From v1.0x To v2.20</div>
414
  <ol>
415
  <li>
416
  <strong>Deactivate</strong> WP-UserOnline Plugin
@@ -420,15 +432,12 @@
420
  </li>
421
  <li>
422
  Put/Overwrite:
423
- <blockquote>Folder: useronline</blockquote>
424
  </li>
425
  <li>
426
- Delete these file if exists:
427
  <blockquote>
428
- File: wp-useronline.php<br />
429
- File: wp-content/plugins/useronline.php<br />
430
- File: wp-content/plugins/useronline/wp-useronline.php<br />
431
- File: wp-content/plugins/useronline/useronline-js.js
432
  </blockquote>
433
  </li>
434
  <li>
@@ -468,16 +477,16 @@
468
  <strong>Activate</strong> WP-UserOnline Widget Plugin
469
  </li>
470
  <li>
471
- Go to '<strong>WP-Admin -> Presentation -> Widgets</strong>'
472
  </li>
473
  <li>
474
- <strong>Drag</strong> the UserOnline Widget to your sidebar
475
  </li>
476
  <li>
477
- You can <strong>configure</strong> the UserOnline Widget by clicking on the configure icon
478
  </li>
479
  <li>
480
- Click 'Save changes'
481
  </li>
482
  <li>
483
  Scroll down for instructions on how to create a <strong>UserOnline Page</strong>.
@@ -492,15 +501,18 @@
492
  Type any title you like in the post's title area
493
  </li>
494
  <li>
495
- Type '<strong>[page_useronline]</strong>' in the post's content area (without the quotes)
496
  </li>
497
  <li>
498
- Type '<strong>useronline</strong>' in the post's slug area (without the quotes)
 
 
 
499
  </li>
500
  <li>
501
  Click 'Publish'
502
  </li>
503
- <li>If you <strong>ARE NOT</strong> using nice permalinks, you need to go to 'WP-Admin -> Options -> Useronline' and under '<strong>UserOnline URL</strong>', you need to fill in the URL to the UserOnline Page you created above.</li>
504
  </ol>
505
  <div class="SubSubTitle">UserOnline Stats (Outside WP Loop)</div>
506
  <ul>
@@ -541,6 +553,6 @@
541
  </div>
542
  </div>
543
  </div>
544
- <p id="Copyright">WP-UserOnline 2.20<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
545
  </body>
546
  </html>
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-UserOnline 2.31 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
204
  <body>
205
  <div id="Container">
206
  <!-- Title -->
207
+ <div id="Title">WP-UserOnline 2.31&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
208
 
209
  <!-- Tabs -->
210
  <ul id="Tabs">
225
  <strong>Author:</strong><br />
226
  <strong>&raquo;</strong> Lester 'GaMerZ' Chan
227
  </p>
 
 
 
 
 
 
 
 
 
228
  <p>
229
  <strong>Website:</strong><br />
230
  <strong>&raquo;</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a>
235
  </p>
236
  <p>
237
  <strong>Download:</strong><br />
238
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.31.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.31.zip">WP-UserOnline 2.31 For WordPress 2.5.x And 2.6.x</a><br />
239
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.20.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.20.zip">WP-UserOnline 2.20 For WordPress 2.3.x</a><br />
240
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.11.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.11.zip">WP-UserOnline 2.11 For WordPress 2.1.x And 2.2.x</a><br />
241
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.06.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.06.zip">WP-UserOnline 2.06 For WordPress 2.0.x</a><br />
242
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.1.00.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.1.00.zip">WP-UserOnline 1.00 For WordPress 1.5.2</a>
243
  </p>
244
  <p>
245
  <strong>Screenshots:</strong><br />
261
  <strong>Support Forums:</strong><br />
262
  <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=21.0" title="http://forums.lesterchan.net/index.php?board=21.0">http://forums.lesterchan.net/index.php?board=21.0</a>
263
  </p>
 
 
 
 
264
  <p>
265
  <strong>Note:</strong><br />
266
  <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.
270
  <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
271
  <script type="text/javascript">
272
  /* <![CDATA[*/
273
+ document.write(' <strong>lesterchan@gmail.com</strong>.');
274
  /* ]]> */
275
  </script>
276
  </p>
280
  <div id="Changelog" style="display: none;">
281
  <div class="SubTitle">&raquo; Changelog</div>
282
  <ul>
283
+ <li>
284
+ <strong>Version 2.31 (16-07-2008)</strong>
285
+ <ul>
286
+ <li>NEW: Works For WordPress 2.6</li>
287
+ <li>FIXED: MYSQL Charset Issue Should Be Solved</li>
288
+ <li>FIXED: Do Not Show WP-Stats Link If There Is No WP-Stats</li>
289
+ </ul>
290
+ </li>
291
+ <li>
292
+ <strong>Version 2.30 (01-06-2008)</strong>
293
+ <ul>
294
+ <li>NEW: Works For WordPress 2.5 Only</li>
295
+ <li>NEW: Uses Shortcode API</li>
296
+ <li>NEW: Uses /wp-useronline/ Folder Instead Of /useronline/</li>
297
+ <li>NEW: Uses wp-useronline.php Instead Of useronline.php</li>
298
+ <li>NEW: Uses wp-useronline-widget.php Instead Of useronline-widget.php</li>
299
+ <li>NEW: Renamed useronline-js.php To useronline-js.js and Move The Dynamic Javascript Variables To The PHP Pages</li>
300
+ <li>NEW: Uses useronline-js-packed.js</li>
301
+ <li>NEW: Added Users Online To Dashboard "Right Now"</li>
302
+ <li>NEW: Use number_format_i18n() Instead</li>
303
+ <li>FIXED: Should Use display_name Instead Of user_name If WP-Stats Is Not Installed</li>
304
+ <li>FIXED: XSS Vulnerability</li>
305
+ </ul>
306
+ </li>
307
  <li>
308
  <strong>Version 2.20 (01-10-2007)</strong>
309
  <ul>
408
  </li>
409
  <li>
410
  Put:
411
+ <blockquote>Folder: wp-useronline</blockquote>
412
  </li>
413
  <li>
414
  <strong>Activate</strong> WP-UserOnline Plugin
422
  <!-- Upgrade Instructions -->
423
  <div id="Upgrade" style="display: none;">
424
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
425
+ <div class="SubSubTitle">From v2.0x To v2.31</div>
426
  <ol>
427
  <li>
428
  <strong>Deactivate</strong> WP-UserOnline Plugin
432
  </li>
433
  <li>
434
  Put/Overwrite:
435
+ <blockquote>Folder: wp-useronline</blockquote>
436
  </li>
437
  <li>
438
+ Delete this folder if exists:
439
  <blockquote>
440
+ Folder: useronline
 
 
 
441
  </blockquote>
442
  </li>
443
  <li>
477
  <strong>Activate</strong> WP-UserOnline Widget Plugin
478
  </li>
479
  <li>
480
+ Go to '<strong>WP-Admin -> Design -> Widgets</strong>'
481
  </li>
482
  <li>
483
+ You can <strong>add</strong> the UserOnline Widget by clicking on the 'Add' link besides it.
484
  </li>
485
  <li>
486
+ After adding, you can <strong>configure</strong> the UserOnline Widget by clicking on the 'Edit' link besides it.
487
  </li>
488
  <li>
489
+ Click 'Save Changes'
490
  </li>
491
  <li>
492
  Scroll down for instructions on how to create a <strong>UserOnline Page</strong>.
501
  Type any title you like in the post's title area
502
  </li>
503
  <li>
504
+ After typing the title, WordPress will generate the permalink to the page. You will see an 'Edit' link just beside the permalink.
505
  </li>
506
  <li>
507
+ Click 'Edit' and type in '<strong>useronline</strong>' in the text field (without the quotes) and click 'Save'.
508
+ </li>
509
+ <li>
510
+ Type '<strong>[page_useronline]</strong>' in the post's content area (without the quotes)
511
  </li>
512
  <li>
513
  Click 'Publish'
514
  </li>
515
+ <li>If you <strong>ARE NOT</strong> using nice permalinks, you need to go to 'WP-Admin -> Settings -> Useronline' and under '<strong>UserOnline URL</strong>', you need to fill in the URL to the UserOnline Page you created above.</li>
516
  </ol>
517
  <div class="SubSubTitle">UserOnline Stats (Outside WP Loop)</div>
518
  <ul>
553
  </div>
554
  </div>
555
  </div>
556
+ <p id="Copyright">WP-UserOnline 2.31<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
557
  </body>
558
  </html>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: useronline, usersonline, wp-useronline, online, users, user, ajax, widget
5
- Requires at least: 2.3.0
6
- Stable tag: 2.20
7
 
8
  Enable you to display how many users are online on your Wordpress blog with detailed statistics.
9
 
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: useronline, usersonline, wp-useronline, online, users, user, ajax, widget
5
+ Requires at least: 2.5.0
6
+ Stable tag: 2.31
7
 
8
  Enable you to display how many users are online on your Wordpress blog with detailed statistics.
9
 
useronline-js-packed.js ADDED
@@ -0,0 +1 @@
 
1
+ eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 s(){7(d.8(\'4-w\')!=5){g("t()",9)}7(d.8(\'4-6-q\')!=5){g("p()",9)}7(d.8(\'4-6-v\')!=5){g("u()",9)}}3 t(){1=h e(j);1.k("l",\'1\');1.m=\'n\';1.b=\'4-w\';1.c();1=5}3 p(){0=h e(j);0.k("l",\'0\');0.m=\'n\';0.b=\'4-6-q\';0.c();0=5}3 u(){2=h e(j);2.k("l",\'2\');2.m=\'n\';2.b=\'4-6-v\';2.c();2=5}r=3(f){y a=o.i;7(x a!=\'3\'){o.i=f}z{o.i=3(){a();f()}}};r(s);',36,36,'useronline_browsingsite|useronline_count|useronline_browsingpage|function|useronline|null|browsing|if|getElementById|useronline_timeout||element|runAJAX|document|sack||setInterval|new|onload|useronline_ajax_url|setVar|useronline_mode|method|GET|window|get_useronline_browsingsite|site|addLoadEvent|useronline_init|get_useronline_count|get_useronline_browsingpage|page|count|typeof|var|else'.split('|'),0,{}))
useronline/useronline-js.php → useronline-js.js RENAMED
@@ -1,9 +1,8 @@
1
- <?php
2
  /*
3
  +----------------------------------------------------------------+
4
  | |
5
- | WordPress 2.1 Plugin: WP-UserOnline 2.20 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
  | |
8
  | File Written By: |
9
  | - Lester "GaMerZ" Chan |
@@ -11,26 +10,12 @@
11
  | |
12
  | File Information: |
13
  | - Useronline Javascript File |
14
- | - wp-content/plugins/useronline/useronline-js.php |
15
  | |
16
  +----------------------------------------------------------------+
17
  */
18
 
19
 
20
- ### Include wp-config.php
21
- @require('../../../wp-config.php');
22
- cache_javascript_headers();
23
-
24
- ### Determine useronline.php Path
25
- $useronline_ajax_url = dirname($_SERVER['PHP_SELF']);
26
- if(substr($useronline_ajax_url, -1) == '/') {
27
- $useronline_ajax_url = substr($useronline_ajax_url, 0, -1);
28
- }
29
- ?>
30
- // Variables
31
- var useronline_ajax_url = "<?php echo $useronline_ajax_url; ?>/useronline.php";
32
- var useronline_timeout = <?php echo (get_option('useronline_timeout')*1000); ?>;
33
-
34
  // UserOnline JavaScript Init
35
  function useronline_init() {
36
  // Check Users Count
@@ -82,8 +67,12 @@ function get_useronline_browsingpage() {
82
 
83
 
84
  // Init UserOnline
85
- addLoadEvent = function(f) { var old = window.onload
86
- if (typeof old != 'function') window.onload = f
87
- else { window.onload = function() { old(); f() }}
88
- }
 
 
 
 
89
  addLoadEvent(useronline_init);
 
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.5 Plugin: WP-UserOnline 2.31 |
5
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
10
  | |
11
  | File Information: |
12
  | - Useronline Javascript File |
13
+ | - wp-content/plugins/wp-useronline/useronline-js.js |
14
  | |
15
  +----------------------------------------------------------------+
16
  */
17
 
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  // UserOnline JavaScript Init
20
  function useronline_init() {
21
  // Check Users Count
67
 
68
 
69
  // Init UserOnline
70
+ addLoadEvent = function(f) {
71
+ var old = window.onload;
72
+ if (typeof old != 'function') {
73
+ window.onload = f;
74
+ } else {
75
+ window.onload = function() { old(); f(); };
76
+ }
77
+ };
78
  addLoadEvent(useronline_init);
useronline-options.php ADDED
@@ -0,0 +1,385 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.5 Plugin: WP-UserOnline 2.31 |
6
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Useronline Options Page |
14
+ | - wp-content/plugins/wp-useronline/useronline-options.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Variables Variables Variables
21
+ $base_name = plugin_basename('wp-useronline/useronline-options.php');
22
+ $base_page = 'admin.php?page='.$base_name;
23
+ $mode = trim($_GET['mode']);
24
+ $useronline_tables = array($wpdb->useronline);
25
+ $useronline_settings = array('useronline_most_users', 'useronline_most_timestamp', 'useronline_timeout', 'useronline_bots', 'useronline_url', 'useronline_naming', 'useronline_template_useronline', 'useronline_template_browsingsite', 'useronline_template_browsingpage', 'widget_useronline');
26
+
27
+
28
+ ### Form Processing
29
+ // Update Options
30
+ if(!empty($_POST['Submit'])) {
31
+ $useronline_bots = array();
32
+ $useronline_timeout = intval($_POST['useronline_timeout']);
33
+ $useronline_bots_name = explode("\n", trim($_POST['useronline_bots_name']));
34
+ $useronline_bots_agent = explode("\n", trim($_POST['useronline_bots_agent']));
35
+ $useronline_bots_keys = array_values((array) $useronline_bots_name);
36
+ $useronline_bots_vals = array_values((array) $useronline_bots_agent);
37
+ $n = max(count($useronline_bots_keys), count($useronline_bots_vals));
38
+ for($i = 0; $i < $n; $i++) {
39
+ $useronline_bots[trim($useronline_bots_keys[$i])] = trim($useronline_bots_vals[$i]);
40
+ }
41
+ $useronline_url = trim($_POST['useronline_url']);
42
+ $useronline_naming_user = trim($_POST['useronline_naming_user']);
43
+ $useronline_naming_users = trim($_POST['useronline_naming_users']);
44
+ $useronline_naming_member = trim($_POST['useronline_naming_member']);
45
+ $useronline_naming_members = trim($_POST['useronline_naming_members']);
46
+ $useronline_naming_guest = trim($_POST['useronline_naming_guest']);
47
+ $useronline_naming_guests = trim($_POST['useronline_naming_guests']);
48
+ $useronline_naming_bot = trim($_POST['useronline_naming_bot']);
49
+ $useronline_naming_bots = trim($_POST['useronline_naming_bots']);
50
+ $useronline_naming = array('user' => $useronline_naming_user, 'users' => $useronline_naming_users, 'member' => $useronline_naming_member, 'members' => $useronline_naming_members, 'guest' => $useronline_naming_guest, 'guests' => $useronline_naming_guests, 'bot' => $useronline_naming_bot, 'bots' => $useronline_naming_bots);
51
+ $useronline_template_useronline = trim($_POST['useronline_template_useronline']);
52
+ $useronline_template_browsingsite = array($_POST['useronline_separator_browsingsite_members'], $_POST['useronline_separator_browsingsite_guests'], $_POST['useronline_separator_browsingsite_bots'], trim($_POST['useronline_template_browsingsite']));
53
+ $useronline_template_browsingpage = array($_POST['useronline_separator_browsingpage_members'], $_POST['useronline_separator_browsingpage_guests'], $_POST['useronline_separator_browsingpage_bots'], trim($_POST['useronline_template_browsingpage']));
54
+ $update_useronline_queries = array();
55
+ $update_useronline_text = array();
56
+ $update_useronline_queries[] = update_option('useronline_timeout', $useronline_timeout);
57
+ $update_useronline_queries[] = update_option('useronline_bots', $useronline_bots);
58
+ $update_useronline_queries[] = update_option('useronline_url', $useronline_url);
59
+ $update_useronline_queries[] = update_option('useronline_naming', $useronline_naming);
60
+ $update_useronline_queries[] = update_option('useronline_template_useronline', $useronline_template_useronline);
61
+ $update_useronline_queries[] = update_option('useronline_template_browsingsite', $useronline_template_browsingsite);
62
+ $update_useronline_queries[] = update_option('useronline_template_browsingpage', $useronline_template_browsingpage);
63
+ $update_useronline_text[] = __('Useronline Timeout', 'wp-useronline');
64
+ $update_useronline_text[] = __('Useronline Bots', 'wp-useronline');
65
+ $update_useronline_text[] = __('Useronline URL', 'wp-useronline');
66
+ $update_useronline_text[] = __('Useronline Naming Conventions', 'wp-useronline');
67
+ $update_useronline_text[] = __('User(s) Online Template', 'wp-useronline');
68
+ $update_useronline_text[] = __('User(s) Browsing Site Template', 'wp-useronline');
69
+ $update_useronline_text[] = __('User(s) Browsing Page Template', 'wp-useronline');
70
+ $i=0;
71
+ $text = '';
72
+ foreach($update_useronline_queries as $update_useronline_query) {
73
+ if($update_useronline_query) {
74
+ $text .= '<font color="green">'.$update_useronline_text[$i].' '.__('Updated', 'wp-useronline').'</font><br />';
75
+ }
76
+ $i++;
77
+ }
78
+ if(empty($text)) {
79
+ $text = '<font color="red">'.__('No Useronline Option Updated', 'wp-useronline').'</font>';
80
+ }
81
+ }
82
+ // Uninstall WP-UserOnline
83
+ if(!empty($_POST['do'])) {
84
+ switch($_POST['do']) {
85
+ case __('UNINSTALL WP-UserOnline', 'wp-useronline') :
86
+ if(trim($_POST['uninstall_useronline_yes']) == 'yes') {
87
+ echo '<div id="message" class="updated fade">';
88
+ echo '<p>';
89
+ foreach($useronline_tables as $table) {
90
+ $wpdb->query("DROP TABLE {$table}");
91
+ echo '<font style="color: green;">';
92
+ printf(__('Table \'%s\' has been deleted.', 'wp-useronline'), "<strong><em>{$table}</em></strong>");
93
+ echo '</font><br />';
94
+ }
95
+ echo '</p>';
96
+ echo '<p>';
97
+ foreach($useronline_settings as $setting) {
98
+ $delete_setting = delete_option($setting);
99
+ if($delete_setting) {
100
+ echo '<font color="green">';
101
+ printf(__('Setting Key \'%s\' has been deleted.', 'wp-useronline'), "<strong><em>{$setting}</em></strong>");
102
+ echo '</font><br />';
103
+ } else {
104
+ echo '<font color="red">';
105
+ printf(__('Error deleting Setting Key \'%s\'.', 'wp-useronline'), "<strong><em>{$setting}</em></strong>");
106
+ echo '</font><br />';
107
+ }
108
+ }
109
+ echo '</p>';
110
+ echo '</div>';
111
+ $mode = 'end-UNINSTALL';
112
+ }
113
+ break;
114
+ }
115
+ }
116
+
117
+
118
+ ### Determines Which Mode It Is
119
+ switch($mode) {
120
+ // Deactivating WP-UserOnline
121
+ case 'end-UNINSTALL':
122
+ $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-useronline/wp-useronline.php';
123
+ if(function_exists('wp_nonce_url')) {
124
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-useronline/wp-useronline.php');
125
+ }
126
+ echo '<div class="wrap">';
127
+ echo '<h2>'.__('Uninstall WP-UserOnline', 'wp-useronline').'</h2>';
128
+ echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-UserOnline Will Be Deactivated Automatically.', 'wp-useronline'), $deactivate_url).'</strong></p>';
129
+ echo '</div>';
130
+ break;
131
+ // Main Page
132
+ default:
133
+ $useronline_options_naming = get_option('useronline_naming');
134
+ $useronline_options_bots = get_option('useronline_bots');
135
+ $useronline_template_browsingsite = get_option('useronline_template_browsingsite');
136
+ $useronline_template_browsingpage = get_option('useronline_template_browsingpage');
137
+ $useronline_options_bots_name = '';
138
+ $useronline_options_bots_agent = '';
139
+ foreach($useronline_options_bots as $botname => $botagent) {
140
+ $useronline_options_bots_name .= $botname."\n";
141
+ $useronline_options_bots_agent .= $botagent."\n";
142
+ }
143
+ $useronline_options_bots_name = trim($useronline_options_bots_name);
144
+ $useronline_options_bots_agent = trim($useronline_options_bots_agent);
145
+ ?>
146
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
147
+ <script type="text/javascript">
148
+ /* <![CDATA[*/
149
+ function useronline_default_templates(template) {
150
+ var default_template;
151
+ switch(template) {
152
+ case "useronline":
153
+ default_template = "<a href=\"%USERONLINE_PAGE_URL%\" title=\"%USERONLINE_USERS%\"><strong>%USERONLINE_USERS%</strong> <?php _e('Online', 'wp-useronline'); ?></a>";
154
+ break;
155
+ }
156
+ document.getElementById("useronline_template_" + template).value = default_template;
157
+ }
158
+
159
+ function useronline_default_naming() {
160
+ document.getElementById('useronline_naming_user').value = "<?php _e('1 User', 'wp-useronline'); ?>";
161
+ document.getElementById('useronline_naming_users').value = "<?php _e('%USERONLINE_COUNT% Users', 'wp-useronline'); ?>";
162
+ document.getElementById('useronline_naming_member').value = "<?php _e('1 Member', 'wp-useronline'); ?>";
163
+ document.getElementById('useronline_naming_members').value = "<?php _e('%USERONLINE_COUNT% Members', 'wp-useronline'); ?>";
164
+ document.getElementById('useronline_naming_guest').value = "<?php _e('1 Guest', 'wp-useronline'); ?>";
165
+ document.getElementById('useronline_naming_guests').value = "<?php _e('%USERONLINE_COUNT% Guests', 'wp-useronline'); ?>";
166
+ document.getElementById('useronline_naming_bot').value = "<?php _e('1 Bot', 'wp-useronline'); ?>";
167
+ document.getElementById('useronline_naming_bots').value = "<?php _e('%USERONLINE_COUNT% Bots', 'wp-useronline'); ?>";
168
+ }
169
+ function useronline_default_browsing_site() {
170
+ document.getElementById('useronline_separator_browsingsite_members').value = ', ';
171
+ document.getElementById('useronline_separator_browsingsite_guests').value = ', ';
172
+ document.getElementById('useronline_separator_browsingsite_bots').value = ', ';
173
+ document.getElementById('useronline_template_browsingsite').value = "<?php _e('Users', 'wp-useronline'); ?>: <strong>%USERONLINE_MEMBER_NAMES%%USERONLINE_GUESTS_SEPERATOR%%USERONLINE_GUESTS%%USERONLINE_BOTS_SEPERATOR%%USERONLINE_BOTS%</strong>";
174
+ }
175
+ function useronline_default_browsing_page() {
176
+ document.getElementById('useronline_separator_browsingpage_members').value = ', ';
177
+ document.getElementById('useronline_separator_browsingpage_guests').value = ', ';
178
+ document.getElementById('useronline_separator_browsingpage_bots').value = ', ';
179
+ document.getElementById('useronline_template_browsingpage').value = "<strong>%USERONLINE_USERS%</strong> <?php _e('Browsing This Page.', 'wp-useronline'); ?><br /><?php _e('Users', 'wp-useronline'); ?>: <strong>%USERONLINE_MEMBER_NAMES%%USERONLINE_GUESTS_SEPERATOR%%USERONLINE_GUESTS%%USERONLINE_BOTS_SEPERATOR%%USERONLINE_BOTS%</strong>";
180
+ }
181
+ /* ]]> */
182
+ </script>
183
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
184
+ <div class="wrap">
185
+ <h2><?php _e('Useronline Options', 'wp-useronline'); ?></h2>
186
+ <h3><?php _e('Useronline Options', 'wp-useronline'); ?></h3>
187
+ <table class="form-table">
188
+ <tr>
189
+ <th scope="row" valign="top"><?php _e('Time Out', 'wp-useronline'); ?></th>
190
+ <td>
191
+ <input type="text" name="useronline_timeout" value="<?php echo get_option('useronline_timeout'); ?>" size="4" /><br /><?php _e('How long till it will remove the user from the database (In seconds).', 'wp-useronline'); ?>
192
+ </td>
193
+ </tr>
194
+ <tr>
195
+ <th scope="row" valign="top"><?php _e('UserOnline URL', 'wp-useronline'); ?></th>
196
+ <td>
197
+ <input type="text" name="useronline_url" value="<?php echo get_option('useronline_url'); ?>" size="50" /><br /><?php _e('URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-useronline'); ?>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <th scope="row" valign="top"><?php _e('Bots Name/User Agent', 'wp-useronline'); ?></th>
202
+ <td>
203
+ <?php _e('Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot\'s Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line.', 'wp-useronline'); ?>
204
+ <br /><br />
205
+ <textarea cols="20" rows="30" name="useronline_bots_name"><?php echo $useronline_options_bots_name; ?></textarea>
206
+ <textarea cols="20" rows="30" name="useronline_bots_agent"><?php echo $useronline_options_bots_agent; ?></textarea>
207
+ </td>
208
+ </tr>
209
+ <tr>
210
+ <td width="30%">
211
+ <strong><?php _e('Naming Conventions:', 'wp-useronline'); ?></strong><br /><br /><br />
212
+ <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
213
+ - %USERONLINE_COUNT%<br /><br />
214
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_naming();" class="button" />
215
+ </td>
216
+ <td>
217
+ <table class="form-table">
218
+ <thead>
219
+ <tr>
220
+ <th><?php _e('Singular Form', 'wp-useronline'); ?></th>
221
+ <th><?php _e('Plural Form', 'wp-useronline'); ?></th>
222
+ </tr>
223
+ </thead>
224
+ <tbody>
225
+ <tr>
226
+ <td><input type="text" id="useronline_naming_user" name="useronline_naming_user" value="<?php echo stripslashes($useronline_options_naming['user']); ?>" size="20" /></td>
227
+ <td><input type="text" id="useronline_naming_users" name="useronline_naming_users" value="<?php echo stripslashes($useronline_options_naming['users']); ?>" size="40" /></td>
228
+ </tr>
229
+ <tr>
230
+ <td><input type="text" id="useronline_naming_member" name="useronline_naming_member" value="<?php echo stripslashes($useronline_options_naming['member']); ?>" size="20" /></td>
231
+ <td><input type="text" id="useronline_naming_members" name="useronline_naming_members" value="<?php echo stripslashes($useronline_options_naming['members']); ?>" size="40" /></td>
232
+ </tr>
233
+ <tr>
234
+ <td><input type="text" id="useronline_naming_guest" name="useronline_naming_guest" value="<?php echo stripslashes($useronline_options_naming['guest']); ?>" size="20" /></td>
235
+ <td><input type="text" id="useronline_naming_guests" name="useronline_naming_guests" value="<?php echo stripslashes($useronline_options_naming['guests']); ?>" size="40" /></td>
236
+ </tr>
237
+ <tr>
238
+ <td><input type="text" id="useronline_naming_bot" name="useronline_naming_bot" value="<?php echo stripslashes($useronline_options_naming['bot']); ?>" size="20" /></td>
239
+ <td><input type="text" id="useronline_naming_bots" name="useronline_naming_bots" value="<?php echo stripslashes($useronline_options_naming['bots']); ?>" size="40" /></td>
240
+ </tr>
241
+ </tbody>
242
+ </table>
243
+ <br />
244
+ </td>
245
+ </tr>
246
+ </table>
247
+
248
+ <h3><?php _e('Useronline Templates', 'wp-useronline'); ?></h3>
249
+ <table class="form-table">
250
+ <tr>
251
+ <td width="30%">
252
+ <strong><?php _e('User(s) Online:', 'wp-useronline'); ?></strong><br /><br /><br />
253
+ <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
254
+ - %USERONLINE_USERS%<br />
255
+ - %USERONLINE_PAGE_URL%<br />
256
+ - %USERONLINE_MOSTONLINE_COUNT%<br />
257
+ - %USERONLINE_MOSTONLINE_DATE%<br /><br />
258
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_templates('useronline');" class="button" />
259
+ </td>
260
+ <td><textarea cols="80" rows="12" id="useronline_template_useronline" name="useronline_template_useronline"><?php echo htmlspecialchars(stripslashes(get_option('useronline_template_useronline'))); ?></textarea></td>
261
+ </tr>
262
+ <tr>
263
+ <td width="30%">
264
+ <strong><?php _e('User(s) Browsing Site:', 'wp-useronline'); ?></strong><br /><br /><br />
265
+ <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
266
+ - %USERONLINE_USERS%<br />
267
+ - %USERONLINE_MEMBERS%<br />
268
+ - %USERONLINE_MEMBER_NAMES%<br />
269
+ - %USERONLINE_GUESTS_SEPERATOR%<br />
270
+ - %USERONLINE_GUESTS%<br />
271
+ - %USERONLINE_BOTS_SEPERATOR%<br />
272
+ - %USERONLINE_BOTS%<br /><br />
273
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_browsing_site();" class="button" />
274
+ </td>
275
+ <td>
276
+ <table class="form-table">
277
+ <thead>
278
+ <tr>
279
+ <th><?php _e('Member Names Separator', 'wp-useronline'); ?></th>
280
+ <th><?php _e('Guests Separator', 'wp-useronline'); ?></th>
281
+ <th><?php _e('Bots Separator', 'wp-useronline'); ?></th>
282
+ </tr>
283
+ </thead>
284
+ <tr>
285
+ <td><input type="text" id="useronline_separator_browsingsite_members" name="useronline_separator_browsingsite_members" value="<?php echo stripslashes($useronline_template_browsingsite[0]); ?>" size="15" /></td>
286
+ <td><input type="text" id="useronline_separator_browsingsite_guests" name="useronline_separator_browsingsite_guests" value="<?php echo stripslashes($useronline_template_browsingsite[1]); ?>" size="15" /></td>
287
+ <td><input type="text" id="useronline_separator_browsingsite_bots" name="useronline_separator_browsingsite_bots" value="<?php echo stripslashes($useronline_template_browsingsite[2]); ?>" size="15" /></td>
288
+ </tr>
289
+ </table>
290
+ <br />
291
+ <textarea cols="80" rows="12" id="useronline_template_browsingsite" name="useronline_template_browsingsite"><?php echo htmlspecialchars(stripslashes($useronline_template_browsingsite[3])); ?></textarea>
292
+ </td>
293
+ </tr>
294
+ <tr>
295
+ <td width="30%">
296
+ <strong><?php _e('User(s) Browsing Page:', 'wp-useronline'); ?></strong><br /><br /><br />
297
+ <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
298
+ - %USERONLINE_USERS%<br />
299
+ - %USERONLINE_MEMBERS%<br />
300
+ - %USERONLINE_MEMBER_NAMES%<br />
301
+ - %USERONLINE_GUESTS_SEPERATOR%<br />
302
+ - %USERONLINE_GUESTS%<br />
303
+ - %USERONLINE_BOTS_SEPERATOR%<br />
304
+ - %USERONLINE_BOTS%<br /><br />
305
+ <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_browsing_page();" class="button" />
306
+ </td>
307
+ <td>
308
+ <table class="form-table">
309
+ <thead>
310
+ <tr>
311
+ <th><?php _e('Member Names Separator', 'wp-useronline'); ?></th>
312
+ <th><?php _e('Guests Separator', 'wp-useronline'); ?></th>
313
+ <th><?php _e('Bots Separator', 'wp-useronline'); ?></th>
314
+ </tr>
315
+ </thead>
316
+ <tr>
317
+ <td><input type="text" id="useronline_separator_browsingpage_members" name="useronline_separator_browsingpage_members" value="<?php echo stripslashes($useronline_template_browsingpage[0]); ?>" size="15" /></td>
318
+ <td><input type="text" id="useronline_separator_browsingpage_guests" name="useronline_separator_browsingpage_guests" value="<?php echo stripslashes($useronline_template_browsingpage[1]); ?>" size="15" /></td>
319
+ <td><input type="text" id="useronline_separator_browsingpage_bots" name="useronline_separator_browsingpage_bots" value="<?php echo stripslashes($useronline_template_browsingpage[2]); ?>" size="15" /></td>
320
+ </tr>
321
+ </table>
322
+ <br />
323
+ <textarea cols="80" rows="12" id="useronline_template_browsingpage" name="useronline_template_browsingpage"><?php echo htmlspecialchars(stripslashes($useronline_template_browsingpage[3])); ?></textarea>
324
+ </td>
325
+ </tr>
326
+ </table>
327
+ <p class="submit">
328
+ <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-useronline'); ?>" />
329
+ </p>
330
+ </div>
331
+ </form>
332
+ <p>&nbsp;</p>
333
+
334
+ <!-- Uninstall WP-UserOnline -->
335
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
336
+ <div class="wrap">
337
+ <h2><?php _e('Uninstall WP-UserOnline', 'wp-useronline'); ?></h2>
338
+ <p style="text-align: left;">
339
+ <?php _e('Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here.', 'wp-useronline'); ?>
340
+ </p>
341
+ <p style="text-align: left; color: red">
342
+ <strong><?php _e('WARNING:', 'wp-useronline'); ?></strong><br />
343
+ <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-useronline'); ?>
344
+ </p>
345
+ <p style="text-align: left; color: red">
346
+ <strong><?php _e('The following WordPress Options/Tables will be DELETED:', 'wp-useronline'); ?></strong><br />
347
+ </p>
348
+ <table class="widefat">
349
+ <thead>
350
+ <tr>
351
+ <th><?php _e('WordPress Options', 'wp-polls'); ?></th>
352
+ <th><?php _e('WordPress Tables', 'wp-polls'); ?></th>
353
+ </tr>
354
+ </thead>
355
+ <tr>
356
+ <td valign="top">
357
+ <ol>
358
+ <?php
359
+ foreach($useronline_settings as $settings) {
360
+ echo '<li>'.$settings.'</li>'."\n";
361
+ }
362
+ ?>
363
+ </ol>
364
+ </td>
365
+ <td valign="top" class="alternate">
366
+ <ol>
367
+ <?php
368
+ foreach($useronline_tables as $tables) {
369
+ echo '<li>'.$tables.'</li>'."\n";
370
+ }
371
+ ?>
372
+ </ol>
373
+ </td>
374
+ </tr>
375
+ </table>
376
+ <p>&nbsp;</p>
377
+ <p style="text-align: center;">
378
+ <input type="checkbox" name="uninstall_useronline_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-useronline'); ?><br /><br />
379
+ <input type="submit" name="do" value="<?php _e('UNINSTALL WP-UserOnline', 'wp-useronline'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-UserOnline From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-useronline'); ?>')" />
380
+ </p>
381
+ </div>
382
+ </form>
383
+ <?php
384
+ } // End switch($mode)
385
+ ?>
useronline/useronline-options.php DELETED
@@ -1,374 +0,0 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.1 Plugin: WP-UserOnline 2.20 |
6
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Useronline Options Page |
14
- | - wp-content/plugins/useronline/useronline-options.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Variables Variables Variables
21
- $base_name = plugin_basename('useronline/useronline-options.php');
22
- $base_page = 'admin.php?page='.$base_name;
23
- $mode = trim($_GET['mode']);
24
- $useronline_tables = array($wpdb->useronline);
25
- $useronline_settings = array('useronline_most_users', 'useronline_most_timestamp', 'useronline_timeout', 'useronline_bots', 'useronline_url', 'useronline_naming', 'useronline_template_useronline', 'useronline_template_browsingsite', 'useronline_template_browsingpage', 'widget_useronline');
26
-
27
-
28
- ### Form Processing
29
- if(!empty($_POST['do'])) {
30
- // Decide What To Do
31
- switch($_POST['do']) {
32
- case __('Update Options', 'wp-useronline'):
33
- $useronline_bots = array();
34
- $useronline_timeout = intval($_POST['useronline_timeout']);
35
- $useronline_bots_name = explode("\n", trim($_POST['useronline_bots_name']));
36
- $useronline_bots_agent = explode("\n", trim($_POST['useronline_bots_agent']));
37
- $useronline_bots_keys = array_values((array) $useronline_bots_name);
38
- $useronline_bots_vals = array_values((array) $useronline_bots_agent);
39
- $n = max(count($useronline_bots_keys), count($useronline_bots_vals));
40
- for($i = 0; $i < $n; $i++) {
41
- $useronline_bots[trim($useronline_bots_keys[$i])] = trim($useronline_bots_vals[$i]);
42
- }
43
- $useronline_url = trim($_POST['useronline_url']);
44
- $useronline_naming_user = trim($_POST['useronline_naming_user']);
45
- $useronline_naming_users = trim($_POST['useronline_naming_users']);
46
- $useronline_naming_member = trim($_POST['useronline_naming_member']);
47
- $useronline_naming_members = trim($_POST['useronline_naming_members']);
48
- $useronline_naming_guest = trim($_POST['useronline_naming_guest']);
49
- $useronline_naming_guests = trim($_POST['useronline_naming_guests']);
50
- $useronline_naming_bot = trim($_POST['useronline_naming_bot']);
51
- $useronline_naming_bots = trim($_POST['useronline_naming_bots']);
52
- $useronline_naming = array('user' => $useronline_naming_user, 'users' => $useronline_naming_users, 'member' => $useronline_naming_member, 'members' => $useronline_naming_members, 'guest' => $useronline_naming_guest, 'guests' => $useronline_naming_guests, 'bot' => $useronline_naming_bot, 'bots' => $useronline_naming_bots);
53
- $useronline_template_useronline = trim($_POST['useronline_template_useronline']);
54
- $useronline_template_browsingsite = array($_POST['useronline_separator_browsingsite_members'], $_POST['useronline_separator_browsingsite_guests'], $_POST['useronline_separator_browsingsite_bots'], trim($_POST['useronline_template_browsingsite']));
55
- $useronline_template_browsingpage = array($_POST['useronline_separator_browsingpage_members'], $_POST['useronline_separator_browsingpage_guests'], $_POST['useronline_separator_browsingpage_bots'], trim($_POST['useronline_template_browsingpage']));
56
- $update_useronline_queries = array();
57
- $update_useronline_text = array();
58
- $update_useronline_queries[] = update_option('useronline_timeout', $useronline_timeout);
59
- $update_useronline_queries[] = update_option('useronline_bots', $useronline_bots);
60
- $update_useronline_queries[] = update_option('useronline_url', $useronline_url);
61
- $update_useronline_queries[] = update_option('useronline_naming', $useronline_naming);
62
- $update_useronline_queries[] = update_option('useronline_template_useronline', $useronline_template_useronline);
63
- $update_useronline_queries[] = update_option('useronline_template_browsingsite', $useronline_template_browsingsite);
64
- $update_useronline_queries[] = update_option('useronline_template_browsingpage', $useronline_template_browsingpage);
65
- $update_useronline_text[] = __('Useronline Timeout', 'wp-useronline');
66
- $update_useronline_text[] = __('Useronline Bots', 'wp-useronline');
67
- $update_useronline_text[] = __('Useronline URL', 'wp-useronline');
68
- $update_useronline_text[] = __('Useronline Naming Conventions', 'wp-useronline');
69
- $update_useronline_text[] = __('User(s) Online Template', 'wp-useronline');
70
- $update_useronline_text[] = __('User(s) Browsing Site Template', 'wp-useronline');
71
- $update_useronline_text[] = __('User(s) Browsing Page Template', 'wp-useronline');
72
- $i=0;
73
- $text = '';
74
- foreach($update_useronline_queries as $update_useronline_query) {
75
- if($update_useronline_query) {
76
- $text .= '<font color="green">'.$update_useronline_text[$i].' '.__('Updated', 'wp-useronline').'</font><br />';
77
- }
78
- $i++;
79
- }
80
- if(empty($text)) {
81
- $text = '<font color="red">'.__('No Useronline Option Updated', 'wp-useronline').'</font>';
82
- }
83
- break;
84
- // Uninstall WP-UserOnline
85
- case __('UNINSTALL WP-UserOnline', 'wp-useronline') :
86
- if(trim($_POST['uninstall_useronline_yes']) == 'yes') {
87
- echo '<div id="message" class="updated fade">';
88
- echo '<p>';
89
- foreach($useronline_tables as $table) {
90
- $wpdb->query("DROP TABLE {$table}");
91
- echo '<font style="color: green;">';
92
- printf(__('Table \'%s\' has been deleted.', 'wp-useronline'), "<strong><em>{$table}</em></strong>");
93
- echo '</font><br />';
94
- }
95
- echo '</p>';
96
- echo '<p>';
97
- foreach($useronline_settings as $setting) {
98
- $delete_setting = delete_option($setting);
99
- if($delete_setting) {
100
- echo '<font color="green">';
101
- printf(__('Setting Key \'%s\' has been deleted.', 'wp-useronline'), "<strong><em>{$setting}</em></strong>");
102
- echo '</font><br />';
103
- } else {
104
- echo '<font color="red">';
105
- printf(__('Error deleting Setting Key \'%s\'.', 'wp-useronline'), "<strong><em>{$setting}</em></strong>");
106
- echo '</font><br />';
107
- }
108
- }
109
- echo '</p>';
110
- echo '</div>';
111
- $mode = 'end-UNINSTALL';
112
- }
113
- break;
114
- }
115
- }
116
-
117
-
118
- ### Determines Which Mode It Is
119
- switch($mode) {
120
- // Deactivating WP-UserOnline
121
- case 'end-UNINSTALL':
122
- $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=useronline/useronline.php';
123
- if(function_exists('wp_nonce_url')) {
124
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_useronline/useronline.php');
125
- }
126
- echo '<div class="wrap">';
127
- echo '<h2>'.__('Uninstall WP-UserOnline', 'wp-useronline').'</h2>';
128
- echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-UserOnline Will Be Deactivated Automatically.', 'wp-useronline'), $deactivate_url).'</strong></p>';
129
- echo '</div>';
130
- break;
131
- // Main Page
132
- default:
133
- $useronline_options_naming = get_option('useronline_naming');
134
- $useronline_options_bots = get_option('useronline_bots');
135
- $useronline_template_browsingsite = get_option('useronline_template_browsingsite');
136
- $useronline_template_browsingpage = get_option('useronline_template_browsingpage');
137
- $useronline_options_bots_name = '';
138
- $useronline_options_bots_agent = '';
139
- foreach($useronline_options_bots as $botname => $botagent) {
140
- $useronline_options_bots_name .= $botname."\n";
141
- $useronline_options_bots_agent .= $botagent."\n";
142
- }
143
- $useronline_options_bots_name = trim($useronline_options_bots_name);
144
- $useronline_options_bots_agent = trim($useronline_options_bots_agent);
145
- ?>
146
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
147
- <script type="text/javascript">
148
- /* <![CDATA[*/
149
- function useronline_default_templates(template) {
150
- var default_template;
151
- switch(template) {
152
- case "useronline":
153
- default_template = "<a href=\"%USERONLINE_PAGE_URL%\" title=\"%USERONLINE_USERS%\"><strong>%USERONLINE_USERS%</strong> <?php _e('Online', 'wp-useronline'); ?></a>";
154
- break;
155
- }
156
- document.getElementById("useronline_template_" + template).value = default_template;
157
- }
158
-
159
- function useronline_default_naming() {
160
- document.getElementById('useronline_naming_user').value = "<?php _e('1 User', 'wp-useronline'); ?>";
161
- document.getElementById('useronline_naming_users').value = "<?php _e('%USERONLINE_COUNT% Users', 'wp-useronline'); ?>";
162
- document.getElementById('useronline_naming_member').value = "<?php _e('1 Member', 'wp-useronline'); ?>";
163
- document.getElementById('useronline_naming_members').value = "<?php _e('%USERONLINE_COUNT% Members', 'wp-useronline'); ?>";
164
- document.getElementById('useronline_naming_guest').value = "<?php _e('1 Guest', 'wp-useronline'); ?>";
165
- document.getElementById('useronline_naming_guests').value = "<?php _e('%USERONLINE_COUNT% Guests', 'wp-useronline'); ?>";
166
- document.getElementById('useronline_naming_bot').value = "<?php _e('1 Bot', 'wp-useronline'); ?>";
167
- document.getElementById('useronline_naming_bots').value = "<?php _e('%USERONLINE_COUNT% Bots', 'wp-useronline'); ?>";
168
- }
169
- function useronline_default_browsing_site() {
170
- document.getElementById('useronline_separator_browsingsite_members').value = ', ';
171
- document.getElementById('useronline_separator_browsingsite_guests').value = ', ';
172
- document.getElementById('useronline_separator_browsingsite_bots').value = ', ';
173
- document.getElementById('useronline_template_browsingsite').value = "<?php _e('Users', 'wp-useronline'); ?>: <strong>%USERONLINE_MEMBER_NAMES%%USERONLINE_GUESTS_SEPERATOR%%USERONLINE_GUESTS%%USERONLINE_BOTS_SEPERATOR%%USERONLINE_BOTS%</strong>";
174
- }
175
- function useronline_default_browsing_page() {
176
- document.getElementById('useronline_separator_browsingpage_members').value = ', ';
177
- document.getElementById('useronline_separator_browsingpage_guests').value = ', ';
178
- document.getElementById('useronline_separator_browsingpage_bots').value = ', ';
179
- document.getElementById('useronline_template_browsingpage').value = "<strong>%USERONLINE_USERS%</strong> <?php _e('Browsing This Page.', 'wp-useronline'); ?><br /><?php _e('Users', 'wp-useronline'); ?>: <strong>%USERONLINE_MEMBER_NAMES%%USERONLINE_GUESTS_SEPERATOR%%USERONLINE_GUESTS%%USERONLINE_BOTS_SEPERATOR%%USERONLINE_BOTS%</strong>";
180
- }
181
- /* ]]> */
182
- </script>
183
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
184
- <div class="wrap">
185
- <h2><?php _e('Useronline Options', 'wp-useronline'); ?></h2>
186
- <fieldset class="options">
187
- <legend><?php _e('Useronline Options', 'wp-useronline'); ?></legend>
188
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
189
- <tr valign="top">
190
- <th align="left" width="30%"><?php _e('Time Out', 'wp-useronline'); ?></th>
191
- <td align="left">
192
- <input type="text" name="useronline_timeout" value="<?php echo get_option('useronline_timeout'); ?>" size="4" /><br /><?php _e('How long till it will remove the user from the database (In seconds).', 'wp-useronline'); ?>
193
- </td>
194
- </tr>
195
- <tr valign="top">
196
- <th align="left" width="30%"><?php _e('UserOnline URL', 'wp-useronline'); ?></th>
197
- <td align="left">
198
- <input type="text" name="useronline_url" value="<?php echo get_option('useronline_url'); ?>" size="50" /><br /><?php _e('URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-useronline'); ?>
199
- </td>
200
- </tr>
201
- <tr valign="top">
202
- <th align="left" width="30%"><?php _e('Bots Name/User Agent', 'wp-useronline'); ?></th>
203
- <td align="left">
204
- <?php _e('Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot\'s Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line.', 'wp-useronline'); ?>
205
- <br /><br />
206
- <textarea cols="20" rows="30" name="useronline_bots_name"><?php echo $useronline_options_bots_name; ?></textarea>
207
- <textarea cols="20" rows="30" name="useronline_bots_agent"><?php echo $useronline_options_bots_agent; ?></textarea>
208
- </td>
209
- </tr>
210
- <tr valign="top">
211
- <td width="30%" align="left">
212
- <strong><?php _e('Naming Conventions:', 'wp-useronline'); ?></strong><br /><br /><br />
213
- <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
214
- - %USERONLINE_COUNT%<br /><br />
215
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_naming();" class="button" />
216
- </td>
217
- <td align="left">
218
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
219
- <tr>
220
- <th><?php _e('Singular Form', 'wp-useronline'); ?></th>
221
- <th><?php _e('Plural Form', 'wp-useronline'); ?></th>
222
- </tr>
223
- <tr>
224
- <td><input type="text" id="useronline_naming_user" name="useronline_naming_user" value="<?php echo stripslashes($useronline_options_naming['user']); ?>" size="20" /></td>
225
- <td><input type="text" id="useronline_naming_users" name="useronline_naming_users" value="<?php echo stripslashes($useronline_options_naming['users']); ?>" size="40" /></td>
226
- </tr>
227
- <tr>
228
- <td><input type="text" id="useronline_naming_member" name="useronline_naming_member" value="<?php echo stripslashes($useronline_options_naming['member']); ?>" size="20" /></td>
229
- <td><input type="text" id="useronline_naming_members" name="useronline_naming_members" value="<?php echo stripslashes($useronline_options_naming['members']); ?>" size="40" /></td>
230
- </tr>
231
- <tr>
232
- <td><input type="text" id="useronline_naming_guest" name="useronline_naming_guest" value="<?php echo stripslashes($useronline_options_naming['guest']); ?>" size="20" /></td>
233
- <td><input type="text" id="useronline_naming_guests" name="useronline_naming_guests" value="<?php echo stripslashes($useronline_options_naming['guests']); ?>" size="40" /></td>
234
- </tr>
235
- <tr>
236
- <td><input type="text" id="useronline_naming_bot" name="useronline_naming_bot" value="<?php echo stripslashes($useronline_options_naming['bot']); ?>" size="20" /></td>
237
- <td><input type="text" id="useronline_naming_bots" name="useronline_naming_bots" value="<?php echo stripslashes($useronline_options_naming['bots']); ?>" size="40" /></td>
238
- </tr>
239
- </table>
240
- </td>
241
- </tr>
242
- </table>
243
- </fieldset>
244
- <fieldset class="options">
245
- <legend><?php _e('Useronline Templates', 'wp-useronline'); ?></legend>
246
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
247
- <tr valign="top">
248
- <td width="30%" align="left">
249
- <strong><?php _e('User(s) Online:', 'wp-useronline'); ?></strong><br /><br /><br />
250
- <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
251
- - %USERONLINE_USERS%<br />
252
- - %USERONLINE_PAGE_URL%<br />
253
- - %USERONLINE_MOSTONLINE_COUNT%<br />
254
- - %USERONLINE_MOSTONLINE_DATE%<br /><br />
255
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_templates('useronline');" class="button" />
256
- </td>
257
- <td align="left"><textarea cols="80" rows="12" id="useronline_template_useronline" name="useronline_template_useronline"><?php echo htmlspecialchars(stripslashes(get_option('useronline_template_useronline'))); ?></textarea></td>
258
- </tr>
259
- <tr valign="top">
260
- <td width="30%" align="left">
261
- <strong><?php _e('User(s) Browsing Site:', 'wp-useronline'); ?></strong><br /><br /><br />
262
- <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
263
- - %USERONLINE_USERS%<br />
264
- - %USERONLINE_MEMBERS%<br />
265
- - %USERONLINE_MEMBER_NAMES%<br />
266
- - %USERONLINE_GUESTS_SEPERATOR%<br />
267
- - %USERONLINE_GUESTS%<br />
268
- - %USERONLINE_BOTS_SEPERATOR%<br />
269
- - %USERONLINE_BOTS%<br /><br />
270
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_browsing_site();" class="button" />
271
- </td>
272
- <td align="left">
273
- <table width="90%" border="0" cellspacing="3" cellpadding="3">
274
- <tr>
275
- <th><?php _e('Member Names Separator', 'wp-useronline'); ?></th>
276
- <th><?php _e('Guests Separator', 'wp-useronline'); ?></th>
277
- <th><?php _e('Bots Separator', 'wp-useronline'); ?></th>
278
- </tr>
279
- <tr>
280
- <td><input type="text" id="useronline_separator_browsingsite_members" name="useronline_separator_browsingsite_members" value="<?php echo stripslashes($useronline_template_browsingsite[0]); ?>" size="15" /></td>
281
- <td><input type="text" id="useronline_separator_browsingsite_guests" name="useronline_separator_browsingsite_guests" value="<?php echo stripslashes($useronline_template_browsingsite[1]); ?>" size="15" /></td>
282
- <td><input type="text" id="useronline_separator_browsingsite_bots" name="useronline_separator_browsingsite_bots" value="<?php echo stripslashes($useronline_template_browsingsite[2]); ?>" size="15" /></td>
283
- </tr>
284
- </table>
285
- <textarea cols="80" rows="12" id="useronline_template_browsingsite" name="useronline_template_browsingsite"><?php echo htmlspecialchars(stripslashes($useronline_template_browsingsite[3])); ?></textarea>
286
- </td>
287
- </tr>
288
- <tr valign="top">
289
- <td width="30%" align="left">
290
- <strong><?php _e('User(s) Browsing Page:', 'wp-useronline'); ?></strong><br /><br /><br />
291
- <?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
292
- - %USERONLINE_USERS%<br />
293
- - %USERONLINE_MEMBERS%<br />
294
- - %USERONLINE_MEMBER_NAMES%<br />
295
- - %USERONLINE_GUESTS_SEPERATOR%<br />
296
- - %USERONLINE_GUESTS%<br />
297
- - %USERONLINE_BOTS_SEPERATOR%<br />
298
- - %USERONLINE_BOTS%<br /><br />
299
- <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_browsing_page();" class="button" />
300
- </td>
301
- <td align="left">
302
- <table width="90%" border="0" cellspacing="3" cellpadding="3">
303
- <tr>
304
- <th><?php _e('Member Names Separator', 'wp-useronline'); ?></th>
305
- <th><?php _e('Guests Separator', 'wp-useronline'); ?></th>
306
- <th><?php _e('Bots Separator', 'wp-useronline'); ?></th>
307
- </tr>
308
- <tr>
309
- <td><input type="text" id="useronline_separator_browsingpage_members" name="useronline_separator_browsingpage_members" value="<?php echo stripslashes($useronline_template_browsingpage[0]); ?>" size="15" /></td>
310
- <td><input type="text" id="useronline_separator_browsingpage_guests" name="useronline_separator_browsingpage_guests" value="<?php echo stripslashes($useronline_template_browsingpage[1]); ?>" size="15" /></td>
311
- <td><input type="text" id="useronline_separator_browsingpage_bots" name="useronline_separator_browsingpage_bots" value="<?php echo stripslashes($useronline_template_browsingpage[2]); ?>" size="15" /></td>
312
- </tr>
313
- </table>
314
- <textarea cols="80" rows="12" id="useronline_template_browsingpage" name="useronline_template_browsingpage"><?php echo htmlspecialchars(stripslashes($useronline_template_browsingpage[3])); ?></textarea>
315
- </td>
316
- </tr>
317
- </table>
318
- </fieldset>
319
- <div align="center">
320
- <input type="submit" name="do" class="button" value="<?php _e('Update Options', 'wp-useronline'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-useronline'); ?>" class="button" onclick="javascript:history.go(-1)" />
321
- </div>
322
- </div>
323
- </form>
324
-
325
- <!-- Uninstall WP-UserOnline -->
326
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
327
- <div class="wrap">
328
- <h2><?php _e('Uninstall WP-UserOnline', 'wp-useronline'); ?></h2>
329
- <p style="text-align: left;">
330
- <?php _e('Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here.', 'wp-useronline'); ?>
331
- </p>
332
- <p style="text-align: left; color: red">
333
- <strong><?php _e('WARNING:', 'wp-useronline'); ?></strong><br />
334
- <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-useronline'); ?>
335
- </p>
336
- <p style="text-align: left; color: red">
337
- <strong><?php _e('The following WordPress Options/Tables will be DELETED:', 'wp-useronline'); ?></strong><br />
338
- </p>
339
- <table width="70%" border="0" cellspacing="3" cellpadding="3">
340
- <tr class="thead">
341
- <td align="center"><strong><?php _e('WordPress Options', 'wp-useronline'); ?></strong></td>
342
- <td align="center"><strong><?php _e('WordPress Tables', 'wp-useronline'); ?></strong></td>
343
- </tr>
344
- <tr>
345
- <td valign="top" style="background-color: #eee;">
346
- <ol>
347
- <?php
348
- foreach($useronline_settings as $settings) {
349
- echo '<li>'.$settings.'</li>'."\n";
350
- }
351
- ?>
352
- </ol>
353
- </td>
354
- <td valign="top" style="background-color: #eee;">
355
- <ol>
356
- <?php
357
- foreach($useronline_tables as $tables) {
358
- echo '<li>'.$tables.'</li>'."\n";
359
- }
360
- ?>
361
- </ol>
362
- </td>
363
- </tr>
364
- </table>
365
- <p>&nbsp;</p>
366
- <p style="text-align: center;">
367
- <input type="checkbox" name="uninstall_useronline_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-useronline'); ?><br /><br />
368
- <input type="submit" name="do" value="<?php _e('UNINSTALL WP-UserOnline', 'wp-useronline'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-UserOnline From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-useronline'); ?>')" />
369
- </p>
370
- </div>
371
- </form>
372
- <?php
373
- } // End switch($mode)
374
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
useronline/wp-useronline.mo DELETED
Binary file
useronline/useronline-widget.php → wp-useronline-widget.php RENAMED
@@ -1,16 +1,16 @@
1
  <?php
2
  /*
3
  Plugin Name: WP-UserOnline Widget
4
- Plugin URI: http://lesterchan.net/portfolio/programming.php
5
  Description: Adds a UserOnline Widget to display users online from WP-UserOnline Plugin. You need to activate WP-UserOnline first.
6
- Version: 2.20
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
- Copyright 2007 Lester Chan (email : gamerz84@hotmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ function widget_useronline_init() {
38
  function widget_useronline($args) {
39
  extract($args);
40
  $options = get_option('widget_useronline');
41
- $title = htmlspecialchars($options['title']);
42
  echo $before_widget.$before_title.$title.$after_title;
43
  if (function_exists('useronline')) {
44
  echo '<ul>'."\n";
@@ -63,10 +63,10 @@ function widget_useronline_init() {
63
  }
64
  if ($_POST['useronline-submit']) {
65
  $options['display_usersbrowsingsite'] = intval($_POST['useronline-usersbrowsingsite']);
66
- $options['title'] = strip_tags(stripslashes($_POST['useronline-title']));
67
  update_option('widget_useronline', $options);
68
  }
69
- echo '<p style="text-align: left;"><label for="useronline-title">'.__('Widget Title', 'wp-useronline').':</label>&nbsp;&nbsp;&nbsp;<input type="text" id="useronline-title" name="useronline-title" value="'.htmlspecialchars($options['title']).'" />';
70
  echo '<p style="text-align: center;">'.__('Display Users Browsing Site Under Users Online Count?', 'wp-useronline').'</p>'."\n";
71
  echo '<p style="text-align: center;"><input type="radio" id="useronline-usersbrowsingsite-1" name="useronline-usersbrowsingsite" value="1"';
72
  checked(1, intval($options['display_usersbrowsingsite']));
1
  <?php
2
  /*
3
  Plugin Name: WP-UserOnline Widget
4
+ Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Adds a UserOnline Widget to display users online from WP-UserOnline Plugin. You need to activate WP-UserOnline first.
6
+ Version: 2.31
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
+ Copyright 2008 Lester Chan (email : lesterchan@gmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
38
  function widget_useronline($args) {
39
  extract($args);
40
  $options = get_option('widget_useronline');
41
+ $title = htmlspecialchars(stripslashes($options['title']));
42
  echo $before_widget.$before_title.$title.$after_title;
43
  if (function_exists('useronline')) {
44
  echo '<ul>'."\n";
63
  }
64
  if ($_POST['useronline-submit']) {
65
  $options['display_usersbrowsingsite'] = intval($_POST['useronline-usersbrowsingsite']);
66
+ $options['title'] = strip_tags($_POST['useronline-title']);
67
  update_option('widget_useronline', $options);
68
  }
69
+ echo '<p style="text-align: left;"><label for="useronline-title">'.__('Widget Title', 'wp-useronline').':</label>&nbsp;&nbsp;&nbsp;<input type="text" id="useronline-title" name="useronline-title" value="'.htmlspecialchars(stripslashes($options['title'])).'" />';
70
  echo '<p style="text-align: center;">'.__('Display Users Browsing Site Under Users Online Count?', 'wp-useronline').'</p>'."\n";
71
  echo '<p style="text-align: center;"><input type="radio" id="useronline-usersbrowsingsite-1" name="useronline-usersbrowsingsite" value="1"';
72
  checked(1, intval($options['display_usersbrowsingsite']));
wp-useronline.mo ADDED
Binary file
useronline/useronline.php → wp-useronline.php RENAMED
@@ -1,16 +1,16 @@
1
  <?php
2
  /*
3
  Plugin Name: WP-UserOnline
4
- Plugin URI: http://lesterchan.net/portfolio/programming.php
5
  Description: Enable you to display how many users are online on your Wordpress blog with detailed statistics of where they are and who there are(Members/Guests/Search Bots).
6
- Version: 2.20
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
- Copyright 2007 Lester Chan (email : gamerz84@hotmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -30,29 +30,54 @@ Author URI: http://lesterchan.net
30
 
31
  ### Load WP-Config File If This File Is Called Directly
32
  if (!function_exists('add_action')) {
33
- require_once('../../../wp-config.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
 
36
 
37
  ### Create Text Domain For Translations
38
  add_action('init', 'useronline_textdomain');
39
  function useronline_textdomain() {
40
- load_plugin_textdomain('wp-useronline', 'wp-content/plugins/useronline');
 
 
 
 
41
  }
42
 
43
 
44
  ### UserOnline Table Name
45
- $wpdb->useronline = $table_prefix . 'useronline';
 
46
 
47
 
48
  ### Function: WP-UserOnline Menu
49
  add_action('admin_menu', 'useronline_menu');
50
  function useronline_menu() {
51
  if (function_exists('add_submenu_page')) {
52
- add_submenu_page('index.php', __('WP-UserOnline', 'wp-useronline'), __('WP-UserOnline', 'wp-useronline'), 1, 'useronline/useronline.php', 'display_useronline');
53
  }
54
  if (function_exists('add_options_page')) {
55
- add_options_page(__('Useronline', 'wp-useronline'), __('Useronline', 'wp-useronline'), 'manage_options', 'useronline/useronline-options.php');
56
  }
57
  }
58
 
@@ -60,10 +85,16 @@ function useronline_menu() {
60
  ### Function: Displays UserOnline Header
61
  add_action('wp_head', 'useronline_header');
62
  function useronline_header() {
63
- echo "\n".'<!-- Start Of Script Generated By WP-UserOnline 2.20 -->'."\n";
64
- wp_register_script('wp-useronline', '/wp-content/plugins/useronline/useronline-js.php', false, '2.20');
 
 
 
 
 
 
65
  wp_print_scripts(array('sack', 'wp-useronline'));
66
- echo '<!-- End Of Script Generated By WP-UserOnline 2.20 -->'."\n";
67
  }
68
 
69
 
@@ -82,7 +113,7 @@ function useronline() {
82
  $useragent = $_SERVER['HTTP_USER_AGENT'];
83
  $current_user = wp_get_current_user();
84
  if(!empty($_SERVER['HTTP_REFERER'])) {
85
- $referral = addslashes(urlencode($_SERVER['HTTP_REFERER']));
86
  }
87
  // Check For Bot
88
  $bots = get_option('useronline_bots');
@@ -160,18 +191,18 @@ function useronline() {
160
 
161
  ### Function: Display UserOnline
162
  if(!function_exists('get_useronline')) {
163
- function get_useronline($deprecated = '', $deprecated2 = '', $display = true) {
164
  // Template - Naming Conventions
165
  $useronline_naming = get_option('useronline_naming');
166
  // Template - User(s) Online
167
  $template_useronline = stripslashes(get_option('useronline_template_useronline'));
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);
170
  $template_useronline = str_replace('%USERONLINE_MOSTONLINE_DATE%', get_most_useronline_date(), $template_useronline);
171
  if(get_useronline_count() == 1) {
172
  $template_useronline = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_useronline);
173
  } else {
174
- $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format(get_useronline_count()), stripslashes($useronline_naming['users']));
175
  $template_useronline = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_useronline);
176
  }
177
  if($display) {
@@ -188,7 +219,7 @@ if(!function_exists('get_useronline_count')) {
188
  function get_useronline_count($display = false) {
189
  global $useronline;
190
  if($display) {
191
- echo number_format($useronline);
192
  } else {
193
  return $useronline;
194
  }
@@ -201,7 +232,7 @@ if(!function_exists('get_most_useronline')) {
201
  function get_most_useronline($display = false) {
202
  $most_useronline_users = intval(get_option('useronline_most_users'));
203
  if($display) {
204
- echo number_format($most_useronline_users);
205
  } else {
206
  return $most_useronline_users;
207
  }
@@ -213,7 +244,7 @@ if(!function_exists('get_most_useronline')) {
213
  if(!function_exists('get_most_useronline_date')) {
214
  function get_most_useronline_date($display = false) {
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);
217
  if($display) {
218
  echo $most_useronline_date;
219
  } else {
@@ -246,9 +277,9 @@ function update_memberlastvisit() {
246
  function get_memberlastvisit($user_id = 0) {
247
  $date_format = sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format'));
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));
252
  }
253
  }
254
 
@@ -311,7 +342,7 @@ function get_users_browsing_site($display = true) {
311
  if(get_useronline_count() == 1) {
312
  $template_browsingsite = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_browsingsite);
313
  } else {
314
- $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format(get_useronline_count()), stripslashes($useronline_naming['users']));
315
  $template_browsingsite = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_browsingsite);
316
  }
317
 
@@ -324,7 +355,7 @@ function get_users_browsing_site($display = true) {
324
  }
325
  } else {
326
  foreach($members as $member) {
327
- $temp_member .= '<a href="'.useronline_stats_page_link(urlencode($member)).'">'.$member.'</a>'.$separator_members_browsingsite;
328
  }
329
  }
330
  $template_browsingsite = str_replace('%USERONLINE_MEMBER_NAMES%', substr($temp_member, 0, -strlen($separator_members_browsingsite)), $template_browsingsite);
@@ -334,7 +365,7 @@ function get_users_browsing_site($display = true) {
334
 
335
  // Nice Text For Members
336
  if($total_members > 1) {
337
- $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format($total_members), stripslashes($useronline_naming['members']));
338
  $template_browsingsite = str_replace('%USERONLINE_MEMBERS%', $useronline_naming_members, $template_browsingsite);
339
  } elseif($total_members == 1) {
340
  $template_browsingsite = str_replace('%USERONLINE_MEMBERS%', stripslashes($useronline_naming['member']), $template_browsingsite);
@@ -344,7 +375,7 @@ function get_users_browsing_site($display = true) {
344
 
345
  // Nice Text For Guests
346
  if($total_guests > 1) {
347
- $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format($total_guests), stripslashes($useronline_naming['guests']));
348
  $template_browsingsite = str_replace('%USERONLINE_GUESTS%', $useronline_naming_guests, $template_browsingsite);
349
  } elseif($total_guests == 1) {
350
  $template_browsingsite = str_replace('%USERONLINE_GUESTS%', stripslashes($useronline_naming['guest']), $template_browsingsite);
@@ -354,7 +385,7 @@ function get_users_browsing_site($display = true) {
354
 
355
  // Nice Text For Bots
356
  if($total_bots > 1) {
357
- $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format($total_bots), stripslashes($useronline_naming['bots']));
358
  $template_browsingsite = str_replace('%USERONLINE_BOTS%', $useronline_naming_bots, $template_browsingsite);
359
  } elseif($total_bots == 1) {
360
  $template_browsingsite = str_replace('%USERONLINE_BOTS%', stripslashes($useronline_naming['bot']), $template_browsingsite);
@@ -448,7 +479,7 @@ function get_users_browsing_page($display = true) {
448
  if($total_users == 1) {
449
  $template_browsingpage = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_browsingpage);
450
  } else {
451
- $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format($total_users), stripslashes($useronline_naming['users']));
452
  $template_browsingpage = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_browsingpage);
453
  }
454
 
@@ -461,7 +492,7 @@ function get_users_browsing_page($display = true) {
461
  }
462
  } else {
463
  foreach($members as $member) {
464
- $temp_member .= '<a href="'.useronline_stats_page_link(urlencode($member)).'">'.$member.'</a>'.$separator_members_browsingpage;
465
  }
466
  }
467
  $template_browsingpage = str_replace('%USERONLINE_MEMBER_NAMES%', substr($temp_member, 0, -strlen($separator_members_browsingpage)), $template_browsingpage);
@@ -471,7 +502,7 @@ function get_users_browsing_page($display = true) {
471
 
472
  // Nice Text For Members
473
  if($total_members > 1) {
474
- $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format($total_members), stripslashes($useronline_naming['members']));
475
  $template_browsingpage = str_replace('%USERONLINE_MEMBERS%', $useronline_naming_members, $template_browsingpage);
476
  } elseif($total_members == 1) {
477
  $template_browsingpage = str_replace('%USERONLINE_MEMBERS%', stripslashes($useronline_naming['member']), $template_browsingpage);
@@ -481,7 +512,7 @@ function get_users_browsing_page($display = true) {
481
 
482
  // Nice Text For Guests
483
  if($total_guests > 1) {
484
- $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format($total_guests), stripslashes($useronline_naming['guests']));
485
  $template_browsingpage = str_replace('%USERONLINE_GUESTS%', $useronline_naming_guests, $template_browsingpage);
486
  } elseif($total_guests == 1) {
487
  $template_browsingpage = str_replace('%USERONLINE_GUESTS%', stripslashes($useronline_naming['guest']), $template_browsingpage);
@@ -491,7 +522,7 @@ function get_users_browsing_page($display = true) {
491
 
492
  // Nice Text For Bots
493
  if($total_bots > 1) {
494
- $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format($total_bots), stripslashes($useronline_naming['bots']));
495
  $template_browsingpage = str_replace('%USERONLINE_BOTS%', $useronline_naming_bots, $template_browsingpage);
496
  } elseif($total_bots == 1) {
497
  $template_browsingpage = str_replace('%USERONLINE_BOTS%', stripslashes($useronline_naming['bot']), $template_browsingpage);
@@ -540,10 +571,10 @@ if(!function_exists('get_ipaddress')) {
540
  ### Function: Check IP
541
  function check_ip($ip) {
542
  $current_user = wp_get_current_user();
543
- $user_level = intval($current_user->wp_user_level);
544
  $ip2long = ip2long($ip);
545
  if($user_level == 10 && ($ip != 'unknown') && $ip == long2ip($ip2long) && $ip2long !== false) {
546
- return "(<a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$ip\" target=\"_blank\" title=\"".gethostbyaddr($ip)."\">$ip</a>)";
547
  }
548
  }
549
 
@@ -554,15 +585,15 @@ function ip2nation_country($ip, $display_countryname = 0) {
554
  $country_code = wp_ozh_getCountryCode(0, $ip);
555
  $country_name = wp_ozh_getCountryName(0, $ip);
556
  $country_mirror = '';
557
- $mirrors = array("http://frenchfragfactory.net/images", "http://lesterchan.net/wordpress/images/flags");
558
  if($country_name != 'Private') {
559
  foreach($mirrors as $mirror) {
560
- if(@file($mirror.'/flag_sg.gif')) {
561
  $country_mirror = $mirror;
562
  break;
563
  }
564
  }
565
- $temp = '<img src="'.$mirror.'/flag_'.$country_code.'.gif" alt="'.$country_name.'" />';
566
  if($display_countryname) {
567
  $temp .= $country_name;
568
  }
@@ -578,15 +609,43 @@ function ip2nation_country($ip, $display_countryname = 0) {
578
  ### Function: Display UserOnline For Admin
579
  function display_useronline() {
580
  $useronline_page = useronline_page();
581
- echo "<div class=\"wrap\">\n$useronline_page</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
582
  }
583
 
584
 
585
- ### Function: Place Useronline In Content
586
- add_filter('the_content', 'place_useronlinepage', '7');
587
- function place_useronlinepage($content){
588
- $content = preg_replace( "/\[page_useronline\]/ise", "useronline_page()", $content);
589
- return $content;
 
 
 
 
 
 
 
590
  }
591
 
592
 
@@ -636,14 +695,14 @@ function useronline_page() {
636
  if($total_users == 1) {
637
  $nicetext_users = $total_users.' '.__('User', 'wp-useronline');
638
  } else {
639
- $nicetext_users = number_format($total_users).' '.__('Users', 'wp-useronline');
640
  }
641
 
642
  // Nice Text For Members
643
  if($total_members == 1) {
644
  $nicetext_members = $total_members.' '.__('Member', 'wp-useronline');
645
  } else {
646
- $nicetext_members = number_format($total_members).' '.__('Members', 'wp-useronline');
647
  }
648
 
649
 
@@ -651,14 +710,14 @@ function useronline_page() {
651
  if($total_guests == 1) {
652
  $nicetext_guests = $total_guests.' '.__('Guest', 'wp-useronline');
653
  } else {
654
- $nicetext_guests = number_format($total_guests).' '.__('Guests', 'wp-useronline');
655
  }
656
 
657
  // Nice Text For Bots
658
  if($total_bots == 1) {
659
  $nicetext_bots = $total_bots.' '.__('Bot', 'wp-useronline');
660
  } else {
661
- $nicetext_bots = number_format($total_bots).' '.__('Bots', 'wp-useronline');
662
  }
663
 
664
  // Check Whether WP-Stats Is Activated
@@ -666,14 +725,12 @@ function useronline_page() {
666
  if(function_exists('get_totalposts')) {
667
  $wp_stats = true;
668
  }
669
- $useronline_output .= '<p>';
670
  if ($total_users == 1) {
671
- $useronline_output .= __('There is', 'wp-useronline').' ';
672
  } else {
673
- $useronline_output .= __('There are a total of', 'wp-useronline').' ';
674
  }
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";
677
  // Print Out Members
678
  if($total_members > 0) {
679
  $useronline_output .= '<h2>'.$nicetext_members.' '.__('Online Now', 'wp-useronline').'</h2>'."\n";
@@ -683,12 +740,12 @@ function useronline_page() {
683
  foreach($members as $member) {
684
  $referral_output = '';
685
  if(!empty($member['referral'])) {
686
- $referral_output = ' [<a href="'.$member['referral'].'">'.__('referral', 'wp-useronline').'</a>]';
687
  }
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";
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";
692
  }
693
  $no++;
694
  }
@@ -702,13 +759,13 @@ function useronline_page() {
702
  if($guests) {
703
  foreach($guests as $guest) {
704
  $referral_output = '';
705
- if(!empty($member['referral'])) {
706
- $referral_output = '[<a href="'.$guest['referral'].'">'.__('referral', 'wp-useronline').'</a>]';
707
  }
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";
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";
712
  }
713
  $no++;
714
  }
@@ -721,7 +778,7 @@ function useronline_page() {
721
  $no=1;
722
  if($bots) {
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";
725
  $no++;
726
  }
727
  }
@@ -738,11 +795,16 @@ function useronline_page() {
738
 
739
  ### Function: Stats Page Link
740
  function useronline_stats_page_link($author) {
741
- $stats_url = get_option('stats_url');
742
- if(strpos($stats_url, '?') !== false) {
743
- $stats_url = "$stats_url&amp;stats_author=$author";
744
- } else {
745
- $stats_url = "$stats_url?stats_author=$author";
 
 
 
 
 
746
  }
747
  return $stats_url;
748
  }
@@ -773,7 +835,7 @@ function useronline_ajax() {
773
 
774
 
775
  ### Function: Plug Into WP-Stats
776
- if(strpos(get_option('stats_url'), $_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], 'stats-options.php') || strpos($_SERVER['REQUEST_URI'], 'stats/stats.php')) {
777
  add_filter('wp_stats_page_admin_plugins', 'useronline_page_admin_general_stats');
778
  add_filter('wp_stats_page_plugins', 'useronline_page_general_stats');
779
  }
@@ -797,8 +859,8 @@ function useronline_page_general_stats($content) {
797
  if($stats_display['useronline'] == 1) {
798
  $content .= '<p><strong>'.__('WP-UserOnline', 'wp-useronline').'</strong></p>'."\n";
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";
802
  $content .= '<li>'.__('On', 'wp-useronline').' <strong>'.get_most_useronline_date().'</strong>.</li>'."\n";
803
  $content .= '</ul>'."\n";
804
  }
@@ -807,7 +869,7 @@ function useronline_page_general_stats($content) {
807
 
808
 
809
  ### Function: Create UserOnline Table
810
- add_action('activate_useronline/useronline.php', 'create_useronline_table');
811
  function create_useronline_table() {
812
  global $wpdb;
813
  $bots = array('Google Bot' => 'googlebot', 'Google Bot' => 'google', 'MSN' => 'msnbot', 'Alex' => 'ia_archiver', 'Lycos' => 'lycos', 'Ask Jeeves' => 'jeeves', 'Altavista' => 'scooter', 'AllTheWeb' => 'fast-webcrawler', 'Inktomi' => 'slurp@inktomi', 'Turnitin.com' => 'turnitinbot', 'Technorati' => 'technorati', 'Yahoo' => 'yahoo', 'Findexa' => 'findexa', 'NextLinks' => 'findlinks', 'Gais' => 'gaisbo', 'WiseNut' => 'zyborg', 'WhoisSource' => 'surveybot', 'Bloglines' => 'bloglines', 'BlogSearch' => 'blogsearch', 'PubSub' => 'pubsub', 'Syndic8' => 'syndic8', 'RadioUserland' => 'userland', 'Gigabot' => 'gigabot', 'Become.com' => 'become.com');
@@ -818,6 +880,15 @@ function create_useronline_table() {
818
  } else {
819
  die('We have problem finding your \'/wp-admin/upgrade-functions.php\' and \'/wp-admin/includes/upgrade.php\'');
820
  }
 
 
 
 
 
 
 
 
 
821
  // Drop UserOnline Table
822
  $wpdb->query("DROP TABLE IF EXISTS $wpdb->useronline");
823
  // Create UserOnline Table
@@ -832,7 +903,7 @@ function create_useronline_table() {
832
  " url varchar(255) NOT NULL default '',".
833
  " type enum('member','guest','bot') NOT NULL default 'guest',".
834
  " referral varchar(255) NOT NULL default '',".
835
- " UNIQUE KEY useronline_id (timestamp,username,ip,useragent));";
836
  maybe_create_table($wpdb->useronline, $create_table);
837
  // Add In Options
838
  add_option('useronline_most_users', 1, 'Most Users Ever Online Count');
1
  <?php
2
  /*
3
  Plugin Name: WP-UserOnline
4
+ Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Enable you to display how many users are online on your Wordpress blog with detailed statistics of where they are and who there are(Members/Guests/Search Bots).
6
+ Version: 2.31
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
+ Copyright 2008 Lester Chan (email : lesterchan@gmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
30
 
31
  ### Load WP-Config File If This File Is Called Directly
32
  if (!function_exists('add_action')) {
33
+ $wp_root = '../../..';
34
+ if (file_exists($wp_root.'/wp-load.php')) {
35
+ require_once($wp_root.'/wp-load.php');
36
+ } else {
37
+ require_once($wp_root.'/wp-config.php');
38
+ }
39
+ }
40
+
41
+
42
+ ### Use WordPress 2.6 Constants
43
+ if (!defined('WP_CONTENT_DIR')) {
44
+ define( 'WP_CONTENT_DIR', ABSPATH.'wp-content');
45
+ }
46
+ if (!defined('WP_CONTENT_URL')) {
47
+ define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
48
+ }
49
+ if (!defined('WP_PLUGIN_DIR')) {
50
+ define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins');
51
+ }
52
+ if (!defined('WP_PLUGIN_URL')) {
53
+ define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
54
  }
55
 
56
 
57
  ### Create Text Domain For Translations
58
  add_action('init', 'useronline_textdomain');
59
  function useronline_textdomain() {
60
+ if (!function_exists('wp_print_styles')) {
61
+ load_plugin_textdomain('wp-useronline', 'wp-content/plugins/wp-useronline');
62
+ } else {
63
+ load_plugin_textdomain('wp-useronline', false, 'wp-useronline');
64
+ }
65
  }
66
 
67
 
68
  ### UserOnline Table Name
69
+ global $wpdb;
70
+ $wpdb->useronline = $wpdb->prefix.'useronline';
71
 
72
 
73
  ### Function: WP-UserOnline Menu
74
  add_action('admin_menu', 'useronline_menu');
75
  function useronline_menu() {
76
  if (function_exists('add_submenu_page')) {
77
+ add_submenu_page('index.php', __('WP-UserOnline', 'wp-useronline'), __('WP-UserOnline', 'wp-useronline'), 1, 'wp-useronline/wp-useronline.php', 'display_useronline');
78
  }
79
  if (function_exists('add_options_page')) {
80
+ add_options_page(__('Useronline', 'wp-useronline'), __('Useronline', 'wp-useronline'), 'manage_options', 'wp-useronline/useronline-options.php');
81
  }
82
  }
83
 
85
  ### Function: Displays UserOnline Header
86
  add_action('wp_head', 'useronline_header');
87
  function useronline_header() {
88
+ wp_register_script('wp-useronline', WP_PLUGIN_URL.'/wp-useronline/useronline-js-packed.js', false, '2.31');
89
+ echo "\n".'<!-- Start Of Script Generated By WP-UserOnline 2.31 -->'."\n";
90
+ echo '<script type="text/javascript">'."\n";
91
+ echo '/* <![CDATA[ */'."\n";
92
+ echo "\t".'var useronline_ajax_url = \''.WP_PLUGIN_URL.'/wp-useronline/wp-useronline.php'."';\n";
93
+ echo "\t".'var useronline_timeout = '.(get_option('useronline_timeout')*1000).';'."\n";
94
+ echo '/* ]]> */'."\n";
95
+ echo '</script>'."\n";
96
  wp_print_scripts(array('sack', 'wp-useronline'));
97
+ echo '<!-- End Of Script Generated By WP-UserOnline 2.31 -->'."\n";
98
  }
99
 
100
 
113
  $useragent = $_SERVER['HTTP_USER_AGENT'];
114
  $current_user = wp_get_current_user();
115
  if(!empty($_SERVER['HTTP_REFERER'])) {
116
+ $referral = addslashes(urlencode(strip_tags($_SERVER['HTTP_REFERER'])));
117
  }
118
  // Check For Bot
119
  $bots = get_option('useronline_bots');
191
 
192
  ### Function: Display UserOnline
193
  if(!function_exists('get_useronline')) {
194
+ function get_useronline($display = true) {
195
  // Template - Naming Conventions
196
  $useronline_naming = get_option('useronline_naming');
197
  // Template - User(s) Online
198
  $template_useronline = stripslashes(get_option('useronline_template_useronline'));
199
  $template_useronline = str_replace('%USERONLINE_PAGE_URL%', get_option('useronline_url'), $template_useronline);
200
+ $template_useronline = str_replace('%USERONLINE_MOSTONLINE_COUNT%', number_format_i18n(get_most_useronline()), $template_useronline);
201
  $template_useronline = str_replace('%USERONLINE_MOSTONLINE_DATE%', get_most_useronline_date(), $template_useronline);
202
  if(get_useronline_count() == 1) {
203
  $template_useronline = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_useronline);
204
  } else {
205
+ $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format_i18n(get_useronline_count()), stripslashes($useronline_naming['users']));
206
  $template_useronline = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_useronline);
207
  }
208
  if($display) {
219
  function get_useronline_count($display = false) {
220
  global $useronline;
221
  if($display) {
222
+ echo number_format_i18n($useronline);
223
  } else {
224
  return $useronline;
225
  }
232
  function get_most_useronline($display = false) {
233
  $most_useronline_users = intval(get_option('useronline_most_users'));
234
  if($display) {
235
+ echo number_format_i18n($most_useronline_users);
236
  } else {
237
  return $most_useronline_users;
238
  }
244
  if(!function_exists('get_most_useronline_date')) {
245
  function get_most_useronline_date($display = false) {
246
  $most_useronline_timestamp = get_option('useronline_most_timestamp');
247
+ $most_useronline_date = mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $most_useronline_timestamp));
248
  if($display) {
249
  echo $most_useronline_date;
250
  } else {
277
  function get_memberlastvisit($user_id = 0) {
278
  $date_format = sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format'));
279
  if($user_id == 0) {
280
+ return mysql2date($date_format, gmdate('Y-m-d H:i:s', get_user_option('member_last_login')));
281
  } else {
282
+ return mysql2date($date_format, gmdate('Y-m-d H:i:s', get_user_option('member_last_login', $user_id)));
283
  }
284
  }
285
 
342
  if(get_useronline_count() == 1) {
343
  $template_browsingsite = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_browsingsite);
344
  } else {
345
+ $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format_i18n(get_useronline_count()), stripslashes($useronline_naming['users']));
346
  $template_browsingsite = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_browsingsite);
347
  }
348
 
355
  }
356
  } else {
357
  foreach($members as $member) {
358
+ $temp_member .= useronline_stats_page_link($member).$separator_members_browsingsite;
359
  }
360
  }
361
  $template_browsingsite = str_replace('%USERONLINE_MEMBER_NAMES%', substr($temp_member, 0, -strlen($separator_members_browsingsite)), $template_browsingsite);
365
 
366
  // Nice Text For Members
367
  if($total_members > 1) {
368
+ $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_members), stripslashes($useronline_naming['members']));
369
  $template_browsingsite = str_replace('%USERONLINE_MEMBERS%', $useronline_naming_members, $template_browsingsite);
370
  } elseif($total_members == 1) {
371
  $template_browsingsite = str_replace('%USERONLINE_MEMBERS%', stripslashes($useronline_naming['member']), $template_browsingsite);
375
 
376
  // Nice Text For Guests
377
  if($total_guests > 1) {
378
+ $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_guests), stripslashes($useronline_naming['guests']));
379
  $template_browsingsite = str_replace('%USERONLINE_GUESTS%', $useronline_naming_guests, $template_browsingsite);
380
  } elseif($total_guests == 1) {
381
  $template_browsingsite = str_replace('%USERONLINE_GUESTS%', stripslashes($useronline_naming['guest']), $template_browsingsite);
385
 
386
  // Nice Text For Bots
387
  if($total_bots > 1) {
388
+ $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_bots), stripslashes($useronline_naming['bots']));
389
  $template_browsingsite = str_replace('%USERONLINE_BOTS%', $useronline_naming_bots, $template_browsingsite);
390
  } elseif($total_bots == 1) {
391
  $template_browsingsite = str_replace('%USERONLINE_BOTS%', stripslashes($useronline_naming['bot']), $template_browsingsite);
479
  if($total_users == 1) {
480
  $template_browsingpage = str_replace('%USERONLINE_USERS%', stripslashes($useronline_naming['user']), $template_browsingpage);
481
  } else {
482
+ $useronline_naming_users = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_users), stripslashes($useronline_naming['users']));
483
  $template_browsingpage = str_replace('%USERONLINE_USERS%', $useronline_naming_users, $template_browsingpage);
484
  }
485
 
492
  }
493
  } else {
494
  foreach($members as $member) {
495
+ $temp_member .= useronline_stats_page_link($member).$separator_members_browsingpage;
496
  }
497
  }
498
  $template_browsingpage = str_replace('%USERONLINE_MEMBER_NAMES%', substr($temp_member, 0, -strlen($separator_members_browsingpage)), $template_browsingpage);
502
 
503
  // Nice Text For Members
504
  if($total_members > 1) {
505
+ $useronline_naming_members = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_members), stripslashes($useronline_naming['members']));
506
  $template_browsingpage = str_replace('%USERONLINE_MEMBERS%', $useronline_naming_members, $template_browsingpage);
507
  } elseif($total_members == 1) {
508
  $template_browsingpage = str_replace('%USERONLINE_MEMBERS%', stripslashes($useronline_naming['member']), $template_browsingpage);
512
 
513
  // Nice Text For Guests
514
  if($total_guests > 1) {
515
+ $useronline_naming_guests = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_guests), stripslashes($useronline_naming['guests']));
516
  $template_browsingpage = str_replace('%USERONLINE_GUESTS%', $useronline_naming_guests, $template_browsingpage);
517
  } elseif($total_guests == 1) {
518
  $template_browsingpage = str_replace('%USERONLINE_GUESTS%', stripslashes($useronline_naming['guest']), $template_browsingpage);
522
 
523
  // Nice Text For Bots
524
  if($total_bots > 1) {
525
+ $useronline_naming_bots = str_replace('%USERONLINE_COUNT%', number_format_i18n($total_bots), stripslashes($useronline_naming['bots']));
526
  $template_browsingpage = str_replace('%USERONLINE_BOTS%', $useronline_naming_bots, $template_browsingpage);
527
  } elseif($total_bots == 1) {
528
  $template_browsingpage = str_replace('%USERONLINE_BOTS%', stripslashes($useronline_naming['bot']), $template_browsingpage);
571
  ### Function: Check IP
572
  function check_ip($ip) {
573
  $current_user = wp_get_current_user();
574
+ $user_level = intval($current_user->user_level);
575
  $ip2long = ip2long($ip);
576
  if($user_level == 10 && ($ip != 'unknown') && $ip == long2ip($ip2long) && $ip2long !== false) {
577
+ return "(<a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$ip\" title=\"".gethostbyaddr($ip)."\">$ip</a>)";
578
  }
579
  }
580
 
585
  $country_code = wp_ozh_getCountryCode(0, $ip);
586
  $country_name = wp_ozh_getCountryName(0, $ip);
587
  $country_mirror = '';
588
+ $mirrors = array('http://lesterchan.net/wp-content/themes/lesterchan/images/flags');
589
  if($country_name != 'Private') {
590
  foreach($mirrors as $mirror) {
591
+ if(@file($mirror.'/sg.gif')) {
592
  $country_mirror = $mirror;
593
  break;
594
  }
595
  }
596
+ $temp = '<img src="'.$mirror.'/'.$country_code.'.png" alt="'.$country_name.'" title="'.$country_name.'" />';
597
  if($display_countryname) {
598
  $temp .= $country_name;
599
  }
609
  ### Function: Display UserOnline For Admin
610
  function display_useronline() {
611
  $useronline_page = useronline_page();
612
+ echo '<div class="wrap">'."\n";
613
+ echo '<h2>'.__('Users Online Now', 'wp-useronline').'</h2>'."\n";
614
+ echo $useronline_page;
615
+ echo '</div>'."\n";
616
+ }
617
+
618
+
619
+ ### Function Display UserOnline For Admin's Right Now
620
+ add_action('rightnow_end', 'useronline_rightnow');
621
+ function useronline_rightnow() {
622
+ $total_users = get_useronline_count(false);
623
+ echo '<p>';
624
+ if ($total_users == 1) {
625
+ printf(__('There is <strong><a href="%s">%s user</a></strong> online now.', 'wp-useronline'), get_option('siteurl').'/wp-admin/index.php?page=wp-useronline/wp-useronline.php', number_format_i18n($total_users));
626
+ } else {
627
+ printf(__('There are a total of <strong><a href="%s">%s users</a></strong> online now.', 'wp-useronline'), get_option('siteurl').'/wp-admin/index.php?page=wp-useronline/wp-useronline.php', number_format_i18n($total_users));
628
+ }
629
+ echo '<br />';
630
+ get_users_browsing_site();
631
+ echo '.<br />';
632
+ printf(__('Most users ever online were <strong>%s</strong>, on <strong>%s</strong>', 'wp-useronline'), number_format_i18n(get_most_useronline()), get_most_useronline_date());
633
+ echo '</p>'."\n";
634
  }
635
 
636
 
637
+ ### Function: Short Code For Inserting Users Online Into Page
638
+ add_shortcode('page_useronline', 'useronline_page_shortcode');
639
+ function useronline_page_shortcode($atts) {
640
+ return useronline_page();
641
+ }
642
+
643
+
644
+ ### Function: Format URL
645
+ function format_url($url) {
646
+ $url = str_replace('&', '&amp;', $url);
647
+ $url = str_replace(' ', '+', $url);
648
+ return $url;
649
  }
650
 
651
 
695
  if($total_users == 1) {
696
  $nicetext_users = $total_users.' '.__('User', 'wp-useronline');
697
  } else {
698
+ $nicetext_users = number_format_i18n($total_users).' '.__('Users', 'wp-useronline');
699
  }
700
 
701
  // Nice Text For Members
702
  if($total_members == 1) {
703
  $nicetext_members = $total_members.' '.__('Member', 'wp-useronline');
704
  } else {
705
+ $nicetext_members = number_format_i18n($total_members).' '.__('Members', 'wp-useronline');
706
  }
707
 
708
 
710
  if($total_guests == 1) {
711
  $nicetext_guests = $total_guests.' '.__('Guest', 'wp-useronline');
712
  } else {
713
+ $nicetext_guests = number_format_i18n($total_guests).' '.__('Guests', 'wp-useronline');
714
  }
715
 
716
  // Nice Text For Bots
717
  if($total_bots == 1) {
718
  $nicetext_bots = $total_bots.' '.__('Bot', 'wp-useronline');
719
  } else {
720
+ $nicetext_bots = number_format_i18n($total_bots).' '.__('Bots', 'wp-useronline');
721
  }
722
 
723
  // Check Whether WP-Stats Is Activated
725
  if(function_exists('get_totalposts')) {
726
  $wp_stats = true;
727
  }
 
728
  if ($total_users == 1) {
729
+ $useronline_output .= '<p>'.sprintf(__('There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>.', 'wp-useronline'), $nicetext_users, $nicetext_members, $nicetext_guests, $nicetext_bots).'</p>';
730
  } else {
731
+ $useronline_output .= '<p>'.sprintf(__('There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>.', 'wp-useronline'), $nicetext_users, $nicetext_members, $nicetext_guests, $nicetext_bots).'</p>';
732
  }
733
+ $useronline_output .= '<p>'.sprintf(__('Most users ever online were <strong>%s</strong>, on <strong>%s</strong>', 'wp-useronline'), number_format_i18n(get_most_useronline()), get_most_useronline_date()).'</p>';
 
734
  // Print Out Members
735
  if($total_members > 0) {
736
  $useronline_output .= '<h2>'.$nicetext_members.' '.__('Online Now', 'wp-useronline').'</h2>'."\n";
740
  foreach($members as $member) {
741
  $referral_output = '';
742
  if(!empty($member['referral'])) {
743
+ $referral_output = ' [<a href="'.format_url($member['referral']).'">'.__('referral', 'wp-useronline').'</a>]';
744
  }
745
  if($wp_stats) {
746
+ $useronline_output .= '<p><strong>#'.$no.' - '.useronline_stats_page_link($member['display_name']).'</strong> '.ip2nation_country($member['ip']).check_ip($member['ip']).' '.__('on', 'wp-useronline').' '.mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $member['timestamp'])).'<br />'.$member['location'].' [<a href="'.format_url($member['url']).'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";
747
  } else {
748
+ $useronline_output .= '<p><strong>#'.$no.' - '.$member['display_name'].'</strong> '.ip2nation_country($member['ip']).check_ip($member['ip']).' '.__('on', 'wp-useronline').' '.mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $member['timestamp'])).'<br />'.$member['location'].' [<a href="'.format_url($member['url']).'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";
749
  }
750
  $no++;
751
  }
759
  if($guests) {
760
  foreach($guests as $guest) {
761
  $referral_output = '';
762
+ if(!empty($guest['referral'])) {
763
+ $referral_output = '[<a href="'.format_url($guest['referral']).'">'.__('referral', 'wp-useronline').'</a>]';
764
  }
765
  if($wp_stats) {
766
+ $useronline_output .= '<p><strong>#'.$no.' - '.useronline_stats_page_link($guest['display_name']).'</strong> '.ip2nation_country($guest['ip']).check_ip($guest['ip']).' '.__('on', 'wp-useronline').' '.mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $guest['timestamp'])).'<br />'.$guest['location'].' [<a href="'.format_url($guest['url']).'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";
767
  } else {
768
+ $useronline_output .= '<p><strong>#'.$no.' - '.$guest['display_name'].'</strong> '.ip2nation_country($guest['ip']).check_ip($guest['ip']).' '.__('on', 'wp-useronline').' '.mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $guest['timestamp'])).'<br />'.$guest['location'].' [<a href="'.format_url($guest['url']).'">'.__('url', 'wp-useronline').'</a>]'.$referral_output.'</p>'."\n";
769
  }
770
  $no++;
771
  }
778
  $no=1;
779
  if($bots) {
780
  foreach($bots as $bot) {
781
+ $useronline_output .= '<p><strong>#'.$no.' - '.$bot['display_name'].'</strong> '.check_ip($bot['ip']).' '.__('on', 'wp-useronline').' '.mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $bot['timestamp'])).'<br />'.$bot['location'].' [<a href="'.format_url($bot['url']).'">'.__('url', 'wp-useronline').'</a>]</p>'."\n";
782
  $no++;
783
  }
784
  }
795
 
796
  ### Function: Stats Page Link
797
  function useronline_stats_page_link($author) {
798
+ $stats_url = '';
799
+ if(function_exists('stats_page')) {
800
+ $stats_url = get_option('stats_url');
801
+ $author_encode = urlencode($author);
802
+ if(strpos($stats_url, '?') !== false) {
803
+ $stats_url = "$stats_url&amp;stats_author=$author_encode";
804
+ } else {
805
+ $stats_url = "$stats_url?stats_author=$author_encode";
806
+ }
807
+ return '<a href="'.$stats_url.'" title="'.$author.'">'.$author.'</a>';
808
  }
809
  return $stats_url;
810
  }
835
 
836
 
837
  ### Function: Plug Into WP-Stats
838
+ if(strpos(get_option('stats_url'), $_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], 'stats-options.php') || strpos($_SERVER['REQUEST_URI'], 'wp-stats/wp-stats.php')) {
839
  add_filter('wp_stats_page_admin_plugins', 'useronline_page_admin_general_stats');
840
  add_filter('wp_stats_page_plugins', 'useronline_page_general_stats');
841
  }
859
  if($stats_display['useronline'] == 1) {
860
  $content .= '<p><strong>'.__('WP-UserOnline', 'wp-useronline').'</strong></p>'."\n";
861
  $content .= '<ul>'."\n";
862
+ $content .= '<li><strong>'.number_format_i18n(get_useronline_count()).'</strong> '.__('user(s) online now.', 'wp-useronline').'</li>'."\n";
863
+ $content .= '<li>'.__('Most users ever online was', 'wp-useronline').' <strong>'.number_format_i18n(get_most_useronline()).'</strong>.</li>'."\n";
864
  $content .= '<li>'.__('On', 'wp-useronline').' <strong>'.get_most_useronline_date().'</strong>.</li>'."\n";
865
  $content .= '</ul>'."\n";
866
  }
869
 
870
 
871
  ### Function: Create UserOnline Table
872
+ add_action('activate_wp-useronline/wp-useronline.php', 'create_useronline_table');
873
  function create_useronline_table() {
874
  global $wpdb;
875
  $bots = array('Google Bot' => 'googlebot', 'Google Bot' => 'google', 'MSN' => 'msnbot', 'Alex' => 'ia_archiver', 'Lycos' => 'lycos', 'Ask Jeeves' => 'jeeves', 'Altavista' => 'scooter', 'AllTheWeb' => 'fast-webcrawler', 'Inktomi' => 'slurp@inktomi', 'Turnitin.com' => 'turnitinbot', 'Technorati' => 'technorati', 'Yahoo' => 'yahoo', 'Findexa' => 'findexa', 'NextLinks' => 'findlinks', 'Gais' => 'gaisbo', 'WiseNut' => 'zyborg', 'WhoisSource' => 'surveybot', 'Bloglines' => 'bloglines', 'BlogSearch' => 'blogsearch', 'PubSub' => 'pubsub', 'Syndic8' => 'syndic8', 'RadioUserland' => 'userland', 'Gigabot' => 'gigabot', 'Become.com' => 'become.com');
880
  } else {
881
  die('We have problem finding your \'/wp-admin/upgrade-functions.php\' and \'/wp-admin/includes/upgrade.php\'');
882
  }
883
+ $charset_collate = '';
884
+ if($wpdb->supports_collation()) {
885
+ if(!empty($wpdb->charset)) {
886
+ $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
887
+ }
888
+ if(!empty($wpdb->collate)) {
889
+ $charset_collate .= " COLLATE $wpdb->collate";
890
+ }
891
+ }
892
  // Drop UserOnline Table
893
  $wpdb->query("DROP TABLE IF EXISTS $wpdb->useronline");
894
  // Create UserOnline Table
903
  " url varchar(255) NOT NULL default '',".
904
  " type enum('member','guest','bot') NOT NULL default 'guest',".
905
  " referral varchar(255) NOT NULL default '',".
906
+ " UNIQUE KEY useronline_id (timestamp,username,ip,useragent)) $charset_collate;";
907
  maybe_create_table($wpdb->useronline, $create_table);
908
  // Add In Options
909
  add_option('useronline_most_users', 1, 'Most Users Ever Online Count');
useronline/wp-useronline.pot → wp-useronline.pot RENAMED
@@ -1,12 +1,13 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-UserOnline 2.20\n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-09-30 16:12+0800\n"
6
- "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
- "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
 
8
  "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
  "X-Poedit-Country: SINGAPORE\n"
12
  "X-Poedit-KeywordsList: __;_e\n"
@@ -14,49 +15,44 @@ msgstr ""
14
  "X-Poedit-Language: English\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: useronline-options.php:32
18
- #: useronline-options.php:320
19
- msgid "Update Options"
20
- msgstr ""
21
-
22
- #: useronline-options.php:65
23
  msgid "Useronline Timeout"
24
  msgstr ""
25
 
26
- #: useronline-options.php:66
27
  msgid "Useronline Bots"
28
  msgstr ""
29
 
30
- #: useronline-options.php:67
31
  msgid "Useronline URL"
32
  msgstr ""
33
 
34
- #: useronline-options.php:68
35
  msgid "Useronline Naming Conventions"
36
  msgstr ""
37
 
38
- #: useronline-options.php:69
39
  msgid "User(s) Online Template"
40
  msgstr ""
41
 
42
- #: useronline-options.php:70
43
  msgid "User(s) Browsing Site Template"
44
  msgstr ""
45
 
46
- #: useronline-options.php:71
47
  msgid "User(s) Browsing Page Template"
48
  msgstr ""
49
 
50
- #: useronline-options.php:76
51
  msgid "Updated"
52
  msgstr ""
53
 
54
- #: useronline-options.php:81
55
  msgid "No Useronline Option Updated"
56
  msgstr ""
57
 
58
  #: useronline-options.php:85
59
- #: useronline-options.php:368
60
  msgid "UNINSTALL WP-UserOnline"
61
  msgstr ""
62
 
@@ -76,7 +72,7 @@ msgid "Error deleting Setting Key '%s'."
76
  msgstr ""
77
 
78
  #: useronline-options.php:127
79
- #: useronline-options.php:328
80
  msgid "Uninstall WP-UserOnline"
81
  msgstr ""
82
 
@@ -86,107 +82,107 @@ msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-UserOnl
86
  msgstr ""
87
 
88
  #: useronline-options.php:153
89
- #: useronline.php:846
90
  msgid "Online"
91
  msgstr ""
92
 
93
  #: useronline-options.php:160
94
- #: useronline.php:845
95
  msgid "1 User"
96
  msgstr ""
97
 
98
  #: useronline-options.php:161
99
- #: useronline.php:845
100
  msgid "%USERONLINE_COUNT% Users"
101
  msgstr ""
102
 
103
  #: useronline-options.php:162
104
- #: useronline.php:845
105
  msgid "1 Member"
106
  msgstr ""
107
 
108
  #: useronline-options.php:163
109
- #: useronline.php:845
110
  msgid "%USERONLINE_COUNT% Members"
111
  msgstr ""
112
 
113
  #: useronline-options.php:164
114
- #: useronline.php:845
115
  msgid "1 Guest"
116
  msgstr ""
117
 
118
  #: useronline-options.php:165
119
- #: useronline.php:845
120
  msgid "%USERONLINE_COUNT% Guests"
121
  msgstr ""
122
 
123
  #: useronline-options.php:166
124
- #: useronline.php:845
125
  msgid "1 Bot"
126
  msgstr ""
127
 
128
  #: useronline-options.php:167
129
- #: useronline.php:845
130
  msgid "%USERONLINE_COUNT% Bots"
131
  msgstr ""
132
 
133
  #: useronline-options.php:173
134
  #: useronline-options.php:179
135
- #: useronline.php:639
136
- #: useronline.php:847
137
- #: useronline.php:848
138
  msgid "Users"
139
  msgstr ""
140
 
141
  #: useronline-options.php:179
142
- #: useronline.php:848
143
  msgid "Browsing This Page."
144
  msgstr ""
145
 
146
  #: useronline-options.php:185
147
- #: useronline-options.php:187
148
  msgid "Useronline Options"
149
  msgstr ""
150
 
151
- #: useronline-options.php:190
152
  msgid "Time Out"
153
  msgstr ""
154
 
155
- #: useronline-options.php:192
156
  msgid "How long till it will remove the user from the database (In seconds)."
157
  msgstr ""
158
 
159
- #: useronline-options.php:196
160
  msgid "UserOnline URL"
161
  msgstr ""
162
 
163
- #: useronline-options.php:198
164
  msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
165
  msgstr ""
166
 
167
- #: useronline-options.php:202
168
  msgid "Bots Name/User Agent"
169
  msgstr ""
170
 
171
- #: useronline-options.php:204
172
  msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
173
  msgstr ""
174
 
175
- #: useronline-options.php:212
176
  msgid "Naming Conventions:"
177
  msgstr ""
178
 
179
- #: useronline-options.php:213
180
- #: useronline-options.php:250
181
- #: useronline-options.php:262
182
- #: useronline-options.php:291
183
  msgid "Allowed Variables:"
184
  msgstr ""
185
 
186
- #: useronline-options.php:215
187
- #: useronline-options.php:255
188
- #: useronline-options.php:270
189
- #: useronline-options.php:299
190
  msgid "Restore Default Template"
191
  msgstr ""
192
 
@@ -198,71 +194,71 @@ msgstr ""
198
  msgid "Plural Form"
199
  msgstr ""
200
 
201
- #: useronline-options.php:245
202
  msgid "Useronline Templates"
203
  msgstr ""
204
 
205
- #: useronline-options.php:249
206
  msgid "User(s) Online:"
207
  msgstr ""
208
 
209
- #: useronline-options.php:261
210
  msgid "User(s) Browsing Site:"
211
  msgstr ""
212
 
213
- #: useronline-options.php:275
214
- #: useronline-options.php:304
215
  msgid "Member Names Separator"
216
  msgstr ""
217
 
218
- #: useronline-options.php:276
219
- #: useronline-options.php:305
220
  msgid "Guests Separator"
221
  msgstr ""
222
 
223
- #: useronline-options.php:277
224
- #: useronline-options.php:306
225
  msgid "Bots Separator"
226
  msgstr ""
227
 
228
- #: useronline-options.php:290
229
  msgid "User(s) Browsing Page:"
230
  msgstr ""
231
 
232
- #: useronline-options.php:320
233
- msgid "Cancel"
234
  msgstr ""
235
 
236
- #: useronline-options.php:330
237
  msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
238
  msgstr ""
239
 
240
- #: useronline-options.php:333
241
  msgid "WARNING:"
242
  msgstr ""
243
 
244
- #: useronline-options.php:334
245
  msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
246
  msgstr ""
247
 
248
- #: useronline-options.php:337
249
  msgid "The following WordPress Options/Tables will be DELETED:"
250
  msgstr ""
251
 
252
- #: useronline-options.php:341
253
  msgid "WordPress Options"
254
  msgstr ""
255
 
256
- #: useronline-options.php:342
257
  msgid "WordPress Tables"
258
  msgstr ""
259
 
260
- #: useronline-options.php:367
261
- #: useronline-widget.php:73
262
  msgid "Yes"
263
  msgstr ""
264
 
265
- #: useronline-options.php:368
266
  msgid ""
267
  "You Are About To Uninstall WP-UserOnline From WordPress.\\n"
268
  "This Action Is Not Reversible.\\n"
@@ -270,150 +266,159 @@ msgid ""
270
  " Choose [Cancel] To Stop, [OK] To Uninstall."
271
  msgstr ""
272
 
273
- #: useronline-widget.php:62
274
  msgid "UserOnline"
275
  msgstr ""
276
 
277
- #: useronline-widget.php:69
278
  msgid "Widget Title"
279
  msgstr ""
280
 
281
- #: useronline-widget.php:70
282
  msgid "Display Users Browsing Site Under Users Online Count?"
283
  msgstr ""
284
 
285
- #: useronline-widget.php:75
286
  msgid "No"
287
  msgstr ""
288
 
289
- #: useronline.php:52
290
- #: useronline.php:786
291
- #: useronline.php:788
292
- #: useronline.php:798
293
  msgid "WP-UserOnline"
294
  msgstr ""
295
 
296
- #: useronline.php:55
297
  msgid "Useronline"
298
  msgstr ""
299
 
300
- #: useronline.php:114
301
  msgid "guest"
302
  msgstr ""
303
 
304
- #: useronline.php:120
305
- #: useronline.php:652
306
  msgid "Guest"
307
  msgstr ""
308
 
309
- #: useronline.php:135
310
  msgid "Blog Archive"
311
  msgstr ""
312
 
313
- #: useronline.php:216
314
- #: useronline.php:247
315
- #: useronline.php:689
316
- #: useronline.php:691
317
- #: useronline.php:709
318
- #: useronline.php:711
319
- #: useronline.php:724
320
  #, php-format
321
  msgid "%s @ %s"
322
  msgstr ""
323
 
324
- #: useronline.php:380
325
  msgid "No User Is Browsing This Site"
326
  msgstr ""
327
 
328
- #: useronline.php:518
329
  msgid "No User Is Browsing This Page"
330
  msgstr ""
331
 
332
- #: useronline.php:637
333
- msgid "User"
334
  msgstr ""
335
 
336
- #: useronline.php:644
337
- msgid "Member"
 
338
  msgstr ""
339
 
340
- #: useronline.php:646
341
- msgid "Members"
 
342
  msgstr ""
343
 
344
- #: useronline.php:654
345
- msgid "Guests"
 
 
346
  msgstr ""
347
 
348
- #: useronline.php:659
349
- msgid "Bot"
350
  msgstr ""
351
 
352
- #: useronline.php:661
353
- msgid "Bots"
354
  msgstr ""
355
 
356
- #: useronline.php:671
357
- msgid "There is"
358
  msgstr ""
359
 
360
- #: useronline.php:673
361
- msgid "There are a total of"
362
  msgstr ""
363
 
364
- #: useronline.php:675
365
- msgid "online now"
366
  msgstr ""
367
 
368
- #: useronline.php:675
369
- msgid "and"
370
  msgstr ""
371
 
372
- #: useronline.php:676
373
- msgid "Most users ever online were"
 
374
  msgstr ""
375
 
376
- #: useronline.php:676
377
- #: useronline.php:689
378
- #: useronline.php:691
379
- #: useronline.php:709
380
- #: useronline.php:711
381
- #: useronline.php:724
382
- msgid "on"
383
  msgstr ""
384
 
385
- #: useronline.php:679
386
- #: useronline.php:699
387
- #: useronline.php:719
388
  msgid "Online Now"
389
  msgstr ""
390
 
391
- #: useronline.php:686
392
- #: useronline.php:706
393
  msgid "referral"
394
  msgstr ""
395
 
396
- #: useronline.php:689
397
- #: useronline.php:691
398
- #: useronline.php:709
399
- #: useronline.php:711
400
- #: useronline.php:724
 
 
 
 
 
 
 
 
401
  msgid "url"
402
  msgstr ""
403
 
404
- #: useronline.php:731
405
  msgid "No One Is Online Now"
406
  msgstr ""
407
 
408
- #: useronline.php:800
409
  msgid "user(s) online now."
410
  msgstr ""
411
 
412
- #: useronline.php:801
413
  msgid "Most users ever online was"
414
  msgstr ""
415
 
416
- #: useronline.php:802
417
  msgid "On"
418
  msgstr ""
419
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP-UserOnline 2.31\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-07-16 03:37+0800\n"
6
+ "PO-Revision-Date: 2008-07-16 03:37+0800\n"
7
+ "Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
8
+ "Language-Team: Lester Chan <lesterchan@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-Country: SINGAPORE\n"
13
  "X-Poedit-KeywordsList: __;_e\n"
15
  "X-Poedit-Language: English\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
+ #: useronline-options.php:63
 
 
 
 
 
19
  msgid "Useronline Timeout"
20
  msgstr ""
21
 
22
+ #: useronline-options.php:64
23
  msgid "Useronline Bots"
24
  msgstr ""
25
 
26
+ #: useronline-options.php:65
27
  msgid "Useronline URL"
28
  msgstr ""
29
 
30
+ #: useronline-options.php:66
31
  msgid "Useronline Naming Conventions"
32
  msgstr ""
33
 
34
+ #: useronline-options.php:67
35
  msgid "User(s) Online Template"
36
  msgstr ""
37
 
38
+ #: useronline-options.php:68
39
  msgid "User(s) Browsing Site Template"
40
  msgstr ""
41
 
42
+ #: useronline-options.php:69
43
  msgid "User(s) Browsing Page Template"
44
  msgstr ""
45
 
46
+ #: useronline-options.php:74
47
  msgid "Updated"
48
  msgstr ""
49
 
50
+ #: useronline-options.php:79
51
  msgid "No Useronline Option Updated"
52
  msgstr ""
53
 
54
  #: useronline-options.php:85
55
+ #: useronline-options.php:379
56
  msgid "UNINSTALL WP-UserOnline"
57
  msgstr ""
58
 
72
  msgstr ""
73
 
74
  #: useronline-options.php:127
75
+ #: useronline-options.php:337
76
  msgid "Uninstall WP-UserOnline"
77
  msgstr ""
78
 
82
  msgstr ""
83
 
84
  #: useronline-options.php:153
85
+ #: wp-useronline.php:917
86
  msgid "Online"
87
  msgstr ""
88
 
89
  #: useronline-options.php:160
90
+ #: wp-useronline.php:916
91
  msgid "1 User"
92
  msgstr ""
93
 
94
  #: useronline-options.php:161
95
+ #: wp-useronline.php:916
96
  msgid "%USERONLINE_COUNT% Users"
97
  msgstr ""
98
 
99
  #: useronline-options.php:162
100
+ #: wp-useronline.php:916
101
  msgid "1 Member"
102
  msgstr ""
103
 
104
  #: useronline-options.php:163
105
+ #: wp-useronline.php:916
106
  msgid "%USERONLINE_COUNT% Members"
107
  msgstr ""
108
 
109
  #: useronline-options.php:164
110
+ #: wp-useronline.php:916
111
  msgid "1 Guest"
112
  msgstr ""
113
 
114
  #: useronline-options.php:165
115
+ #: wp-useronline.php:916
116
  msgid "%USERONLINE_COUNT% Guests"
117
  msgstr ""
118
 
119
  #: useronline-options.php:166
120
+ #: wp-useronline.php:916
121
  msgid "1 Bot"
122
  msgstr ""
123
 
124
  #: useronline-options.php:167
125
+ #: wp-useronline.php:916
126
  msgid "%USERONLINE_COUNT% Bots"
127
  msgstr ""
128
 
129
  #: useronline-options.php:173
130
  #: useronline-options.php:179
131
+ #: wp-useronline.php:698
132
+ #: wp-useronline.php:918
133
+ #: wp-useronline.php:919
134
  msgid "Users"
135
  msgstr ""
136
 
137
  #: useronline-options.php:179
138
+ #: wp-useronline.php:919
139
  msgid "Browsing This Page."
140
  msgstr ""
141
 
142
  #: useronline-options.php:185
143
+ #: useronline-options.php:186
144
  msgid "Useronline Options"
145
  msgstr ""
146
 
147
+ #: useronline-options.php:189
148
  msgid "Time Out"
149
  msgstr ""
150
 
151
+ #: useronline-options.php:191
152
  msgid "How long till it will remove the user from the database (In seconds)."
153
  msgstr ""
154
 
155
+ #: useronline-options.php:195
156
  msgid "UserOnline URL"
157
  msgstr ""
158
 
159
+ #: useronline-options.php:197
160
  msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
161
  msgstr ""
162
 
163
+ #: useronline-options.php:201
164
  msgid "Bots Name/User Agent"
165
  msgstr ""
166
 
167
+ #: useronline-options.php:203
168
  msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
169
  msgstr ""
170
 
171
+ #: useronline-options.php:211
172
  msgid "Naming Conventions:"
173
  msgstr ""
174
 
175
+ #: useronline-options.php:212
176
+ #: useronline-options.php:253
177
+ #: useronline-options.php:265
178
+ #: useronline-options.php:297
179
  msgid "Allowed Variables:"
180
  msgstr ""
181
 
182
+ #: useronline-options.php:214
183
+ #: useronline-options.php:258
184
+ #: useronline-options.php:273
185
+ #: useronline-options.php:305
186
  msgid "Restore Default Template"
187
  msgstr ""
188
 
194
  msgid "Plural Form"
195
  msgstr ""
196
 
197
+ #: useronline-options.php:248
198
  msgid "Useronline Templates"
199
  msgstr ""
200
 
201
+ #: useronline-options.php:252
202
  msgid "User(s) Online:"
203
  msgstr ""
204
 
205
+ #: useronline-options.php:264
206
  msgid "User(s) Browsing Site:"
207
  msgstr ""
208
 
209
+ #: useronline-options.php:279
210
+ #: useronline-options.php:311
211
  msgid "Member Names Separator"
212
  msgstr ""
213
 
214
+ #: useronline-options.php:280
215
+ #: useronline-options.php:312
216
  msgid "Guests Separator"
217
  msgstr ""
218
 
219
+ #: useronline-options.php:281
220
+ #: useronline-options.php:313
221
  msgid "Bots Separator"
222
  msgstr ""
223
 
224
+ #: useronline-options.php:296
225
  msgid "User(s) Browsing Page:"
226
  msgstr ""
227
 
228
+ #: useronline-options.php:328
229
+ msgid "Save Changes"
230
  msgstr ""
231
 
232
+ #: useronline-options.php:339
233
  msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
234
  msgstr ""
235
 
236
+ #: useronline-options.php:342
237
  msgid "WARNING:"
238
  msgstr ""
239
 
240
+ #: useronline-options.php:343
241
  msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
242
  msgstr ""
243
 
244
+ #: useronline-options.php:346
245
  msgid "The following WordPress Options/Tables will be DELETED:"
246
  msgstr ""
247
 
248
+ #: useronline-options.php:351
249
  msgid "WordPress Options"
250
  msgstr ""
251
 
252
+ #: useronline-options.php:352
253
  msgid "WordPress Tables"
254
  msgstr ""
255
 
256
+ #: useronline-options.php:378
257
+ #: wp-useronline-widget.php:73
258
  msgid "Yes"
259
  msgstr ""
260
 
261
+ #: useronline-options.php:379
262
  msgid ""
263
  "You Are About To Uninstall WP-UserOnline From WordPress.\\n"
264
  "This Action Is Not Reversible.\\n"
266
  " Choose [Cancel] To Stop, [OK] To Uninstall."
267
  msgstr ""
268
 
269
+ #: wp-useronline-widget.php:62
270
  msgid "UserOnline"
271
  msgstr ""
272
 
273
+ #: wp-useronline-widget.php:69
274
  msgid "Widget Title"
275
  msgstr ""
276
 
277
+ #: wp-useronline-widget.php:70
278
  msgid "Display Users Browsing Site Under Users Online Count?"
279
  msgstr ""
280
 
281
+ #: wp-useronline-widget.php:75
282
  msgid "No"
283
  msgstr ""
284
 
285
+ #: wp-useronline.php:77
286
+ #: wp-useronline.php:848
287
+ #: wp-useronline.php:850
288
+ #: wp-useronline.php:860
289
  msgid "WP-UserOnline"
290
  msgstr ""
291
 
292
+ #: wp-useronline.php:80
293
  msgid "Useronline"
294
  msgstr ""
295
 
296
+ #: wp-useronline.php:145
297
  msgid "guest"
298
  msgstr ""
299
 
300
+ #: wp-useronline.php:151
301
+ #: wp-useronline.php:711
302
  msgid "Guest"
303
  msgstr ""
304
 
305
+ #: wp-useronline.php:166
306
  msgid "Blog Archive"
307
  msgstr ""
308
 
309
+ #: wp-useronline.php:247
310
+ #: wp-useronline.php:278
311
+ #: wp-useronline.php:746
312
+ #: wp-useronline.php:748
313
+ #: wp-useronline.php:766
314
+ #: wp-useronline.php:768
315
+ #: wp-useronline.php:781
316
  #, php-format
317
  msgid "%s @ %s"
318
  msgstr ""
319
 
320
+ #: wp-useronline.php:411
321
  msgid "No User Is Browsing This Site"
322
  msgstr ""
323
 
324
+ #: wp-useronline.php:549
325
  msgid "No User Is Browsing This Page"
326
  msgstr ""
327
 
328
+ #: wp-useronline.php:613
329
+ msgid "Users Online Now"
330
  msgstr ""
331
 
332
+ #: wp-useronline.php:625
333
+ #, php-format
334
+ msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
335
  msgstr ""
336
 
337
+ #: wp-useronline.php:627
338
+ #, php-format
339
+ msgid "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
340
  msgstr ""
341
 
342
+ #: wp-useronline.php:632
343
+ #: wp-useronline.php:733
344
+ #, php-format
345
+ msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
346
  msgstr ""
347
 
348
+ #: wp-useronline.php:696
349
+ msgid "User"
350
  msgstr ""
351
 
352
+ #: wp-useronline.php:703
353
+ msgid "Member"
354
  msgstr ""
355
 
356
+ #: wp-useronline.php:705
357
+ msgid "Members"
358
  msgstr ""
359
 
360
+ #: wp-useronline.php:713
361
+ msgid "Guests"
362
  msgstr ""
363
 
364
+ #: wp-useronline.php:718
365
+ msgid "Bot"
366
  msgstr ""
367
 
368
+ #: wp-useronline.php:720
369
+ msgid "Bots"
370
  msgstr ""
371
 
372
+ #: wp-useronline.php:729
373
+ #, php-format
374
+ msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
375
  msgstr ""
376
 
377
+ #: wp-useronline.php:731
378
+ #, php-format
379
+ msgid "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
 
 
 
 
380
  msgstr ""
381
 
382
+ #: wp-useronline.php:736
383
+ #: wp-useronline.php:756
384
+ #: wp-useronline.php:776
385
  msgid "Online Now"
386
  msgstr ""
387
 
388
+ #: wp-useronline.php:743
389
+ #: wp-useronline.php:763
390
  msgid "referral"
391
  msgstr ""
392
 
393
+ #: wp-useronline.php:746
394
+ #: wp-useronline.php:748
395
+ #: wp-useronline.php:766
396
+ #: wp-useronline.php:768
397
+ #: wp-useronline.php:781
398
+ msgid "on"
399
+ msgstr ""
400
+
401
+ #: wp-useronline.php:746
402
+ #: wp-useronline.php:748
403
+ #: wp-useronline.php:766
404
+ #: wp-useronline.php:768
405
+ #: wp-useronline.php:781
406
  msgid "url"
407
  msgstr ""
408
 
409
+ #: wp-useronline.php:788
410
  msgid "No One Is Online Now"
411
  msgstr ""
412
 
413
+ #: wp-useronline.php:862
414
  msgid "user(s) online now."
415
  msgstr ""
416
 
417
+ #: wp-useronline.php:863
418
  msgid "Most users ever online was"
419
  msgstr ""
420
 
421
+ #: wp-useronline.php:864
422
  msgid "On"
423
  msgstr ""
424