Extension:PrefStats
|
PrefStats Release status: beta |
|||
|---|---|---|---|
| Description | Give statistics on user preferences about this extension | ||
| Author(s) | Trevor Parscal, Roan Kattouw | ||
| Last version | 0.2.0 | ||
| MediaWiki | 1.16+ | ||
| Database changes | yes | ||
| License | GPL v2 | ||
| Download |
Download snapshot (Git master)
Git [?]: repo summary • tree • code changes SVN [?]: checkout-url • tree • code changes README |
||
| Example | Special:PrefStats | ||
|
|||
|
|||
|
|||
|
Check usage (experimental) |
|||
PrefStats extension collects and displays statistics for when users have started/ended using certain options. The extension adds a special page, Special:PrefStats, that shows a chart and some statistics about tracked preferences.
It was developed specifically to be run as part of the Beta rollout on Wikimedia wikis; it may or may not be useful to third-party users. The extension can of course be run on non-WMF wikis, but documentation is still very limited.
[edit] Transitioning from UsabilityInitiative
If you are upgrading from the UsabilityInitiative (MediaWiki 1.16 compatible) version, you may need to pay attention to the change in naming for configuration variables. See README for an example.
[edit] Installation
- Get the extension with distributor or SVN and drop it into MediaWiki directory /extensions
- Setup your LocalSettings.php as explained in README file.
- Run update.php to create the prefstats table or manually apply patches/PrefStats.sql against your wiki's database
- Run the populatePrefStats.php maintenance script to populate the prefstats table.
[edit] Parameters
| Variable name | Default value | Description |
|---|---|---|
| $wgPrefStatsEnable | true | Set to false to disable tracking |
| $wgPrefStatsTrackPrefs | array() | Array of preferences to track. Format is: 'prefname' => 'value'. Value can't be the default value and tracking multiple values of the same preference is not possible. You must set this for the extension to do anything! |
| $wgPrefStatsChartDimensions | array( 800, 300 ) | Dimensions of the chart on Special:PrefStats |
| $wgPrefStatsTimeUnit | 60 * 60 (one hour) | Time unit to use for the graph on Special:PrefStats. Don't change this unless you know what you're doing. |
| $wgPrefStatsTimeFactors |
array(
'prefstats-factor-hour' => 1,
'prefstats-factor-sixhours' => 6,
'prefstats-factor-day' => 24,
'prefstats-factor-week' => 7*24,
'prefstats-factor-twoweeks' => 2*7*24,
'prefstats-factor-fourweeks' => 4*7*24,
'prefstats-factor-default' => null,
)
|
Multiples of $wgPrefStatsTimeUnit to offer -- array( messagekey => factor ) |
| $wgPrefStatsDefaultScaleBars | 15 | How many bars to strive for in default scaling |
| $wgPrefStatsExpensiveCounts | false | Whether to run possibly expensive COUNT(*) queries on the user_properties table |
| $wgPrefStatsCacheTime | 60 * 60 (one hour) | For how long statistics should be cached; set to false to disable caching. |
|
|
This extension is being used on one or more of Wikimedia's wikis. This means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |