=== XMPP Statistics ===
Contributors: Beherit
Tags: xmpp, jabber, ejabberd
Requires at least: 4.4
Tested up to: 6.6
Stable tag: 1.12
Requires PHP: 7.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Displays the statistics from ejabberd XMPP server through ReST API.

== Description ==
Displays the statistics from ejabberd XMPP server through ReST API (by using module mod_http_api). The plugin is useful when the XMPP server is located on another machine. Easy to configure and use - just need to type ReST API url and insert shortcodes on the page. Plugin can save the server statistics to the database and show them in a graph just like Munin.

= Live demo =
[Here](https://jix.im/en/informations/statistics/) you can see the statistics, generated by this plugin, from my own XMPP server.

= Other Notes =
This plugin is using [Flot](https://github.com/flot/flot) (Javascript plotting library for jQuery) and [wp-color-picker-alpha](https://github.com/kallookoo/wp-color-picker-alpha) (automatically overwrite Iris for enabled Alpha Channel in wpColorPicker).

== Installation ==

In most cases you can install automatically from plugins page in admin panel.

However, if you want to install it manually, follow these steps:

1. Download the plugin and unzip the archive.
2. Upload the entire `xmpp-statistics` folder to the `/wp-content/plugins/` directory.
3. Activate the plugin through the Plugins menu in WordPress.

== Screenshots ==
1. Instant statistics by using shortcodes.
2. Statistics in the graphs form.
3. Statistics in the graphs form.

== Changelog ==
= 1.12 (2024-10-27) =
* Basic support for OAuth tokens.
* wp-color-picker-alpha updated to 3.0.4.
= 1.11.2 (2024-10-23) =
* Bugfix in JSON requests to the ejabberd.
= 1.11 (2024-06-14) =
* Required at least ejabberd 24.02.
* Improved charts cache.
* Flot updated to 4.2.6.
* wp-color-picker-alpha updated to 3.0.3.
* Other minor improvements.
= 1.10 (2022-11-20) =
* Minor changes in the example configuration of Nginx+Lua.
* Flot updated to 4.2.3.
* wp-color-picker-alpha updated to 3.0.2.
* Fixed php warnings.
* Other minor bug fixes and improvements.
= 1.9 (2020-08-20) =
* Visual changes on the settings page.
* Simple shortcodes use pure JavaScript instead of jQuery.
* Improved charts style.
* Other minor improvements.
= 1.8.4 (2019-10-18) =
* Localize the graphs cache.
= 1.8.3 (2019-10-03) =
* Cache improvements.
= 1.8.2 (2019-09-27) =
* Improved graphs cache.
* Major changes in example configuration.
* Minor improvements.
= 1.8 (2018-11-27) =
* All forms now use the REST API instead of Ajax.
* Changed the method for obtaining system information.
* Added new graphs and shortcodes.
* A lot of optimization in JS scripts.
* Removed FontAwesome and Hint.css.
* Increased the required version of WordPress to version 4.4.
* Major changes in settings page.
* Minor bug fixes in graphs.
* Other minor bug fixes and improvements.
= 1.7.2 (2017-02-17) =
* Minor fixes.
= 1.7 (2016-12-10) =
* Daily graphs can show previous data from last week instead of only yesterday.
* Added option to automatically delete unnecessary data from the database.
* Verify SSL in ReST API connections.
* Deleting all data after uninstalling the plugin.
* Visual changes on the settings page.
* Hint.css updated to 2.4.1.
* FontAwesome updated to 4.7.0.
= 1.6 (2016-06-12) =
* Added cache system for graphs.
* FontAwesome updated to 4.6.3.
* Hint.css updated to 2.3.1.
* Minor fixes and improvements.
= 1.5.4 (2016-04-27) =
* Better connection errors handling.
* Removed retrying the connection in Ajax requests.
= 1.5.2 (2016-04-23) =
* Minor fixes and improvements.
= 1.5 (2016-04-21) =
* Changed method of getting data from mod_rest to mod_http_api (core ReST API with basic authentication).
* Added retrying the connection in post data.
* Minor changes and fixes.
= 1.4.12 (2016-03-16) =
* FontAwesome updated to 4.5.0.
* Hint.css updated to 2.2.0.
* Minor improvements.
= 1.4.10 (2015-12-17) =
* Return data in json at ajax requests for simple shortcodes.
* Fix in showing previous graphs data.
* Changed the default timeout options value.
= 1.4.8 (2015-11-21) =
* Don't show graph lines when previous data timestamp is greater than hour.
* Changes in cron job.
* Fix graph tooltips on mobile devices.
= 1.4.6 (2015-10-25) =
* Fix timezone conversion in tooltips on graphs.
= 1.4.5 (2015-10-23) =
* Minor improvements.
= 1.4.4 (2015-10-20) =
* Changed commands for retrieving information about the s2s connections.
* Added new options - connection timeout and connection retry limit.
* Added retrying retrieve graphs data in case of an error.
* Changed language domain to xmpp-statistics to work with WordPress new translation process.
* Small changes in example configuration.
* Other minor fixes.
= 1.4.2 (2015-10-02) =
* Optimize display the weekly charts.
* Optimize graphs data for registered users.
* Other minor changes and fixes.
= 1.4 (2015-09-20) =
* Optimize data loading in graphs.
* Changed all dynamic jQuery scripts into static files.
* Automatic update charts every 5 minutes.
* Showing previously logged in users in the daily/week chart.
* Added 4 new graphs for s2s connections (with previous values).
* Small fixes in s2s connections graphs.
* Better showing data in graph for the registered users and xmpp/system uptime.
* Optional parameters for shortcode xmpp_uptime and system_uptime.
* Other minor changes and fixes.
= 1.3.2 (2015-08-04) =
* Properly added a link to the settings on plugins page.
* Updated Hint.css and FontAwesome.
* Improved post data.
* Minor bugfix and changes.
= 1.3 (2015-06-13) =
* Optimize linking the scripts.
* Optimize display the graphs data in ajax.
* Hiding single empty records in graphs, that seems to be a connection error.
* Minor changes in getting the data.
* Fix getting default options value.
* Small visual changes on the options page.
= 1.2 (2015-05-27) =
* Added ability to change graphs style.
* Added graphs loading info.
* Raising the required WP version.
* Other minor changes and fixes.
= 1.1.3 (2015-05-21) =
* Redraw graphs on browser window resize.
* Improve CSS for RWD support.
= 1.1.2 (2015-05-13) =
* Added donations box.
* Minor visual changes on the options page.
* Small bugfix.
= 1.1 (2015-05-13) =
* Option to set last activity information on account used for authorization.
* Add Font Awesome.
* Visual changes on the options page.
* Other minor changes and bugfix.
= 1.0.2 (2015-05-10) =
* Fix plugin activation/deactivation hook.
* Fix including the files.
= 1.0 (2015-05-05) =
* First public version.