====== WikiStats Plugin ======
---- plugin ----
description: wikistats Plugin for DokuWiki
author : 4x4.Chris
email : 4x4.chris@gmail.com
type : Syntax, Helper, Action
lastupdate : 2017-06-28
compatible : Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners
depends :
conflicts :
similar : stats, numberof
tags : statistics, report, !missing, !obsolete
downloadurl: #https://github.com/4x4-chris/wikistats/zipball/master
bugtracker : #https://github.com/4x4-chris/wikistats/issues
sourcerepo : #https://github.com/4x4-chris/wikistats
donationurl:
screenshot_img : https://raw.githubusercontent.com/4x4-chris/wikistats/master/screenshots/stats.png
----
===== Installation =====
Search and install the plugin using the [[plugin:extension|Extension Manager]].
Refer to [[:Plugins]] on how to install plugins manually. If you install this plugin manually, make sure it is installed in ''lib/plugins/wikistats/'' folder is called different it will not work!
==== Add Stat Link to your Template ====
This plugin requires the modification of the template (Often ''main.php'').
Decide where you want to insert the **Stats** link in your template and
insert the following code:
if (!plugin_isdisabled('wikistats') &&
($wikistats =& plugin_load('helper', 'wikistats'))) {
$wikistats->add_stats_link();
}
Most likely you want to do that in the ''/lib/tpl/default/main.php'' inside the
''%%
For Dokuwiki "**Release 2017-02-19b Frusterick Manners**", you should process as follows:
add_stats_link();
?>
Now, you have to create the **stats page** following the namespace and name given in the plugin admin configuration (''wiki:statistiques'' is the default value).
To create this page, do as usual :smile:
And add some code within, for example:
====== Statistiques ======
{{wikistats>ns = -wiki & type = stats}}
===== Examples/Usage =====
==== Type of stats displayed ====
To display only topic (pages) stats
{{wikistats>type = pages}}
To display only resources stats
{{wikistats>type = medias}}
To display all stats (including namspaces and tags (if tag plugin is installed))
{{wikistats>type = all}}
> Note that the type parameter is mandatory
==== Whitelist/blacklist by namespace ====
By default plugin shows the stats of the entire wiki. To restrict the statistics
to a given namespace and its sub-namespaces you can specify its name
either directly or using ''ns'' parameter:
{{wikistats>foo & type = pages}}
{{wikistats>ns = foo & type = pages}}
The ''ns'' parameter supports both inclusion and exclusion of the namespaces.
If a namespace name starts with a minus sign that namespace will be excluded.
Also you can assign a number of namespaces as a comma separated list:
{{wikistats>ns = -foo & type = pages}}
{{wikistats>ns = foo, bar, -bar:baz & type = pages}}
The first example will show the pages stats in all namespaces except of “foo”,
the second one will include “foo” and “bar” namespaces except of “bar:baz”
sub-namespace.
> Note that namespaces restrictions are not supported for tags and namespaces stats
==== Multiple parameters syntax ====
If you want to pass a number of parameters to the plugin they should be
separated with an ampersand (''&''), for example:
{{wikistats>ns = -foo & type = pages}}
The above syntax would display pages stats for the entire wiki except for
the “foo” namespace.
===== Development =====
==== Git repository ====
A public git repository is available [[https://github.com/4x4-chris/wikistats|here]] FIXME
==== Bugs and features request ====
Please report issues in the [[https://github.com/4x4-chris/wikistats/issues|bug tracker]] FIXME
==== Languages ====
* English
* French
* Spanish
* German
==== ToDo / Wish list ====
* Add bargraph display
* Allow configuration of bar color
* Support namespaces restrictions for tags stats
* Handle namespaces with medias and without pages as an error (could be configured)
* Color for namespace errors could be configured
* Add Docker support for development environnement
* Add total for resources and namespaces stats
==== Changelog ====
FIXME
The ten most recent changes:
{{rss>https://github.com/4x4-chris/wikistats/commits/master.atom date author}}
A full list can be [[https://github.com/4x4-chris/wikistats/commits|found on Github]] FIXME
==== Releases ====
* 2017-06-29
* Add TOC support
* TOC display could be desactivated in plugin administration
* 2017-06-28
* **2017-06-28 release**
* 2017-06-27
* Add option to change render style
* Add resources types translations
* Namespace stats now show medias counts
* Update General Informations and Installation instructions
* Plugin now display stats even if Tag plugin is not installed
* Namespaces are sorted in ascending alphabetical order
* Code refactoring
* 2017-06-22
* Add stats icon to wiki template
* 2017-06-20
* **Initial release**
===== FAQ =====
None actually.
===== Discussion =====