This page (revision-1) was last changed on 2019-12-18 09:13 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 27 lines
Almost contrary to its name, the __MostPopularPlugin__, another [NeWikiPlugin], is not the staking any claim as the most popular plugin, instead it provides a list of the most popular pages (ranked by hit count) on the wiki.
This plugin relies on the JSPWiki events API.
Most of the plugin's work is done by the {{MostPopularListener}} class, which listens for and counts {{WikiPageEvent.PAGE_DELIVERED}} events, and also manages the serialization and deserialization of its page cache between sessions. The listener is a singleton-per-WikiEngine.
!! Parameters
* __max__ = '''all''' or a number (optional) Limits the number of ranked pages to the provided number. If the value is "all" the entire wiki will be listed. No parameter (the default) will list only the top ten.
* __exclude__ = '''WikiPage1 WikiPage2''' Will exclude a whitespace- or comma-delimited list of pages from the output list.
* __showdate__ = '''true''' | '''false''' | '''format''' If 'true', includes the creation date of the cache (i.e., when the count began). If provided as a format string, the accepted values are (case insensitive): 'short', 'medium', 'long', or 'full'. The default (for 'true') is the short format (these match the formats described in java.text.DateFormat). Alternately, the format can be specified as any of the int values in DateFormat, but because these aren't meant to be public values, there's a risk they could change depending on Java version.
* __showcount__ = '''true''' | '''false''' If true, includes the hit count for the page.
* __debug__ = '''true''' | '''false''' If true, outputs more verbose messages.
!! To Do
* Could use the QueryPlugin to create the page exclusion list.
* Could use the PluginTextUtil to provide options on the output format (seems a bit like overkill though).
!! Test
{{{
[{MostPopular max='5'}]
}}}
[{MostPopular max='5'}]