Version Description
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-UserOnline |
Version | 1.50 |
Comparing to | |
See all releases |
Code changes from version 2.40 to 1.50
- readme.html +24 -15
- readme.txt +2 -2
- useronline-js-packed.js +0 -1
- useronline-js.dev.js +52 -0
- useronline-js.js +1 -78
- useronline-options.php +21 -21
- wp-useronline-widget.php +0 -87
- wp-useronline.mo +0 -0
- wp-useronline.php +120 -21
- wp-useronline.pot +95 -78
readme.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3 |
<head>
|
4 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
5 |
-
<title>WP-UserOnline 2.
|
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.
|
208 |
|
209 |
<!-- Tabs -->
|
210 |
<ul id="Tabs">
|
@@ -235,6 +235,7 @@
|
|
235 |
</p>
|
236 |
<p>
|
237 |
<strong>Download:</strong><br />
|
|
|
238 |
<strong>»</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.40.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.40.zip">WP-UserOnline 2.40 For 2.7.x</a><br />
|
239 |
<strong>»</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 />
|
240 |
<strong>»</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 />
|
@@ -286,6 +287,23 @@
|
|
286 |
<div id="Changelog" style="display: none;">
|
287 |
<div class="SubTitle">» Changelog</div>
|
288 |
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
<li>
|
290 |
<strong>Version 2.40 (12-12-2008)</strong>
|
291 |
<ul>
|
@@ -481,7 +499,7 @@
|
|
481 |
<!-- Upgrade Instructions -->
|
482 |
<div id="Upgrade" style="display: none;">
|
483 |
<div class="SubTitle">» Upgrade Instructions</div>
|
484 |
-
<div class="SubSubTitle">From v2.0x To v2.
|
485 |
<ol>
|
486 |
<li>
|
487 |
<strong>Deactivate</strong> WP-UserOnline Plugin
|
@@ -532,20 +550,11 @@
|
|
532 |
</ol>
|
533 |
<div class="SubSubTitle">General Usage (With Widget)</div>
|
534 |
<ol>
|
535 |
-
<li>
|
536 |
-
<strong>Activate</strong> WP-UserOnline Widget Plugin
|
537 |
-
</li>
|
538 |
<li>
|
539 |
Go to '<strong>WP-Admin -> Appearance -> Widgets</strong>'
|
540 |
</li>
|
541 |
<li>
|
542 |
-
|
543 |
-
</li>
|
544 |
-
<li>
|
545 |
-
After adding, you can <strong>configure</strong> the UserOnline Widget by clicking on the 'Edit' link besides it.
|
546 |
-
</li>
|
547 |
-
<li>
|
548 |
-
Click 'Save Changes'
|
549 |
</li>
|
550 |
<li>
|
551 |
Scroll down for instructions on how to create a <strong>UserOnline Page</strong>.
|
@@ -571,7 +580,7 @@
|
|
571 |
<li>
|
572 |
Click 'Publish'
|
573 |
</li>
|
574 |
-
<li>If you <strong>ARE NOT</strong> using nice permalinks, you need to go to 'WP-Admin -> Settings ->
|
575 |
</ol>
|
576 |
<div class="SubSubTitle">UserOnline Stats (Outside WP Loop)</div>
|
577 |
<ul>
|
@@ -612,6 +621,6 @@
|
|
612 |
</div>
|
613 |
</div>
|
614 |
</div>
|
615 |
-
<p id="Copyright">WP-UserOnline 2.
|
616 |
</body>
|
617 |
</html>
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3 |
<head>
|
4 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
5 |
+
<title>WP-UserOnline 2.50 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.50 <span style="color: #aaaaaa;">Readme</span></div>
|
208 |
|
209 |
<!-- Tabs -->
|
210 |
<ul id="Tabs">
|
235 |
</p>
|
236 |
<p>
|
237 |
<strong>Download:</strong><br />
|
238 |
+
<strong>»</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.50.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.50.zip">WP-UserOnline 2.50 For 2.8.x</a><br />
|
239 |
<strong>»</strong> <a href="http://downloads.wordpress.org/plugin/wp-useronline.2.40.zip" title="http://downloads.wordpress.org/plugin/wp-useronline.2.40.zip">WP-UserOnline 2.40 For 2.7.x</a><br />
|
240 |
<strong>»</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 />
|
241 |
<strong>»</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 />
|
287 |
<div id="Changelog" style="display: none;">
|
288 |
<div class="SubTitle">» Changelog</div>
|
289 |
<ul>
|
290 |
+
<li>
|
291 |
+
<strong>Version 2.50 (01-06-2009)</strong>
|
292 |
+
<ul>
|
293 |
+
<li>NEW: Works For WordPress 2.8 Only</li>
|
294 |
+
<li>NEW: Javascript Now Placed At The Footer</li>
|
295 |
+
<li>NEW: Uses jQuery Instead Of tw-sack</li>
|
296 |
+
<li>NEW: Minified Javascript Instead Of Packed Javascript</li>
|
297 |
+
<li>NEW: Renamed useronline-js-packed.js To useronline-js.js</li>
|
298 |
+
<li>NEW: Renamed useronline-js.js To useronline-js.dev.js</li>
|
299 |
+
<li>NEW: Translate Javascript Variables Using wp_localize_script()</li>
|
300 |
+
<li>NEW: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop()</li>
|
301 |
+
<li>NEW: Uses New Widget Class From WordPress</li>
|
302 |
+
<li>NEW: Merge Widget Code To wp-useronline.php And Remove wp-useronline-widget.php</li>
|
303 |
+
<li>FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']</li>
|
304 |
+
<li>FIXED: Pages Without Name, Use Pages Use $_SERVER['REQUEST_URI'] Instead</li>
|
305 |
+
</ul>
|
306 |
+
</li>
|
307 |
<li>
|
308 |
<strong>Version 2.40 (12-12-2008)</strong>
|
309 |
<ul>
|
499 |
<!-- Upgrade Instructions -->
|
500 |
<div id="Upgrade" style="display: none;">
|
501 |
<div class="SubTitle">» Upgrade Instructions</div>
|
502 |
+
<div class="SubSubTitle">From v2.0x To v2.50</div>
|
503 |
<ol>
|
504 |
<li>
|
505 |
<strong>Deactivate</strong> WP-UserOnline Plugin
|
550 |
</ol>
|
551 |
<div class="SubSubTitle">General Usage (With Widget)</div>
|
552 |
<ol>
|
|
|
|
|
|
|
553 |
<li>
|
554 |
Go to '<strong>WP-Admin -> Appearance -> Widgets</strong>'
|
555 |
</li>
|
556 |
<li>
|
557 |
+
The widget name is <strong>UserOnline</strong>.
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
</li>
|
559 |
<li>
|
560 |
Scroll down for instructions on how to create a <strong>UserOnline Page</strong>.
|
580 |
<li>
|
581 |
Click 'Publish'
|
582 |
</li>
|
583 |
+
<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>
|
584 |
</ol>
|
585 |
<div class="SubSubTitle">UserOnline Stats (Outside WP Loop)</div>
|
586 |
<ul>
|
621 |
</div>
|
622 |
</div>
|
623 |
</div>
|
624 |
+
<p id="Copyright">WP-UserOnline 2.50<br />Copyright © 2009 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
|
625 |
</body>
|
626 |
</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.
|
6 |
-
Stable tag: 2.
|
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.8
|
6 |
+
Stable tag: 2.50
|
7 |
|
8 |
Enable you to display how many users are online on your Wordpress blog with detailed statistics.
|
9 |
|
useronline-js-packed.js
DELETED
@@ -1 +0,0 @@
|
|
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-js.dev.js
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
+----------------------------------------------------------------+
|
3 |
+
| |
|
4 |
+
| WordPress 2.8 Plugin: WP-UserOnline 2.50 |
|
5 |
+
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
6 |
+
| |
|
7 |
+
| File Written By: |
|
8 |
+
| - Lester "GaMerZ" Chan |
|
9 |
+
| - http://lesterchan.net |
|
10 |
+
| |
|
11 |
+
| File Information: |
|
12 |
+
| - Useronline Javascript File |
|
13 |
+
| - wp-content/plugins/wp-useronline/useronline-js.js |
|
14 |
+
| |
|
15 |
+
+----------------------------------------------------------------+
|
16 |
+
*/
|
17 |
+
|
18 |
+
|
19 |
+
// Variables
|
20 |
+
useronlineL10n.timeout = parseInt(useronlineL10n.timeout);
|
21 |
+
|
22 |
+
// UserOnline JavaScript Init
|
23 |
+
function useronline_init() {
|
24 |
+
if(jQuery('#useronline-count').length) {
|
25 |
+
setInterval("get_useronline_count()", useronlineL10n.timeout);
|
26 |
+
}
|
27 |
+
if(jQuery('#useronline-browsing-site').length) {
|
28 |
+
setInterval("get_useronline_browsingsite()", useronlineL10n.timeout);
|
29 |
+
}
|
30 |
+
if(jQuery('#useronline-browsing-page').length) {
|
31 |
+
setInterval("get_useronline_browsingpage()", useronlineL10n.timeout);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
// Get UserOnline Count
|
36 |
+
function get_useronline_count() {
|
37 |
+
jQuery.ajax({type: 'GET', url: useronlineL10n.ajax_url, data: 'useronline_mode=useronline_count', cache: false, success: function (data) { jQuery('#useronline-count').html(data);}});
|
38 |
+
}
|
39 |
+
|
40 |
+
// Get Users Browsing Site
|
41 |
+
function get_useronline_browsingsite() {
|
42 |
+
jQuery.ajax({type: 'GET', url: useronlineL10n.ajax_url, data: 'useronline_mode=useronline_browsingsite', cache: false, success: function (data) { jQuery('#useronline-browsing-site').html(data);}});
|
43 |
+
}
|
44 |
+
|
45 |
+
// Get Users Browsing Page
|
46 |
+
function get_useronline_browsingpage() {
|
47 |
+
jQuery.ajax({type: 'GET', url: useronlineL10n.ajax_url, data: 'useronline_mode=useronline_browsingpage', cache: false, success: function (data) { jQuery('#useronline-browsing-page').html(data);}});
|
48 |
+
}
|
49 |
+
|
50 |
+
// Init UserOnline
|
51 |
+
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
52 |
+
addLoadEvent(useronline_init);
|
useronline-js.js
CHANGED
@@ -1,78 +1 @@
|
|
1 |
-
|
2 |
-
+----------------------------------------------------------------+
|
3 |
-
| |
|
4 |
-
| WordPress 2.6 Plugin: WP-UserOnline 2.40 |
|
5 |
-
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
6 |
-
| |
|
7 |
-
| File Written By: |
|
8 |
-
| - Lester "GaMerZ" Chan |
|
9 |
-
| - http://lesterchan.net |
|
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
|
22 |
-
if(document.getElementById('useronline-count') != null ) {
|
23 |
-
setInterval("get_useronline_count()", useronline_timeout);
|
24 |
-
}
|
25 |
-
// Check Users Browsing Site
|
26 |
-
if(document.getElementById('useronline-browsing-site') != null ) {
|
27 |
-
setInterval("get_useronline_browsingsite()", useronline_timeout);
|
28 |
-
}
|
29 |
-
// Check Users Browsing Page
|
30 |
-
if(document.getElementById('useronline-browsing-page') != null) {
|
31 |
-
setInterval("get_useronline_browsingpage()", useronline_timeout);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
// Get UserOnline Count
|
37 |
-
function get_useronline_count() {
|
38 |
-
useronline_count = new sack(useronline_ajax_url);
|
39 |
-
useronline_count.setVar("useronline_mode", 'useronline_count');
|
40 |
-
useronline_count.method = 'GET';
|
41 |
-
useronline_count.element = 'useronline-count';
|
42 |
-
useronline_count.runAJAX();
|
43 |
-
useronline_count = null;
|
44 |
-
}
|
45 |
-
|
46 |
-
|
47 |
-
// Get Users Browsing Site
|
48 |
-
function get_useronline_browsingsite() {
|
49 |
-
useronline_browsingsite = new sack(useronline_ajax_url);
|
50 |
-
useronline_browsingsite.setVar("useronline_mode", 'useronline_browsingsite');
|
51 |
-
useronline_browsingsite.method = 'GET';
|
52 |
-
useronline_browsingsite.element = 'useronline-browsing-site';
|
53 |
-
useronline_browsingsite.runAJAX();
|
54 |
-
useronline_browsingsite = null;
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
// Get Users Browsing Page
|
59 |
-
function get_useronline_browsingpage() {
|
60 |
-
useronline_browsingpage = new sack(useronline_ajax_url);
|
61 |
-
useronline_browsingpage.setVar("useronline_mode", 'useronline_browsingpage');
|
62 |
-
useronline_browsingpage.method = 'GET';
|
63 |
-
useronline_browsingpage.element = 'useronline-browsing-page';
|
64 |
-
useronline_browsingpage.runAJAX();
|
65 |
-
useronline_browsingpage = null;
|
66 |
-
}
|
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);
|
1 |
+
useronlineL10n.timeout=parseInt(useronlineL10n.timeout);function useronline_init(){if(jQuery("#useronline-count").length){setInterval("get_useronline_count()",useronlineL10n.timeout)}if(jQuery("#useronline-browsing-site").length){setInterval("get_useronline_browsingsite()",useronlineL10n.timeout)}if(jQuery("#useronline-browsing-page").length){setInterval("get_useronline_browsingpage()",useronlineL10n.timeout)}}function get_useronline_count(){jQuery.ajax({type:"GET",url:useronlineL10n.ajax_url,data:"useronline_mode=useronline_count",cache:false,success:function(a){jQuery("#useronline-count").html(a)}})}function get_useronline_browsingsite(){jQuery.ajax({type:"GET",url:useronlineL10n.ajax_url,data:"useronline_mode=useronline_browsingsite",cache:false,success:function(a){jQuery("#useronline-browsing-site").html(a)}})}function get_useronline_browsingpage(){jQuery.ajax({type:"GET",url:useronlineL10n.ajax_url,data:"useronline_mode=useronline_browsingpage",cache:false,success:function(a){jQuery("#useronline-browsing-page").html(a)}})}addLoadEvent=function(a){if(typeof jQuery!="undefined"){jQuery(document).ready(a)}else{if(typeof wpOnload!="function"){wpOnload=a}else{var b=wpOnload;wpOnload=function(){b();a()}}}};addLoadEvent(useronline_init);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useronline-options.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
-
| WordPress 2.
|
6 |
-
| Copyright (c)
|
7 |
| |
|
8 |
| File Written By: |
|
9 |
| - Lester "GaMerZ" Chan |
|
@@ -153,34 +153,34 @@ switch($mode) {
|
|
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 |
-
|
157 |
}
|
158 |
|
159 |
function useronline_default_naming() {
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
}
|
169 |
function useronline_default_browsing_site() {
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
}
|
175 |
function useronline_default_browsing_page() {
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
}
|
181 |
/* ]]> */
|
182 |
</script>
|
183 |
-
<form method="post" action="<?php echo $_SERVER['
|
184 |
<div class="wrap">
|
185 |
<?php screen_icon(); ?>
|
186 |
<h2><?php _e('Useronline Options', 'wp-useronline'); ?></h2>
|
@@ -333,7 +333,7 @@ switch($mode) {
|
|
333 |
<p> </p>
|
334 |
|
335 |
<!-- Uninstall WP-UserOnline -->
|
336 |
-
<form method="post" action="<?php echo $_SERVER['
|
337 |
<div class="wrap">
|
338 |
<h3><?php _e('Uninstall WP-UserOnline', 'wp-useronline'); ?></h3>
|
339 |
<p>
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
+
| WordPress 2.8 Plugin: WP-UserOnline 2.50 |
|
6 |
+
| Copyright (c) 2009 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
9 |
| - Lester "GaMerZ" Chan |
|
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 |
+
jQuery("#useronline_template_" + template).val(default_template);
|
157 |
}
|
158 |
|
159 |
function useronline_default_naming() {
|
160 |
+
jQuery("#useronline_naming_user").val("<?php _e('1 User', 'wp-useronline'); ?>");
|
161 |
+
jQuery("#useronline_naming_users").val("<?php _e('%USERONLINE_COUNT% Users', 'wp-useronline'); ?>");
|
162 |
+
jQuery("#useronline_naming_member").val("<?php _e('1 Member', 'wp-useronline'); ?>");
|
163 |
+
jQuery("#useronline_naming_members").val("<?php _e('%USERONLINE_COUNT% Members', 'wp-useronline'); ?>");
|
164 |
+
jQuery("#useronline_naming_guest").val("<?php _e('1 Guest', 'wp-useronline'); ?>");
|
165 |
+
jQuery("#useronline_naming_guests").val("<?php _e('%USERONLINE_COUNT% Guests', 'wp-useronline'); ?>");
|
166 |
+
jQuery("#useronline_naming_bot").val("<?php _e('1 Bot', 'wp-useronline'); ?>");
|
167 |
+
jQuery("#useronline_naming_bots").val("<?php _e('%USERONLINE_COUNT% Bots', 'wp-useronline'); ?>");
|
168 |
}
|
169 |
function useronline_default_browsing_site() {
|
170 |
+
jQuery("#useronline_separator_browsingsite_members").val("<?php _e(',', 'wp-useronline') ?> ");
|
171 |
+
jQuery("#useronline_separator_browsingsite_guests").val("<?php _e(',', 'wp-useronline') ?> ");
|
172 |
+
jQuery("#useronline_separator_browsingsite_bots").val("<?php _e(',', 'wp-useronline') ?> ");
|
173 |
+
jQuery("#useronline_template_browsingsite").val("<?php echo(_c('Users|Template Element', '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 |
+
jQuery("#useronline_separator_browsingpage_members").val("<?php _e(',', 'wp-useronline') ?> ");
|
177 |
+
jQuery("#useronline_separator_browsingpage_guests").val("<?php _e(',', 'wp-useronline') ?> ");
|
178 |
+
jQuery("#useronline_separator_browsingpage_bots").val("<?php _e(',', 'wp-useronline') ?> ");
|
179 |
+
jQuery("#useronline_template_browsingpage").val("<strong>%USERONLINE_USERS%</strong> <?php _e('Browsing This Page.', 'wp-useronline'); ?><br /><?php echo(_c('Users|Template Element', '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['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
|
184 |
<div class="wrap">
|
185 |
<?php screen_icon(); ?>
|
186 |
<h2><?php _e('Useronline Options', 'wp-useronline'); ?></h2>
|
333 |
<p> </p>
|
334 |
|
335 |
<!-- Uninstall WP-UserOnline -->
|
336 |
+
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
|
337 |
<div class="wrap">
|
338 |
<h3><?php _e('Uninstall WP-UserOnline', 'wp-useronline'); ?></h3>
|
339 |
<p>
|
wp-useronline-widget.php
DELETED
@@ -1,87 +0,0 @@
|
|
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.40
|
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
|
17 |
-
the Free Software Foundation; either version 2 of the License, or
|
18 |
-
(at your option) any later version.
|
19 |
-
|
20 |
-
This program is distributed in the hope that it will be useful,
|
21 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
-
GNU General Public License for more details.
|
24 |
-
|
25 |
-
You should have received a copy of the GNU General Public License
|
26 |
-
along with this program; if not, write to the Free Software
|
27 |
-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
-
*/
|
29 |
-
|
30 |
-
|
31 |
-
### Function: Init WP-UserOnline Widget
|
32 |
-
function widget_useronline_init() {
|
33 |
-
if (!function_exists('register_sidebar_widget')) {
|
34 |
-
return;
|
35 |
-
}
|
36 |
-
|
37 |
-
### Function: WP-UserOnline Widget
|
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";
|
45 |
-
echo '<li><div id="useronline-count">';
|
46 |
-
get_useronline();
|
47 |
-
echo '</div></li>'."\n";
|
48 |
-
if(intval($options['display_usersbrowsingsite']) == 1) {
|
49 |
-
echo '<li><div id="useronline-browsing-site">';
|
50 |
-
get_users_browsing_site();
|
51 |
-
echo '</div></li>'."\n";
|
52 |
-
}
|
53 |
-
echo '</ul>'."\n";
|
54 |
-
}
|
55 |
-
echo $after_widget;
|
56 |
-
}
|
57 |
-
|
58 |
-
### Function: WP-UserOnline Widget Options
|
59 |
-
function widget_useronline_options() {
|
60 |
-
$options = get_option('widget_useronline');
|
61 |
-
if (!is_array($options)) {
|
62 |
-
$options = array('display_usersbrowsingsite' => '0', 'title' => __('UserOnline', 'wp-useronline'));
|
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><label for="useronline-title">'.__('Widget Title', 'wp-useronline').':</label> <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']));
|
73 |
-
echo ' /> <label for="useronline-usersbrowsingsite-1">'.__('Yes', 'wp-useronline').'</label> <input type="radio" id="useronline-usersbrowsingsite-0" name="useronline-usersbrowsingsite" value="0"';
|
74 |
-
checked(0, intval($options['display_usersbrowsingsite']));
|
75 |
-
echo ' /> <label for="useronline-usersbrowsingsite-0">'.__('No', 'wp-useronline').'</label></p>'."\n";
|
76 |
-
echo '<input type="hidden" id="useronline-submit" name="useronline-submit" value="1" />'."\n";
|
77 |
-
}
|
78 |
-
|
79 |
-
// Register Widgets
|
80 |
-
register_sidebar_widget('UserOnline', 'widget_useronline');
|
81 |
-
register_widget_control('UserOnline', 'widget_useronline_options', 350, 120);
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
### Function: Load The WP-UserOnline Widget
|
86 |
-
add_action('plugins_loaded', 'widget_useronline_init');
|
87 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wp-useronline.mo
CHANGED
Binary file
|
wp-useronline.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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.
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: http://lesterchan.net
|
9 |
*/
|
10 |
|
11 |
|
12 |
/*
|
13 |
-
Copyright
|
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
|
@@ -58,24 +58,26 @@ function useronline_menu() {
|
|
58 |
add_submenu_page('index.php', __('WP-UserOnline', 'wp-useronline'), __('WP-UserOnline', 'wp-useronline'), 1, 'wp-useronline/wp-useronline.php', 'display_useronline');
|
59 |
}
|
60 |
if (function_exists('add_options_page')) {
|
61 |
-
add_options_page(__('
|
62 |
}
|
63 |
}
|
64 |
|
65 |
|
66 |
-
### Function:
|
67 |
-
add_action('wp_head', '
|
68 |
-
function
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
}
|
80 |
|
81 |
|
@@ -142,7 +144,7 @@ function useronline() {
|
|
142 |
// Check For Page Title
|
143 |
$make_page = wp_title('»', false);
|
144 |
if(empty($make_page)) {
|
145 |
-
$make_page = get_bloginfo('name');
|
146 |
} elseif(is_single()) {
|
147 |
$make_page = get_bloginfo('name').' » '.__('Blog Archive', 'wp-useronline').' '.$make_page;
|
148 |
} else {
|
@@ -248,7 +250,7 @@ function is_online($user_login) {
|
|
248 |
//add_action('wp_head', 'update_memberlastvisit');
|
249 |
function update_memberlastvisit() {
|
250 |
global $current_user, $user_ID;
|
251 |
-
if(!empty($current_user) &&
|
252 |
update_user_option($user_ID, 'member_last_login', current_time('timestamp'));
|
253 |
}
|
254 |
}
|
@@ -560,7 +562,7 @@ if(!function_exists('get_ipaddress')) {
|
|
560 |
### Function: Check IP
|
561 |
function check_ip($ip) {
|
562 |
$current_user = wp_get_current_user();
|
563 |
-
$user_level = intval($current_user->
|
564 |
$ip2long = ip2long($ip);
|
565 |
if($user_level == 10 && ($ip != 'unknown') && $ip == long2ip($ip2long) && $ip2long !== false) {
|
566 |
return "<span dir=\"ltr\">(<a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$ip\" title=\"".gethostbyaddr($ip)."\">$ip</a>)</span>";
|
@@ -855,14 +857,111 @@ function useronline_page_general_stats($content) {
|
|
855 |
if($stats_display['useronline'] == 1) {
|
856 |
$content .= '<p><strong>'.__('WP-UserOnline', 'wp-useronline').'</strong></p>'."\n";
|
857 |
$content .= '<ul>'."\n";
|
858 |
-
$content .= '<li>'.sprintf(
|
859 |
-
$content .= '<li>'.sprintf(
|
860 |
$content .= '<li>'.__('On', 'wp-useronline').' <strong>'.get_most_useronline_date().'</strong>.</li>'."\n";
|
861 |
$content .= '</ul>'."\n";
|
862 |
}
|
863 |
return $content;
|
864 |
}
|
865 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
|
867 |
### Function: Create UserOnline Table
|
868 |
add_action('activate_wp-useronline/wp-useronline.php', 'create_useronline_table');
|
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.50
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: http://lesterchan.net
|
9 |
*/
|
10 |
|
11 |
|
12 |
/*
|
13 |
+
Copyright 2009 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
|
58 |
add_submenu_page('index.php', __('WP-UserOnline', 'wp-useronline'), __('WP-UserOnline', 'wp-useronline'), 1, 'wp-useronline/wp-useronline.php', 'display_useronline');
|
59 |
}
|
60 |
if (function_exists('add_options_page')) {
|
61 |
+
add_options_page(__('UserOnline', 'wp-useronline'), __('UserOnline', 'wp-useronline'), 'manage_options', 'wp-useronline/useronline-options.php');
|
62 |
}
|
63 |
}
|
64 |
|
65 |
|
66 |
+
### Function: Print Out jQuery Script At The Top
|
67 |
+
add_action('wp_head', 'useronline_javascripts_header');
|
68 |
+
function useronline_javascripts_header() {
|
69 |
+
wp_print_scripts('jquery');
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
### Function: Enqueue Useronline Javascripts/CSS
|
74 |
+
add_action('wp_enqueue_scripts', 'useronline_scripts');
|
75 |
+
function useronline_scripts() {
|
76 |
+
wp_enqueue_script('wp-useronline', plugins_url('wp-useronline/useronline-js.js'), array('jquery'), '2.50', true);
|
77 |
+
wp_localize_script('wp-useronline', 'useronlineL10n', array(
|
78 |
+
'ajax_url' => plugins_url('wp-useronline/wp-useronline.php'),
|
79 |
+
'timeout' => (get_option('useronline_timeout')*1000)
|
80 |
+
));
|
81 |
}
|
82 |
|
83 |
|
144 |
// Check For Page Title
|
145 |
$make_page = wp_title('»', false);
|
146 |
if(empty($make_page)) {
|
147 |
+
$make_page = get_bloginfo('name').' » '.$_SERVER['REQUEST_URI'];
|
148 |
} elseif(is_single()) {
|
149 |
$make_page = get_bloginfo('name').' » '.__('Blog Archive', 'wp-useronline').' '.$make_page;
|
150 |
} else {
|
250 |
//add_action('wp_head', 'update_memberlastvisit');
|
251 |
function update_memberlastvisit() {
|
252 |
global $current_user, $user_ID;
|
253 |
+
if(!empty($current_user) && is_user_logged_in()) {
|
254 |
update_user_option($user_ID, 'member_last_login', current_time('timestamp'));
|
255 |
}
|
256 |
}
|
562 |
### Function: Check IP
|
563 |
function check_ip($ip) {
|
564 |
$current_user = wp_get_current_user();
|
565 |
+
$user_level = intval($current_user->wp_user_level);
|
566 |
$ip2long = ip2long($ip);
|
567 |
if($user_level == 10 && ($ip != 'unknown') && $ip == long2ip($ip2long) && $ip2long !== false) {
|
568 |
return "<span dir=\"ltr\">(<a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=$ip\" title=\"".gethostbyaddr($ip)."\">$ip</a>)</span>";
|
857 |
if($stats_display['useronline'] == 1) {
|
858 |
$content .= '<p><strong>'.__('WP-UserOnline', 'wp-useronline').'</strong></p>'."\n";
|
859 |
$content .= '<ul>'."\n";
|
860 |
+
$content .= '<li>'.sprintf(_n('<strong>%s</strong> user online now.', '<strong>%s</strong> users online now.', get_useronline_count(), 'wp-useronline'), number_format_i18n(get_useronline_count())).'</li>'."\n";
|
861 |
+
$content .= '<li>'.sprintf(_n('Most users ever online was <strong>%s</strong>.', 'Most users ever online was <strong>%s</strong>.', get_most_useronline(), 'wp-useronline'), number_format_i18n(get_most_useronline())).'</li>'."\n";
|
862 |
$content .= '<li>'.__('On', 'wp-useronline').' <strong>'.get_most_useronline_date().'</strong>.</li>'."\n";
|
863 |
$content .= '</ul>'."\n";
|
864 |
}
|
865 |
return $content;
|
866 |
}
|
867 |
|
868 |
+
### Class: WP-UserOnline Widget
|
869 |
+
class WP_Widget_UserOnline extends WP_Widget {
|
870 |
+
// Constructor
|
871 |
+
function WP_Widget_UserOnline() {
|
872 |
+
$widget_ops = array('description' => __('WP-UserOnline users online statistics', 'wp-useronline'));
|
873 |
+
$this->WP_Widget('useronline', __('UserOnline', 'wp-useronline'), $widget_ops);
|
874 |
+
}
|
875 |
+
|
876 |
+
// Display Widget
|
877 |
+
function widget($args, $instance) {
|
878 |
+
extract($args);
|
879 |
+
$title = apply_filters('widget_title', esc_attr($instance['title']));
|
880 |
+
$type = esc_attr($instance['type']);
|
881 |
+
echo $before_widget.$before_title.$title.$after_title;
|
882 |
+
echo '<ul>'."\n";
|
883 |
+
switch($type) {
|
884 |
+
case 'users_online':
|
885 |
+
echo '<li><div id="useronline-count">';
|
886 |
+
get_useronline();
|
887 |
+
echo '</div></li>'."\n";
|
888 |
+
break;
|
889 |
+
case 'users_browsing_page':
|
890 |
+
echo '<li><div id="useronline-browsing-page">';
|
891 |
+
get_users_browsing_page();
|
892 |
+
echo '</div></li>'."\n";
|
893 |
+
break;
|
894 |
+
case 'users_browsing_site':
|
895 |
+
echo '<li><div id="useronline-browsing-site">';
|
896 |
+
get_users_browsing_site();
|
897 |
+
echo '</div></li>'."\n";
|
898 |
+
break;
|
899 |
+
case 'users_online_browsing_page':
|
900 |
+
echo '<li><div id="useronline-count">';
|
901 |
+
get_useronline();
|
902 |
+
echo '</div></li>'."\n";
|
903 |
+
echo '<li><div id="useronline-browsing-page">';
|
904 |
+
get_users_browsing_page();
|
905 |
+
echo '</div></li>'."\n";
|
906 |
+
break;
|
907 |
+
case 'users_online_browsing_site':
|
908 |
+
echo '<li><div id="useronline-count">';
|
909 |
+
get_useronline();
|
910 |
+
echo '</div></li>'."\n";
|
911 |
+
echo '<li><div id="useronline-browsing-site">';
|
912 |
+
get_users_browsing_site();
|
913 |
+
echo '</div></li>'."\n";
|
914 |
+
break;
|
915 |
+
}
|
916 |
+
echo '</ul>'."\n";
|
917 |
+
echo $after_widget;
|
918 |
+
}
|
919 |
+
|
920 |
+
// When Widget Control Form Is Posted
|
921 |
+
function update($new_instance, $old_instance) {
|
922 |
+
if (!isset($new_instance['submit'])) {
|
923 |
+
return false;
|
924 |
+
}
|
925 |
+
$instance = $old_instance;
|
926 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
927 |
+
$instance['type'] = strip_tags($new_instance['type']);
|
928 |
+
return $instance;
|
929 |
+
}
|
930 |
+
|
931 |
+
// DIsplay Widget Control Form
|
932 |
+
function form($instance) {
|
933 |
+
global $wpdb;
|
934 |
+
$instance = wp_parse_args((array) $instance, array('title' => __('UserOnline', 'wp-useronline'), 'type' => 'users_online'));
|
935 |
+
$title = esc_attr($instance['title']);
|
936 |
+
$type = esc_attr($instance['type']);
|
937 |
+
?>
|
938 |
+
<p>
|
939 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'wp-useronline'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label>
|
940 |
+
</p>
|
941 |
+
<p>
|
942 |
+
<label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Statistics Type:', 'wp-useronline'); ?>
|
943 |
+
<select name="<?php echo $this->get_field_name('type'); ?>" id="<?php echo $this->get_field_id('type'); ?>" class="widefat">
|
944 |
+
<option value="users_online"<?php selected('users_online', $type); ?>><?php _e('Users Online Count', 'wp-useronline'); ?></option>
|
945 |
+
<option value="users_browsing_page"<?php selected('users_browsing_page', $type); ?>><?php _e('Users Browsing Current Page', 'wp-useronline'); ?></option>
|
946 |
+
<option value="users_browsing_site"<?php selected('users_browsing_site', $type); ?>><?php _e('Users Browsing Site', 'wp-useronline'); ?></option>
|
947 |
+
<optgroup> </optgroup>
|
948 |
+
<option value="users_online_browsing_page"<?php selected('users_online_browsing_page', $type); ?>><?php _e('Users Online Count & Users Browsing Current Page', 'wp-useronline'); ?></option>
|
949 |
+
<option value="users_online_browsing_site"<?php selected('users_online_browsing_site', $type); ?>><?php _e('Users Online Count & Users Browsing Site', 'wp-useronline'); ?></option>
|
950 |
+
</select>
|
951 |
+
</label>
|
952 |
+
</p>
|
953 |
+
<input type="hidden" id="<?php echo $this->get_field_id('submit'); ?>" name="<?php echo $this->get_field_name('submit'); ?>" value="1" />
|
954 |
+
<?php
|
955 |
+
}
|
956 |
+
}
|
957 |
+
|
958 |
+
|
959 |
+
### Function: Init WP-UserOnline Widget
|
960 |
+
add_action('widgets_init', 'widget_useronline_init');
|
961 |
+
function widget_useronline_init() {
|
962 |
+
register_widget('WP_Widget_UserOnline');
|
963 |
+
}
|
964 |
+
|
965 |
|
966 |
### Function: Create UserOnline Table
|
967 |
add_action('activate_wp-useronline/wp-useronline.php', 'create_useronline_table');
|
wp-useronline.pot
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: WP-UserOnline 2.
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2009-
|
6 |
-
"PO-Revision-Date: 2009-
|
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;_c;
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"X-Poedit-Language: English\n"
|
16 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
@@ -83,47 +83,47 @@ msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-UserOnl
|
|
83 |
msgstr ""
|
84 |
|
85 |
#: useronline-options.php:153
|
86 |
-
#: wp-useronline.php:
|
87 |
msgid "Online"
|
88 |
msgstr ""
|
89 |
|
90 |
#: useronline-options.php:160
|
91 |
-
#: wp-useronline.php:
|
92 |
msgid "1 User"
|
93 |
msgstr ""
|
94 |
|
95 |
#: useronline-options.php:161
|
96 |
-
#: wp-useronline.php:
|
97 |
msgid "%USERONLINE_COUNT% Users"
|
98 |
msgstr ""
|
99 |
|
100 |
#: useronline-options.php:162
|
101 |
-
#: wp-useronline.php:
|
102 |
msgid "1 Member"
|
103 |
msgstr ""
|
104 |
|
105 |
#: useronline-options.php:163
|
106 |
-
#: wp-useronline.php:
|
107 |
msgid "%USERONLINE_COUNT% Members"
|
108 |
msgstr ""
|
109 |
|
110 |
#: useronline-options.php:164
|
111 |
-
#: wp-useronline.php:
|
112 |
msgid "1 Guest"
|
113 |
msgstr ""
|
114 |
|
115 |
#: useronline-options.php:165
|
116 |
-
#: wp-useronline.php:
|
117 |
msgid "%USERONLINE_COUNT% Guests"
|
118 |
msgstr ""
|
119 |
|
120 |
#: useronline-options.php:166
|
121 |
-
#: wp-useronline.php:
|
122 |
msgid "1 Bot"
|
123 |
msgstr ""
|
124 |
|
125 |
#: useronline-options.php:167
|
126 |
-
#: wp-useronline.php:
|
127 |
msgid "%USERONLINE_COUNT% Bots"
|
128 |
msgstr ""
|
129 |
|
@@ -133,20 +133,20 @@ msgstr ""
|
|
133 |
#: useronline-options.php:176
|
134 |
#: useronline-options.php:177
|
135 |
#: useronline-options.php:178
|
136 |
-
#: wp-useronline.php:
|
137 |
-
#: wp-useronline.php:
|
138 |
msgid ","
|
139 |
msgstr ""
|
140 |
|
141 |
#: useronline-options.php:173
|
142 |
#: useronline-options.php:179
|
143 |
-
#: wp-useronline.php:
|
144 |
-
#: wp-useronline.php:
|
145 |
msgid "Users|Template Element"
|
146 |
msgstr ""
|
147 |
|
148 |
#: useronline-options.php:179
|
149 |
-
#: wp-useronline.php:
|
150 |
msgid "Browsing This Page."
|
151 |
msgstr ""
|
152 |
|
@@ -265,7 +265,6 @@ msgid "WordPress Tables"
|
|
265 |
msgstr ""
|
266 |
|
267 |
#: useronline-options.php:379
|
268 |
-
#: wp-useronline-widget.php:73
|
269 |
msgid "Yes"
|
270 |
msgstr ""
|
271 |
|
@@ -277,169 +276,187 @@ msgid ""
|
|
277 |
" Choose [Cancel] To Stop, [OK] To Uninstall."
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: wp-useronline-widget.php:62
|
281 |
-
msgid "UserOnline"
|
282 |
-
msgstr ""
|
283 |
-
|
284 |
-
#: wp-useronline-widget.php:69
|
285 |
-
msgid "Widget Title"
|
286 |
-
msgstr ""
|
287 |
-
|
288 |
-
#: wp-useronline-widget.php:70
|
289 |
-
msgid "Display Users Browsing Site Under Users Online Count?"
|
290 |
-
msgstr ""
|
291 |
-
|
292 |
-
#: wp-useronline-widget.php:75
|
293 |
-
msgid "No"
|
294 |
-
msgstr ""
|
295 |
-
|
296 |
#: wp-useronline.php:58
|
297 |
-
#: wp-useronline.php:844
|
298 |
#: wp-useronline.php:846
|
299 |
-
#: wp-useronline.php:
|
|
|
300 |
msgid "WP-UserOnline"
|
301 |
msgstr ""
|
302 |
|
303 |
#: wp-useronline.php:61
|
304 |
-
|
|
|
|
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: wp-useronline.php:
|
308 |
msgid "guest"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: wp-useronline.php:
|
312 |
-
#: wp-useronline.php:
|
313 |
msgid "Guest"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: wp-useronline.php:
|
317 |
msgid "Blog Archive"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: wp-useronline.php:
|
321 |
-
#: wp-useronline.php:
|
322 |
-
#: wp-useronline.php:742
|
323 |
#: wp-useronline.php:744
|
324 |
-
#: wp-useronline.php:
|
325 |
#: wp-useronline.php:764
|
326 |
-
#: wp-useronline.php:
|
|
|
327 |
#, php-format
|
328 |
msgid "%s @ %s"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: wp-useronline.php:
|
332 |
msgid "No User Is Browsing This Site"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: wp-useronline.php:
|
336 |
msgid "No User Is Browsing This Page"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: wp-useronline.php:
|
340 |
msgid "Users Online Now"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: wp-useronline.php:
|
344 |
#, php-format
|
345 |
msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: wp-useronline.php:
|
349 |
#, php-format
|
350 |
msgid "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: wp-useronline.php:
|
354 |
-
#: wp-useronline.php:
|
355 |
#, php-format
|
356 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: wp-useronline.php:
|
360 |
msgid "User"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: wp-useronline.php:
|
364 |
msgid "Users"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: wp-useronline.php:
|
368 |
msgid "Member"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: wp-useronline.php:
|
372 |
msgid "Members"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: wp-useronline.php:
|
376 |
msgid "Guests"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: wp-useronline.php:
|
380 |
msgid "Bot"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: wp-useronline.php:
|
384 |
msgid "Bots"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: wp-useronline.php:
|
388 |
#, php-format
|
389 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: wp-useronline.php:
|
393 |
#, php-format
|
394 |
msgid "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: wp-useronline.php:
|
398 |
-
#: wp-useronline.php:
|
399 |
-
#: wp-useronline.php:
|
400 |
msgid "Online Now"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: wp-useronline.php:
|
404 |
-
#: wp-useronline.php:
|
405 |
msgid "referral"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: wp-useronline.php:742
|
409 |
#: wp-useronline.php:744
|
410 |
-
#: wp-useronline.php:
|
411 |
#: wp-useronline.php:764
|
412 |
-
#: wp-useronline.php:
|
|
|
413 |
msgid "on"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: wp-useronline.php:742
|
417 |
#: wp-useronline.php:744
|
418 |
-
#: wp-useronline.php:
|
419 |
#: wp-useronline.php:764
|
420 |
-
#: wp-useronline.php:
|
|
|
421 |
msgid "url"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: wp-useronline.php:
|
425 |
msgid "No One Is Online Now"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: wp-useronline.php:
|
429 |
#, php-format
|
430 |
msgid "<strong>%s</strong> user online now."
|
431 |
msgid_plural "<strong>%s</strong> users online now."
|
432 |
msgstr[0] ""
|
433 |
msgstr[1] ""
|
434 |
|
435 |
-
#: wp-useronline.php:
|
436 |
#, php-format
|
437 |
msgid "Most users ever online was <strong>%s</strong>."
|
438 |
msgid_plural "Most users ever online was <strong>%s</strong>."
|
439 |
msgstr[0] ""
|
440 |
msgstr[1] ""
|
441 |
|
442 |
-
#: wp-useronline.php:
|
443 |
msgid "On"
|
444 |
msgstr ""
|
445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: WP-UserOnline 2.50\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-06-08 18:39+0800\n"
|
6 |
+
"PO-Revision-Date: 2009-06-08 18:39+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;_c;_n:1,2;__ngettext_noop:1,2\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"X-Poedit-Language: English\n"
|
16 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
83 |
msgstr ""
|
84 |
|
85 |
#: useronline-options.php:153
|
86 |
+
#: wp-useronline.php:1013
|
87 |
msgid "Online"
|
88 |
msgstr ""
|
89 |
|
90 |
#: useronline-options.php:160
|
91 |
+
#: wp-useronline.php:1012
|
92 |
msgid "1 User"
|
93 |
msgstr ""
|
94 |
|
95 |
#: useronline-options.php:161
|
96 |
+
#: wp-useronline.php:1012
|
97 |
msgid "%USERONLINE_COUNT% Users"
|
98 |
msgstr ""
|
99 |
|
100 |
#: useronline-options.php:162
|
101 |
+
#: wp-useronline.php:1012
|
102 |
msgid "1 Member"
|
103 |
msgstr ""
|
104 |
|
105 |
#: useronline-options.php:163
|
106 |
+
#: wp-useronline.php:1012
|
107 |
msgid "%USERONLINE_COUNT% Members"
|
108 |
msgstr ""
|
109 |
|
110 |
#: useronline-options.php:164
|
111 |
+
#: wp-useronline.php:1012
|
112 |
msgid "1 Guest"
|
113 |
msgstr ""
|
114 |
|
115 |
#: useronline-options.php:165
|
116 |
+
#: wp-useronline.php:1012
|
117 |
msgid "%USERONLINE_COUNT% Guests"
|
118 |
msgstr ""
|
119 |
|
120 |
#: useronline-options.php:166
|
121 |
+
#: wp-useronline.php:1012
|
122 |
msgid "1 Bot"
|
123 |
msgstr ""
|
124 |
|
125 |
#: useronline-options.php:167
|
126 |
+
#: wp-useronline.php:1012
|
127 |
msgid "%USERONLINE_COUNT% Bots"
|
128 |
msgstr ""
|
129 |
|
133 |
#: useronline-options.php:176
|
134 |
#: useronline-options.php:177
|
135 |
#: useronline-options.php:178
|
136 |
+
#: wp-useronline.php:1014
|
137 |
+
#: wp-useronline.php:1015
|
138 |
msgid ","
|
139 |
msgstr ""
|
140 |
|
141 |
#: useronline-options.php:173
|
142 |
#: useronline-options.php:179
|
143 |
+
#: wp-useronline.php:1014
|
144 |
+
#: wp-useronline.php:1015
|
145 |
msgid "Users|Template Element"
|
146 |
msgstr ""
|
147 |
|
148 |
#: useronline-options.php:179
|
149 |
+
#: wp-useronline.php:1015
|
150 |
msgid "Browsing This Page."
|
151 |
msgstr ""
|
152 |
|
265 |
msgstr ""
|
266 |
|
267 |
#: useronline-options.php:379
|
|
|
268 |
msgid "Yes"
|
269 |
msgstr ""
|
270 |
|
276 |
" Choose [Cancel] To Stop, [OK] To Uninstall."
|
277 |
msgstr ""
|
278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
#: wp-useronline.php:58
|
|
|
280 |
#: wp-useronline.php:846
|
281 |
+
#: wp-useronline.php:848
|
282 |
+
#: wp-useronline.php:858
|
283 |
msgid "WP-UserOnline"
|
284 |
msgstr ""
|
285 |
|
286 |
#: wp-useronline.php:61
|
287 |
+
#: wp-useronline.php:873
|
288 |
+
#: wp-useronline.php:934
|
289 |
+
msgid "UserOnline"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: wp-useronline.php:128
|
293 |
msgid "guest"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: wp-useronline.php:134
|
297 |
+
#: wp-useronline.php:709
|
298 |
msgid "Guest"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: wp-useronline.php:149
|
302 |
msgid "Blog Archive"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: wp-useronline.php:230
|
306 |
+
#: wp-useronline.php:261
|
|
|
307 |
#: wp-useronline.php:744
|
308 |
+
#: wp-useronline.php:746
|
309 |
#: wp-useronline.php:764
|
310 |
+
#: wp-useronline.php:766
|
311 |
+
#: wp-useronline.php:779
|
312 |
#, php-format
|
313 |
msgid "%s @ %s"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: wp-useronline.php:398
|
317 |
msgid "No User Is Browsing This Site"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: wp-useronline.php:540
|
321 |
msgid "No User Is Browsing This Page"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: wp-useronline.php:611
|
325 |
msgid "Users Online Now"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: wp-useronline.php:623
|
329 |
#, php-format
|
330 |
msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: wp-useronline.php:625
|
334 |
#, php-format
|
335 |
msgid "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: wp-useronline.php:630
|
339 |
+
#: wp-useronline.php:731
|
340 |
#, php-format
|
341 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: wp-useronline.php:694
|
345 |
msgid "User"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: wp-useronline.php:696
|
349 |
msgid "Users"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: wp-useronline.php:701
|
353 |
msgid "Member"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: wp-useronline.php:703
|
357 |
msgid "Members"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: wp-useronline.php:711
|
361 |
msgid "Guests"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: wp-useronline.php:716
|
365 |
msgid "Bot"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: wp-useronline.php:718
|
369 |
msgid "Bots"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: wp-useronline.php:727
|
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:729
|
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:734
|
383 |
+
#: wp-useronline.php:754
|
384 |
+
#: wp-useronline.php:774
|
385 |
msgid "Online Now"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: wp-useronline.php:741
|
389 |
+
#: wp-useronline.php:761
|
390 |
msgid "referral"
|
391 |
msgstr ""
|
392 |
|
|
|
393 |
#: wp-useronline.php:744
|
394 |
+
#: wp-useronline.php:746
|
395 |
#: wp-useronline.php:764
|
396 |
+
#: wp-useronline.php:766
|
397 |
+
#: wp-useronline.php:779
|
398 |
msgid "on"
|
399 |
msgstr ""
|
400 |
|
|
|
401 |
#: wp-useronline.php:744
|
402 |
+
#: wp-useronline.php:746
|
403 |
#: wp-useronline.php:764
|
404 |
+
#: wp-useronline.php:766
|
405 |
+
#: wp-useronline.php:779
|
406 |
msgid "url"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: wp-useronline.php:786
|
410 |
msgid "No One Is Online Now"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: wp-useronline.php:860
|
414 |
#, php-format
|
415 |
msgid "<strong>%s</strong> user online now."
|
416 |
msgid_plural "<strong>%s</strong> users online now."
|
417 |
msgstr[0] ""
|
418 |
msgstr[1] ""
|
419 |
|
420 |
+
#: wp-useronline.php:861
|
421 |
#, php-format
|
422 |
msgid "Most users ever online was <strong>%s</strong>."
|
423 |
msgid_plural "Most users ever online was <strong>%s</strong>."
|
424 |
msgstr[0] ""
|
425 |
msgstr[1] ""
|
426 |
|
427 |
+
#: wp-useronline.php:862
|
428 |
msgid "On"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: wp-useronline.php:872
|
432 |
+
msgid "WP-UserOnline users online statistics"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: wp-useronline.php:939
|
436 |
+
msgid "Title:"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: wp-useronline.php:942
|
440 |
+
msgid "Statistics Type:"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: wp-useronline.php:944
|
444 |
+
msgid "Users Online Count"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: wp-useronline.php:945
|
448 |
+
msgid "Users Browsing Current Page"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: wp-useronline.php:946
|
452 |
+
msgid "Users Browsing Site"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: wp-useronline.php:948
|
456 |
+
msgid "Users Online Count & Users Browsing Current Page"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: wp-useronline.php:949
|
460 |
+
msgid "Users Online Count & Users Browsing Site"
|
461 |
+
msgstr ""
|
462 |
+
|