WP-UserOnline - Version 2.87.1

Version Description

  • NEW: Bump to 4.7
  • NEW: New useronline_custom_template filter
Download this release

Release Info

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

Code changes from version 2.87 to 2.87.1

Files changed (4) hide show
  1. readme.txt +26 -144
  2. template-tags.php +2 -2
  3. wp-stats.php +1 -0
  4. wp-useronline.php +4 -2
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: GamerZ, scribu
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: useronline, usersonline, wp-useronline, online, users, user, ajax, widget
5
- Requires at least: 3.1
6
- Tested up to: 4.5
7
- Stable tag: 2.87
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,6 +13,20 @@ Enable you to display how many users are online on your Wordpress blog with deta
13
  == Description ==
14
  This plugin enables you to display how many users are online on your Wordpress site, with detailed statistics of where they are and who they are (Members/Guests/Search Bots).
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  = Build Status =
17
  [![Build Status](https://travis-ci.org/lesterchan/wp-useronline.svg?branch=master)](https://travis-ci.org/lesterchan/wp-useronline)
18
 
@@ -25,25 +39,13 @@ This plugin enables you to display how many users are online on your Wordpress s
25
  = Donations =
26
  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, I will really appreciate it. If not feel free to use it without any obligations.
27
 
28
- == Installation ==
29
- You can either install it automatically from the WordPress admin, or do it manually:
30
-
31
- 1. Unzip the archive and put the `wp-useronline` folder into your plugins folder (/wp-content/plugins/).
32
- 1. Activate the plugin from the Plugins menu.
33
-
34
- = General Usage (With Widget) =
35
- 1. Go to `WP-Admin -> Appearance -> Widgets`
36
- 1. The widget name is <strong>UserOnline</strong>.
37
- 1. Scroll down for instructions on how to create a *UserOnline Page*.
38
 
39
- = General Usage (Without Widget) =
40
- * Open `wp-content/themes/<YOUR THEME NAME>/sidebar.php` and add Anywhere:
 
41
 
42
- `
43
- <?php if (function_exists('users_online')): ?>
44
- <p>Users online: <div id="useronline-count"><?php users_online(); ?></div></p>
45
- <?php endif; ?>
46
- `
47
 
48
  = Creating A UserOnline Page =
49
  1. Go to `WP-Admin -> Pages -> Add New`
@@ -55,14 +57,6 @@ You can either install it automatically from the WordPress admin, or do it manua
55
 
56
  If you ARE NOT using nice permalinks, you need to go to `WP-Admin -> Settings -> UserOnline` and under 'UserOnline URL', you need to fill in the URL to the UserOnline Page you created above.
57
 
58
- == Screenshots ==
59
-
60
- 1. Admin - Dashboard's Right Now
61
- 2. UserOnline Page
62
- 3. Admin - Settings Page
63
-
64
- == Frequently Asked Questions ==
65
-
66
  = To Display Most Number Of Users Online =
67
  * Use:
68
  `
@@ -94,6 +88,10 @@ Make sure your host is running PHP 5. The only foolproof way to do this is to ad
94
  `var_dump(PHP_VERSION);`
95
 
96
  == Changelog ==
 
 
 
 
97
  = 2.87 =
98
  * NEW: Remove po/mo files from the plugin
99
  * NEW: Use translate.wordpress.org to translate the plugin
@@ -146,119 +144,3 @@ Make sure your host is running PHP 5. The only foolproof way to do this is to ad
146
  = 2.62 (2010-03-07) =
147
  * fix integration with WP-Stats
148
  * fix error with get_admin_page_title()
149
-
150
- = 2.61 (2010-02-12) =
151
- * fix fatal error with scbWidget
152
-
153
- = 2.60 (2010-02-12) =
154
- * display admin page titles
155
- * use domaintools.com instead of arin.net
156
- * removed ip2nation code and flag images
157
- * simpler uninstallation procedure
158
- * much cleaner code
159
- * [more info](http://scribu.net/wordpress/wp-useronline/wu-2-60.html)
160
-
161
- = 2.50 (2009-06-01) =
162
- * new: Works For WordPress 2.8 Only
163
- * new: Javascript Now Placed At The Footer
164
- * new: Uses jQuery Instead Of tw-sack
165
- * new: Minified Javascript Instead Of Packed Javascript
166
- * new: Renamed useronline-js-packed.js To useronline-js.js
167
- * new: Renamed useronline-js.js To useronline-js.dev.js
168
- * new: Translate Javascript Variables Using wp_localize_script()
169
- * new: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop()
170
- * new: Uses New Widget Class From WordPress
171
- * new: Merge Widget Code To wp-useronline.php And Remove wp-useronline-widget.php
172
- * fixed: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']
173
- * fixed: Pages Without Name, Use Pages Use $_SERVER['REQUEST_URI'] Instead
174
-
175
- = 2.40 (2008-12-12) =
176
- * new: Works For WordPress 2.7 Only
177
- * new: Uses plugins_url() And site_url()
178
- * new: Cache IPs of ip2nation by Kambiz R. Khojasteh
179
- * new: Country Flags Images Are Now Included As Part Of The Plugin
180
- * new: Right To Left Language Support by Kambiz R. Khojasteh
181
- * new: Better Translation Using __ngetext() by Anna Ozeritskaya
182
- * new: Output Of useronline_page() Applied To "useronline_page" Filter by Kambiz R. Khojasteh
183
- * new: Called useronline_textdomain() In create_useronline_table() by Kambiz R. Khojasteh
184
- * fixed: SSL Support
185
-
186
- = 2.31 (2008-07-16) =
187
- * new: Works For WordPress 2.6
188
- * fixed: MYSQL Charset Issue Should Be Solved
189
- * fixed: Do Not Show WP-Stats Link If There Is No WP-Stats
190
-
191
- = 2.30 (2008-06-01) =
192
- * new: Works For WordPress 2.5 Only
193
- * new: Uses Shortcode API
194
- * new: Uses /wp-useronline/ Folder Instead Of /useronline/
195
- * new: Uses wp-useronline.php Instead Of useronline.php
196
- * new: Uses wp-useronline-widget.php Instead Of useronline-widget.php
197
- * new: Renamed useronline-js.php To useronline-js.js and Move The Dynamic Javascript Variables To The PHP Pages
198
- * new: Uses useronline-js-packed.js
199
- * new: Added Users Online To Dashboard "Right Now"
200
- * new: Use number_format_i18n() Instead
201
- * fixed: Should Use display_name Instead Of user_name If WP-Stats Is Not Installed
202
- * fixed: XSS Vulnerability
203
-
204
- = 2.20 (2007-10-01) =
205
- * new: Works For WordPress 2.3 Only
206
- * new: Templates Options Added
207
- * new: Ability To Uninstall WP-UserOnline
208
- * new: Uses WP-Stats Filter To Add Stats Into WP-Stats Page
209
-
210
- = 2.11 (2007-06-01) =
211
- * new: Referral Link Is Now Shown On The UserOnline Page
212
- * fixed: Uses WordPress's Default Date And Time Format
213
- * fixed: Able To Leave Blank For 'UserOnline URL' Option To Disable Link To UserOnline Page
214
-
215
- = 2.10 (2007-02-01) =
216
- * new: Works For WordPress 2.1 Only
217
- * new: Renamed useronline-js.js to useronline-js.php To Enable PHP Parsing
218
-
219
- = 2.06 (2007-01-02) =
220
- * new: useronline.php Now Handles The AJAX Processing Instead Of index.php
221
- * new: Localize WP-UserOnline
222
- * fixed: JavaScript onLoad Function Conflict By zeug
223
- * fixed: AJAX Not Working On Servers Running On PHP CGI
224
- * fixed: IP2Nation Will Now Work Whether Or Not WP-Stats Is Activated
225
-
226
- = 2.05 (2006-10-01) =
227
- * new: UserOnline Is Now Embedded Into A Page, And Hence No More Integrating Of UserOnline Page (Removed wp-useronline.php)
228
- * new: Changed In WP-UserOnline Structure: Members Mean Registered Users and Guests Mean Comment Authors
229
- * new: get_users_browsing_site(false) And get_users_browsing_page(false) Will Now Return An Array Containing Total Users, Total Members, Total Guests and Total Bots Online
230
- * new: Added Widget Title Option To WP-UserOnline Widget
231
- * fixed: Invalid IP Error
232
- * fixed: If Site URL Doesn't Match WP Option's Site URL, WP-UserOnline Will Not Work
233
-
234
- = 2.04 (2006-07-01) =
235
- * new: AJAX Is Now Used For Updating Users Online Every 1 Minute Without Refreshing The Page
236
- * new: You Can Now Place Users Online Count And Users Browsing Site Data On The Sidebar As A Widget
237
- * new: UserOnline Options Panel And The Code That WP-UserOnline Generated Is XHTML 1.0 Transitional
238
- * new: Added Useronline Options In WP Administration Panel Under 'Options -> Useronline'
239
- * new: If You Have ip2nation Plugin Installed, The User's/Guest's Country Flag Will Be Displayed
240
-
241
- = 2.03 (2006-04-01) =
242
- * new: Added get_users_browsing_site(); To Display Users Browsing The Site
243
- * fixed: wp-stats.php Link
244
- * fixed: Some Grammer Errors, Credit To xclouds (http://www.xclouds.com/)
245
-
246
- = 2.02 (2006-03-01) =
247
- * new: No More Install/Upgrade File, It Will Install/Upgrade When You Activate The Plugin.
248
- * fixed: IP 'Unknown' Error, Credit To Brian Layman (http://www.knitchat.com/)
249
- * fixed: ON DUPLICATE KEY Error, Credit To Brian Layman (http://www.knitchat.com/)
250
- * fixed: DUPLICATE KEY Error By Using DELETE First, Credit To Jody Cairns (http://steelwhitetable.org/blog/)
251
-
252
- = 2.01 (2006-02-01) =
253
- * new: Added Users Browsing Page
254
- * new: Added Most Users Ever Online
255
- * fixed: Added UNIQUE Key Instead Of Primary Key To Test Whether It Will Solve Duplicate Entry Errors
256
- * fixed: Quotes Issue In Page Title
257
-
258
- = 2.00 (2006-01-01) =
259
- * new: Compatible With Only WordPress 2.0
260
- * new: Better Installer
261
- * new: GPL License Added
262
- * new: Page Title Added To wp-useronline.php
263
- * new: Added Extra Bots, Credit To Greg Perry (http://www.gregrperry.com/)
264
- * fixed: Cleaner Codes
2
  Contributors: GamerZ, scribu
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: useronline, usersonline, wp-useronline, online, users, user, ajax, widget
5
+ Requires at least: 4.0
6
+ Tested up to: 4.7
7
+ Stable tag: 2.87.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  This plugin enables you to display how many users are online on your Wordpress site, with detailed statistics of where they are and who they are (Members/Guests/Search Bots).
15
 
16
+ = Usage (With Widget) =
17
+ 1. Go to `WP-Admin -> Appearance -> Widgets`
18
+ 1. The widget name is <strong>UserOnline</strong>.
19
+ 1. Scroll down for instructions on how to create a *UserOnline Page*.
20
+
21
+ = Usage (Without Widget) =
22
+ * Open `wp-content/themes/<YOUR THEME NAME>/sidebar.php` and add Anywhere:
23
+
24
+ `
25
+ <?php if (function_exists('users_online')): ?>
26
+ <p>Users online: <div id="useronline-count"><?php users_online(); ?></div></p>
27
+ <?php endif; ?>
28
+ `
29
+
30
  = Build Status =
31
  [![Build Status](https://travis-ci.org/lesterchan/wp-useronline.svg?branch=master)](https://travis-ci.org/lesterchan/wp-useronline)
32
 
39
  = Donations =
40
  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, I will really appreciate it. If not feel free to use it without any obligations.
41
 
42
+ == Screenshots ==
 
 
 
 
 
 
 
 
 
43
 
44
+ 1. Admin - Dashboard's Right Now
45
+ 2. UserOnline Page
46
+ 3. Admin - Settings Page
47
 
48
+ == Frequently Asked Questions ==
 
 
 
 
49
 
50
  = Creating A UserOnline Page =
51
  1. Go to `WP-Admin -> Pages -> Add New`
57
 
58
  If you ARE NOT using nice permalinks, you need to go to `WP-Admin -> Settings -> UserOnline` and under 'UserOnline URL', you need to fill in the URL to the UserOnline Page you created above.
59
 
 
 
 
 
 
 
 
 
60
  = To Display Most Number Of Users Online =
61
  * Use:
62
  `
88
  `var_dump(PHP_VERSION);`
89
 
90
  == Changelog ==
91
+ = 2.87.1 =
92
+ * NEW: Bump to 4.7
93
+ * NEW: New useronline_custom_template filter
94
+
95
  = 2.87 =
96
  * NEW: Remove po/mo files from the plugin
97
  * NEW: Use translate.wordpress.org to translate the plugin
144
  = 2.62 (2010-03-07) =
145
  * fix integration with WP-Stats
146
  * fix error with get_admin_page_title()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
template-tags.php CHANGED
@@ -217,14 +217,14 @@ class UserOnline_Template {
217
  $referral_link = self::format_link( $user->referral, $_referral );
218
  }
219
 
220
- $output .= "<p><strong>#$nr - $name</strong> $user_ip $_on $date<br/>$page_title $current_link $referral_link</p>\n";
221
  }
222
  }
