Extension:Simple Article Count
From MediaWiki.org
|
Simple Article Count Release status: stable |
|
|---|---|
| Description | Displays the article count ({{NUMBEROFARTICLES}}) at the bottom of every page. Requires skin hacking (and thus, core hacking). |
| Author(s) | Max Lee (zedomaxTalk) |
| Last Version | 0.1 |
| MediaWiki | 1.11.0 |
| License | No license specified |
| Download | Download Count.php |
Contents |
[edit] What can this extension do?
This is a simple article count extension that you can place anywhere on your skin template by adding the following piece of code:
<?php wfRunHooks('count'); ?>
I made it so I can put it anywhere on my template outside the editing area or the main content area.
You can put it on your header or whatever.
You can do this in your content like this:
{{NUMBEROFARTICLES}}
But that's if you want it inside your content.
If you want it to show up everywhere, you will need something like this.
[edit] Usage
You get a nice message like, "1000 articles and counting...".
You can change the message simply by changing the text.
[edit] Download instructions
Please cut and paste the code found below and place it in $IP/extensions/SimpleArticleCount/Count.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.
[edit] Installation
To install this extension, add the following to LocalSettings.php:
require_once("$IP/extensions/SimpleArticleCount/Count.php");
[edit] Code
<?php /** * Simple Article Count extension * * @author Max Lee * @version 0.1 * @link http://www.mediawiki.org/wiki/Extension:Simple_Article_Count */ //Extension credits that show up on Special:Version $wgExtensionCredits['other'][] = array( 'name' => 'Simple Article Count', 'author' => 'Max Lee', 'url' => 'http://www.mediawiki.org/wiki/Extension:Simple_Article_Count', 'version' => '0.1', 'description' => 'Simple Article Count extension for MediaWiki', ); $wgHooks['count'][] = 'wfCount'; function wfCount() { global $wgOut; $out = $wgOut->parse("{{NUMBEROFARTICLES}} articles and counting..."); echo $out; return true; }
[edit] See also
You can find the sources and other extensions at Zedomax.com Wiki or on my user page.
[edit] Sites using this plugin
- SiteHoppin.com - A wiki based web 2.5 social networking system in development.

