Last modified: 2014-02-12 23:40:03 UTC
Would it be possible to have subdomain-specific article count variables? Something along the lines of {{en:NUMBEROFARTICLES}}, or {{NUMBEROFARTICLES{{1}}}}, where a language code could be entered as a parameter? It would be a bonus if the user could specify a level of precision to which the number could be rounded. This would be very useful on the www.wikipedia.org portal, and probably several other Meta and Foundation pages which are currently manually updated and always behind.
*** Bug 1564 has been marked as a duplicate of this bug. ***
For the Wikipedia portal, it would be more helpful to use the level of precision to truncate the article count, rather than to round it. Also, Catherine's second syntax proposal might be better written {{NUMBEROFARTICLES|{{1}}}} (with a pipe in there).
It's really difficult to integrate, as the databases are distinct, and there's no SQL setup configured in all projects to reach the statistics tables of each project. The only thing that exists is a table that maps projet codes or interwiki prefixes to URLs. What would be needed is that every project generate their own basic statistic dumps into a common statistics database which could be reached from all projects. But they would need to refresh those dumps regularly to this extra database. Having them updating instantly a centralization database would have a serious performance impact on all wiki projects due to the extra synchronization needed. But may be it could be a background thread that runs periodically to update the external database. Such background database update task could be used to export other things, like the list of blocked vandals or spammers, and to automatically import from every project. But is it needed in the MediaWiki software itself? Can't that be performed by a bot? How many projects such bot will need to update? and with which frequency (don't forget that each bot update will add to the history of each project, so it could generate rapidly huge volums of transactions if it runs on all current 229 projects)? So may be an extra connection to a central statistics database, running as a thread of the MediaWiki server will be better, avoiding too many update transactions into lots of projects, and unnecessary logs into an article for the imported data.
A bot is probably actually the best solution for this (there weren't many around when I first proposed this). The stats don't need to be kept in a database, really -- any wiki page would do. On poking around, it looks like User:Mutante was working on a script to do this as of March -- see http://meta.wikimedia.org/wiki/User:Mutante/Wikistats and http://wikiindex.com/User:Mutante for details.
*** Bug 7911 has been marked as a duplicate of this bug. ***
This function exists in template:NUMBEROF (http://en.wikipedia.org/wiki/Template:NUMBEROF) which is updated trough bot.
[mass-moving wikistats reports from Wikimedia→Statistics to Analytics→Wikistats to have stats issues under one Bugzilla product (see bug 42088) - sorry for the bugspam!]