223
 
224
  return $output;
225
  }
226
 
227
- static private function format_link($url, $title) {
228
  if ( !empty($url) )
229
  return '[' . html_link( $url, $title ) . ']';
230
 
217
  $referral_link = self::format_link( $user->referral, $_referral );
218
  }
219
 
220
+ $output .= apply_filters("useronline_custom_template", "<p><strong>#$nr - $name</strong> $user_ip $_on $date<br/>$page_title $current_link $referral_link</p>\n", $nr, $user);
221
  }
222
  }
223
 
224
  return $output;
225
  }
226
 
227
+ static function format_link($url, $title) {
228
  if ( !empty($url) )
229
  return '[' . html_link( $url, $title ) . ']';
230
 
wp-stats.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
 
3
  class UserOnline_WpStats {
4
 
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
  class UserOnline_WpStats {
5
 
wp-useronline.php CHANGED
@@ -3,12 +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 site
6
- Version: 2.87
7
  Author: Lester 'GaMerZ' Chan
8
- Author URI: http://lesterchan.net
9
  Text Domain: wp-useronline
10
  */
11
 
 
 
12
  @include dirname( __FILE__ ) . '/scb/load.php';
13
 
14
  function _useronline_init() {
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 site
6
+ Version: 2.87.1
7
  Author: Lester 'GaMerZ' Chan
8
+ Author URI: https://lesterchan.net
9
  Text Domain: wp-useronline
10
  */
11
 
12
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
+
14
  @include dirname( __FILE__ ) . '/scb/load.php';
15
 
16
  function _useronline_init() {