r96469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96468‎ | r96469 | r96470 >
Date:18:59, 7 September 2011
Author:ashley
Status:deferred
Tags:
Comment:
new extension that displays statistics about social tools
Modified paths:
  • /trunk/extensions/SiteMetrics (added) (history)
  • /trunk/extensions/SiteMetrics/SiteMetrics.css (added) (history)
  • /trunk/extensions/SiteMetrics/SiteMetrics.i18n.php (added) (history)
  • /trunk/extensions/SiteMetrics/SiteMetrics.php (added) (history)
  • /trunk/extensions/SiteMetrics/SpecialSiteMetrics.php (added) (history)

Diff [purge]

Index: trunk/extensions/SiteMetrics/SiteMetrics.i18n.php
@@ -0,0 +1,434 @@
 2+<?php
 3+/**
 4+ * Internationalization file for SiteMetrics extension.
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+$messages = array();
 11+
 12+/** English
 13+ * @author Aaron Wright <aaron.wright@gmail.com>
 14+ * @author David Pean <david.pean@gmail.com>
 15+ * @author Jack Phoenix <jack@countervandalism.net>
 16+ */
 17+$messages['en'] = array(
 18+ 'sitemetrics' => 'Site Metrics',
 19+ 'sitemetrics-anon-edits' => 'Anonymous Edits',
 20+ 'sitemetrics-anon-edits-day' => 'Anonymous Edits By Day',
 21+ 'sitemetrics-anon-edits-month' => 'Anonymous Edits By Month',
 22+ 'sitemetrics-avatars' => 'Avatar Uploads',
 23+ 'sitemetrics-avatars-day' => 'Avatar Uploads By Day',
 24+ 'sitemetrics-avatars-month' => 'Avatar Uploads By Month',
 25+ 'sitemetrics-awards' => 'Awards',
 26+ 'sitemetrics-awards-day' => 'Awards By Day',
 27+ 'sitemetrics-awards-month' => 'Awards By Month',
 28+ 'sitemetrics-blog-stats-header' => 'Blog and Voting Statistics',
 29+ 'sitemetrics-casual-game-stats' => 'Casual Game Statistics',
 30+ 'sitemetrics-comments' => 'Comments',
 31+ 'sitemetrics-comments-day' => 'Comments By Day',
 32+ 'sitemetrics-comments-month' => 'Comments By Month',
 33+ 'sitemetrics-contact-imports' => 'Contact Imports',
 34+ 'sitemetrics-contact-invites-day' => 'Contact Invites By Day',
 35+ 'sitemetrics-contact-invites-month' => 'Contact Invites By Month',
 36+ 'sitemetrics-content-header' => 'Editing and Content Statistics',
 37+ 'sitemetrics-count' => 'Count',
 38+ 'sitemetrics-date' => 'Date',
 39+ 'sitemetrics-difference' => 'Difference',
 40+ 'sitemetrics-edits' => 'Edits',
 41+ 'sitemetrics-foeships' => 'Foeships',
 42+ 'sitemetrics-foeships-day' => 'Foeships by Day',
 43+ 'sitemetrics-foeships-month' => 'Foeships By Month',
 44+ 'sitemetrics-friendships' => 'Friendships',
 45+ 'sitemetrics-friendships-day' => 'Friendships by Day',
 46+ 'sitemetrics-friendships-month' => 'Friendships by Month',
 47+ 'sitemetrics-gifts' => 'Gifts',
 48+ 'sitemetrics-gifts-day' => 'Gifts by Day',
 49+ 'sitemetrics-gifts-month' => 'Gifts by Month',
 50+ //'sitemetrics-greater-5-edits' => 'Users Greater Than 5 Edits',
 51+ //'sitemetrics-greater-100-edits' => 'Users Greater Than 100 Edits',
 52+ 'sitemetrics-honorifics' => 'Honorific Advancements',
 53+ 'sitemetrics-honorifics-day' => 'Honorific Advancements By Day',
 54+ 'sitemetrics-honorifics-month' => 'Honorific Advancements By Month',
 55+ 'sitemetrics-images' => 'Images',
 56+ 'sitemetrics-images-day' => 'Images by Day',
 57+ 'sitemetrics-images-month' => 'Images By Month',
 58+ 'sitemetrics-invites' => 'Invitations To Read Blog Page',
 59+ 'sitemetrics-invites-day' => 'Invitations to Read Blog Page By Day',
 60+ 'sitemetrics-invites-month' => 'Invitations to Read Blog Page By Month',
 61+ 'sitemetrics-main-ns' => 'Main Namespace Edits',
 62+ 'sitemetrics-main-ns-edits-day' => 'Main Namespace Edits By Day',
 63+ 'sitemetrics-main-ns-edits-month' => 'Main Namespace Edits By Month',
 64+ 'sitemetrics-new-articles' => 'New Main Namespace Articles',
 65+ 'sitemetrics-new-articles-day' => 'New Main Namespace Articles By Day',
 66+ 'sitemetrics-new-articles-month' => 'New Main Namespace Articles By Month',
 67+ 'sitemetrics-new-blogs' => 'New Blog Pages',
 68+ 'sitemetrics-new-blogs-day' => 'New Blog Pages By Day',
 69+ 'sitemetrics-new-blogs-month' => 'New Blog Pages By Month',
 70+ 'sitemetrics-new-users' => 'New Users',
 71+ 'sitemetrics-new-users-day' => 'New Users By Day',
 72+ 'sitemetrics-new-users-month' => 'New Users By Month',
 73+ 'sitemetrics-picgames-created' => 'Picture Games Created',
 74+ 'sitemetrics-picgames-created-day' => 'Picture Games Created By Day',
 75+ 'sitemetrics-picgames-created-month' => 'Picture Games Created By Month',
 76+ 'sitemetrics-picgames-taken' => 'Picture Games Taken',
 77+ 'sitemetrics-picgames-taken-day' => 'Picture Games Taken By Day',
 78+ 'sitemetrics-picgames-taken-month' => 'Picture Games Taken By Month',
 79+ 'sitemetrics-point-stats-header' => 'Point and Award Statistics',
 80+ 'sitemetrics-polls-created' => 'Polls Created',
 81+ 'sitemetrics-polls-created-day' => 'Polls Created By Day',
 82+ 'sitemetrics-polls-created-month' => 'Polls Created By Month',
 83+ 'sitemetrics-polls-taken' => 'Polls Taken',
 84+ 'sitemetrics-polls-taken-day' => 'Polls Taken By Day',
 85+ 'sitemetrics-polls-taken-month' => 'Polls Taken By Month',
 86+ 'sitemetrics-profile-updates' => 'Profile Updates',
 87+ 'sitemetrics-profile-updates-day' => 'Profile Updates By Day',
 88+ 'sitemetrics-profile-updates-month' => 'Profile Updates By Month',
 89+ 'sitemetrics-quizzes-created' => 'Quizzes Created',
 90+ 'sitemetrics-quizzes-created-day' => 'Quiz Questions Created By Day',
 91+ 'sitemetrics-quizzes-created-month' => 'Quiz Questions Created By Month',
 92+ 'sitemetrics-quizzes-taken' => 'Quizzes Taken',
 93+ 'sitemetrics-quizzes-taken-day' => 'Quizzes Taken By Day',
 94+ 'sitemetrics-quizzes-taken-month' => 'Quizzes Taken By Month',
 95+ 'sitemetrics-talk-messages' => 'User Talk Messages',
 96+ 'sitemetrics-talk-messages-day' => 'User Talk Messages By Day',
 97+ 'sitemetrics-talk-messages-month' => 'User Talk Messages By Month',
 98+ 'sitemetrics-title' => 'Site Metrics - $1',
 99+ 'sitemetrics-total-edits-day' => 'Total Edits By Day',
 100+ 'sitemetrics-total-edits-month' => 'Total Edits By Month',
 101+ 'sitemetrics-user-page-edits' => 'User Page Edits',
 102+ 'sitemetrics-user-page-edits-day' => 'User Page Edits By Day',
 103+ 'sitemetrics-user-page-edits-month' => 'User Page Edits By Month',
 104+ 'sitemetrics-user-recruits' => 'User Recruits',
 105+ 'sitemetrics-user-recruits-day' => 'User Recruits By Day',
 106+ 'sitemetrics-user-recruits-month' => 'User Recruits By Month',
 107+ 'sitemetrics-user-social-header' => 'User and Social Statistics',
 108+ 'sitemetrics-video' => 'Video',
 109+ 'sitemetrics-video-day' => 'Video By Day',
 110+ 'sitemetrics-video-month' => 'Video By Month',
 111+ 'sitemetrics-viral-stats' => 'Viral Statistics',
 112+ 'sitemetrics-votes' => 'Votes and Ratings',
 113+ 'sitemetrics-votes-day' => 'Votes and Ratings By Day',
 114+ 'sitemetrics-votes-month' => 'Votes and Ratings By Month',
 115+ 'sitemetrics-wall-messages' => 'Wall Messages',
 116+ 'sitemetrics-wall-messages-day' => 'Wall Messages by Day',
 117+ 'sitemetrics-wall-messages-month' => 'Wall Messages by Month',
 118+ 'right-metricsview' => 'View statistics about social tools',
 119+);
 120+
 121+/** Finnish (Suomi)
 122+ * @author Jack Phoenix <jack@countervandalism.net>
 123+ */
 124+$messages['fi'] = array(
 125+ 'sitemetrics' => 'Sivuston vertailuluvut',
 126+ 'sitemetrics-anon-edits' => 'Anonyymit muokkaukset',
 127+ 'sitemetrics-anon-edits-day' => 'Anonyymit muokkaukset päivää kohden',
 128+ 'sitemetrics-anon-edits-month' => 'Anonyymit muokkaukset kuukautta kohden',
 129+ 'sitemetrics-avatars' => 'Avatarien tallennukset',
 130+ 'sitemetrics-avatars-day' => 'Avatarien tallennukset päivää kohden',
 131+ 'sitemetrics-avatars-month' => 'Avatarien tallennukset kuukautta kohden',
 132+ 'sitemetrics-awards' => 'Palkinnot',
 133+ 'sitemetrics-awards-day' => 'Palkinnot päivää kohden',
 134+ 'sitemetrics-awards-month' => 'Palkinnot kuukautta kohden',
 135+ 'sitemetrics-blog-stats-header' => 'Blogi- ja äänestystilastot',
 136+ 'sitemetrics-casual-game-stats' => 'Rentojen pelien tilastot', // this sucks, I know
 137+ 'sitemetrics-comments' => 'Kommentit',
 138+ 'sitemetrics-comments-day' => 'Kommentit päivää kohden',
 139+ 'sitemetrics-comments-month' => 'Kommentit kuukautta kohden',
 140+ 'sitemetrics-contact-imports' => 'Yhteystietojen tuonnit',
 141+ 'sitemetrics-contact-invites-day' => 'Yhteystietojen tuonnit päivää kohden',
 142+ 'sitemetrics-contact-invites-month' => 'Yhteystietojen tuonnit kuukautta kohden',
 143+ 'sitemetrics-content-header' => 'Muokkaus- ja sisältötilastot',
 144+ 'sitemetrics-count' => 'Lukumäärä',
 145+ 'sitemetrics-date' => 'Päiväys',
 146+ 'sitemetrics-difference' => 'Ero',
 147+ 'sitemetrics-edits' => 'Muokkauksia',
 148+ 'sitemetrics-foeships' => 'Vihollissuhteet',
 149+ 'sitemetrics-foeships-day' => 'Vihollissuhteet päivää kohden',
 150+ 'sitemetrics-foeships-month' => 'Vihollissuhteet kuukautta kohden',
 151+ 'sitemetrics-friendships' => 'Ystävyyssuhteet',
 152+ 'sitemetrics-friendships-day' => 'Ystävyyssuhteet päivää kohden',
 153+ 'sitemetrics-friendships-month' => 'Ystävyyssuhteet kuukautta kohden',
 154+ 'sitemetrics-gifts' => 'Lahjat',
 155+ 'sitemetrics-gifts-day' => 'Lahjat päivää kohden',
 156+ 'sitemetrics-gifts-month' => 'Lahjat kuukautta kohden',
 157+ //'sitemetrics-greater-5-edits' => 'Käyttäjät, joilla on enemmän kuin 5 muokkausta',
 158+ //'sitemetrics-greater-100-edits' => 'Käyttäjät, joilla on enemmän kuin 100 muokkausta',
 159+ #'sitemetrics-honorifics' => 'Honorific Advancements',
 160+ #'sitemetrics-honorifics-day' => 'Honorific Advancements päivää kohden',
 161+ #'sitemetrics-honorifics-month' => 'Honorific Advancements kuukautta kohden',
 162+ 'sitemetrics-images' => 'Kuvat',
 163+ 'sitemetrics-images-day' => 'Kuvat päivää kohden',
 164+ 'sitemetrics-images-month' => 'Kuvat kuukautta kohden',
 165+ 'sitemetrics-invites' => 'Kutsut blogisivun lukemiseen',
 166+ 'sitemetrics-invites-day' => 'Kutsut blogisivun lukemiseen päivää kohden',
 167+ 'sitemetrics-invites-month' => 'Kutsut blogisivun lukemiseen kuukautta kohden',
 168+ 'sitemetrics-main-ns' => 'Päänimiavaruuden muokkaukset',
 169+ 'sitemetrics-main-ns-edits-day' => 'Päänimiavaruuden muokkaukset päivää kohden',
 170+ 'sitemetrics-main-ns-edits-month' => 'Päänimiavaruuden muokkaukset kuukautta kohden',
 171+ 'sitemetrics-new-articles' => 'Uudet päänimiavaruuden artikkelit',
 172+ 'sitemetrics-new-articles-day' => 'Uudet päänimiavaruuden artikkelit päivää kohden',
 173+ 'sitemetrics-new-articles-month' => 'Uudet päänimiavaruuden artikkelit kuukautta kohden',
 174+ 'sitemetrics-new-blogs' => 'Uudet blogisivut',
 175+ 'sitemetrics-new-blogs-day' => 'Uudet blogisivut päivää kohden',
 176+ 'sitemetrics-new-blogs-month' => 'Uudet blogisivut kuukautta kohden',
 177+ 'sitemetrics-new-users' => 'Uudet käyttäjät',
 178+ 'sitemetrics-new-users-day' => 'Uudet käyttäjät päivää kohden',
 179+ 'sitemetrics-new-users-month' => 'Uudet käyttäjät kuukautta kohden',
 180+ 'sitemetrics-picgames-created' => 'Luodut kuvapelit',
 181+ 'sitemetrics-picgames-created-day' => 'Luodut kuvapelit päivää kohden',
 182+ 'sitemetrics-picgames-created-month' => 'Luodut kuvapelit kuukautta kohden',
 183+ 'sitemetrics-picgames-taken' => 'Pelatut kuvapelit',
 184+ 'sitemetrics-picgames-taken-day' => 'Pelatut kuvapelit päivää kohden',
 185+ 'sitemetrics-picgames-taken-month' => 'Pelatut kuvapelit kuukautta kohden',
 186+ 'sitemetrics-point-stats-header' => 'Piste- ja palkintotilastot',
 187+ 'sitemetrics-polls-created' => 'Luodut äänestykset',
 188+ 'sitemetrics-polls-created-day' => 'Luodut äänestykset päivää kohden',
 189+ 'sitemetrics-polls-created-month' => 'Luodut äänestykset kuukautta kohden',
 190+ 'sitemetrics-polls-taken' => 'Pelatut äänestykset',
 191+ 'sitemetrics-polls-taken-day' => 'Pelatut äänestykset päivää kohden',
 192+ 'sitemetrics-polls-taken-month' => 'Pelatut äänestykset kuukautta kohden',
 193+ 'sitemetrics-profile-updates' => 'Profiilin päivitykset',
 194+ 'sitemetrics-profile-updates-day' => 'Profiilin päivitykset päivää kohden',
 195+ 'sitemetrics-profile-updates-month' => 'Profiilin päivitykset kuukautta kohden',
 196+ 'sitemetrics-quizzes-created' => 'Luodut tietovisat',
 197+ 'sitemetrics-quizzes-created-day' => 'Luodut tietovisakysymykset päivää kohden',
 198+ 'sitemetrics-quizzes-created-month' => 'Luodut tietovisakysymykset kuukautta kohden',
 199+ 'sitemetrics-quizzes-taken' => 'Pelatut tietovisat',
 200+ 'sitemetrics-quizzes-taken-day' => 'Pelatut tietovisat päivää kohden',
 201+ 'sitemetrics-quizzes-taken-month' => 'Pelatut tietovisat kuukautta kohden',
 202+ 'sitemetrics-talk-messages' => 'Käyttäjän keskustelusivun viestit',
 203+ 'sitemetrics-talk-messages-day' => 'Käyttäjän keskustelusivun viestit päivää kohden',
 204+ 'sitemetrics-talk-messages-month' => 'Käyttäjän keskustelusivun viestit kuukautta kohden',
 205+ 'sitemetrics-title' => 'Sivuston vertailuluvut - $1',
 206+ 'sitemetrics-total-edits-day' => 'Muokkauksia yhteensä päivää kohden',
 207+ 'sitemetrics-total-edits-month' => 'Muokkauksia yhteensä kuukautta kohden',
 208+ 'sitemetrics-user-page-edits' => 'Käyttäjäsivun muokkaukset',
 209+ 'sitemetrics-user-page-edits-day' => 'Käyttäjäsivun muokkaukset päivää kohden',
 210+ 'sitemetrics-user-page-edits-month' => 'Käyttäjäsivun muokkaukset kuukautta kohden',
 211+ 'sitemetrics-user-recruits' => 'Käyttäjien värväykset',
 212+ 'sitemetrics-user-recruits-day' => 'Käyttäjien värväykset päivää kohden',
 213+ 'sitemetrics-user-recruits-month' => 'Käyttäjien värväykset kuukautta kohden',
 214+ 'sitemetrics-user-social-header' => 'Käyttäjätilastot ja sosiaaliset tilastot',
 215+ 'sitemetrics-video' => 'Videot',
 216+ 'sitemetrics-video-day' => 'Videot päivää kohden',
 217+ 'sitemetrics-video-month' => 'Videot kuukautta kohden',
 218+ #'sitemetrics-viral-stats' => 'Viral Statistics',
 219+ 'sitemetrics-votes' => 'Äänestykset ja arvostelut',
 220+ 'sitemetrics-votes-day' => 'Äänestykset ja arvostelut päivää kohden',
 221+ 'sitemetrics-votes-month' => 'Äänestykset ja arvostelut kuukautta kohden',
 222+ 'sitemetrics-wall-messages' => 'Seinäviestit',
 223+ 'sitemetrics-wall-messages-day' => 'Seinäviestit päivää kohden',
 224+ 'sitemetrics-wall-messages-month' => 'Seinäviestit kuukautta kohden',
 225+ 'right-metricsview' => 'Katsoa tilastoja sosiaalisista työkaluista',
 226+);
 227+
 228+/** Français (French)
 229+ * @author Jack Phoenix <jack@countervandalism.net>
 230+ */
 231+$messages['fr'] = array(
 232+ 'sitemetrics' => 'Métriques du site',
 233+ 'sitemetrics-anon-edits' => 'Modifications anonyme',
 234+ 'sitemetrics-anon-edits-day' => 'Modifications anonyme par jour',
 235+ 'sitemetrics-anon-edits-month' => 'Modifications anonyme par mois',
 236+ 'sitemetrics-avatars' => 'Importations avatar',
 237+ 'sitemetrics-avatars-day' => 'Importations avatar par jour',
 238+ 'sitemetrics-avatars-month' => 'Importations avatar par mois',
 239+ 'sitemetrics-awards' => 'Prix',
 240+ 'sitemetrics-awards-day' => 'Prix par jour',
 241+ 'sitemetrics-awards-month' => 'Prix par mois',
 242+ 'sitemetrics-blog-stats-header' => 'Statistiques de blog et vote',
 243+ 'sitemetrics-casual-game-stats' => 'Statistiques de jeux désinvoltes',
 244+ 'sitemetrics-comments' => 'Commentaires',
 245+ 'sitemetrics-comments-day' => 'Commentaires par jour',
 246+ 'sitemetrics-comments-month' => 'Commentaires par mois',
 247+ 'sitemetrics-content-header' => 'Statistiques de modification et teneur',
 248+ 'sitemetrics-count' => 'Compte',
 249+ 'sitemetrics-date' => 'Date',
 250+ 'sitemetrics-difference' => 'Différence',
 251+ 'sitemetrics-edits' => 'Modifications',
 252+ 'sitemetrics-foeships' => 'Hostilités',
 253+ 'sitemetrics-foeships-day' => 'Hostilités par jour',
 254+ 'sitemetrics-foeships-month' => 'Hostilités par mois',
 255+ 'sitemetrics-friendships' => 'Amitiés',
 256+ 'sitemetrics-friendships-day' => 'Amitiés par jour',
 257+ 'sitemetrics-friendships-month' => 'Amitiés par mois',
 258+ 'sitemetrics-gifts' => 'Cadeaux',
 259+ 'sitemetrics-gifts-day' => 'Cadeaux par jour',
 260+ 'sitemetrics-gifts-month' => 'Cadeaux par mois',
 261+ 'sitemetrics-honorifics' => 'Les avancements honorifique',
 262+ 'sitemetrics-honorifics-day' => 'Les avancements honorifique par jour',
 263+ 'sitemetrics-honorifics-month' => 'Les avancements honorifique par mois',
 264+ 'sitemetrics-images' => 'Images',
 265+ 'sitemetrics-images-day' => 'Images par jour',
 266+ 'sitemetrics-images-month' => 'Images par mois',
 267+ 'sitemetrics-invites' => 'Invitations pour lire un page blog',
 268+ 'sitemetrics-invites-day' => 'Invitations pour lire un page blog par jour',
 269+ 'sitemetrics-invites-month' => 'Invitations pour lire un page blog par mois',
 270+ 'sitemetrics-main-ns' => 'Modifications de l’espace de noms principal',
 271+ 'sitemetrics-main-ns-edits-day' => 'Modifications de l’espace de noms principal par jour',
 272+ 'sitemetrics-main-ns-edits-month' => 'Modifications de l’espace de noms principal par mois',
 273+ 'sitemetrics-new-articles' => 'Nouveaux articles dans l’espace de noms principal',
 274+ 'sitemetrics-new-articles-day' => 'Nouveaux articles dans l’espace de noms principal par jour',
 275+ 'sitemetrics-new-articles-month' => 'Nouveaux articles dans l’espace de noms principal par mois',
 276+ 'sitemetrics-new-blogs' => 'Nouvelles pages blog',
 277+ 'sitemetrics-new-blogs-day' => 'Nouvelles pages blog par jour',
 278+ 'sitemetrics-new-blogs-month' => 'Nouvelles pages blog par mois',
 279+ 'sitemetrics-new-users' => 'Nouveaux utilisateurs',
 280+ 'sitemetrics-new-users-day' => 'Nouveaux utilisateurs par jour',
 281+ 'sitemetrics-new-users-month' => 'Nouveaux utilisateurs par mois',
 282+ 'sitemetrics-picgames-created' => 'Jeux d’images créé',
 283+ 'sitemetrics-picgames-created-day' => 'Jeux d’images créé par jour',
 284+ 'sitemetrics-picgames-created-month' => 'Jeux d’images créé par mois',
 285+ 'sitemetrics-picgames-taken' => 'Jeux d’images effectués',
 286+ 'sitemetrics-picgames-taken-day' => 'Jeux d’images effectués par jour',
 287+ 'sitemetrics-picgames-taken-month' => 'Jeux d’images effectués par mois',
 288+ 'sitemetrics-point-stats-header' => 'Statistiques point et prix',
 289+ 'sitemetrics-polls-created' => 'Sondages créé',
 290+ 'sitemetrics-polls-created-day' => 'Sondages créé par jour',
 291+ 'sitemetrics-polls-created-month' => 'Sondages créé par mois',
 292+ 'sitemetrics-polls-taken' => 'Sondages effectués',
 293+ 'sitemetrics-polls-taken-day' => 'Sondages effectués par jour',
 294+ 'sitemetrics-polls-taken-month' => 'Sondages effectués par mois',
 295+ 'sitemetrics-profile-updates' => 'Mises à jour des profils',
 296+ 'sitemetrics-profile-updates-day' => 'Mises à jour des profils par jour',
 297+ 'sitemetrics-profile-updates-month' => 'Mises à jour des profils par mois',
 298+ 'sitemetrics-quizzes-created' => 'Quiz créé',
 299+ 'sitemetrics-quizzes-created-day' => 'Questions quiz créé par jour',
 300+ 'sitemetrics-quizzes-created-month' => 'Questions quiz créé par mois',
 301+ 'sitemetrics-quizzes-taken' => 'Quiz effectués',
 302+ 'sitemetrics-quizzes-taken-day' => 'Quiz effectués par jour',
 303+ 'sitemetrics-quizzes-taken-month' => 'Quiz effectués par mois',
 304+ 'sitemetrics-talk-messages' => 'Messages de discussion utilisateur',
 305+ 'sitemetrics-talk-messages-day' => 'Messages de discussion utilisateur par jour',
 306+ 'sitemetrics-talk-messages-month' => 'Messages de discussion utilisateur par mois',
 307+ 'sitemetrics-title' => 'Métriques du site - $1',
 308+ 'sitemetrics-total-edits-day' => 'Modifications totale par jour',
 309+ 'sitemetrics-total-edits-month' => 'Modifications totale par mois',
 310+ 'sitemetrics-user-page-edits' => 'Modifications de la page utilisateur',
 311+ 'sitemetrics-user-page-edits-day' => 'Modifications de la page utilisateur par jour',
 312+ 'sitemetrics-user-page-edits-month' => 'Modifications de la page utilisateur par mois',
 313+ 'sitemetrics-user-recruits' => 'Recrues utilisateur',
 314+ 'sitemetrics-user-recruits-day' => 'Recrues utilisateur par jour',
 315+ 'sitemetrics-user-recruits-month' => 'Recrues utilisateur par mois',
 316+ 'sitemetrics-user-social-header' => 'Statistiques utilisateur et social',
 317+ 'sitemetrics-video' => 'Vidéos',
 318+ 'sitemetrics-video-day' => 'Vidéos par jour',
 319+ 'sitemetrics-video-month' => 'Vidéos par mois',
 320+ 'sitemetrics-viral-stats' => 'Statistiques virale',
 321+ 'sitemetrics-votes' => 'Votes et classements',
 322+ 'sitemetrics-votes-day' => 'Votes et classements par jour',
 323+ 'sitemetrics-votes-month' => 'Votes et classements par mois',
 324+ 'sitemetrics-wall-messages' => 'Messages mur',
 325+ 'sitemetrics-wall-messages-day' => 'Messages mur par jour',
 326+ 'sitemetrics-wall-messages-month' => 'Messages mur par mois',
 327+ 'right-metricsview' => 'Voir les statistiques sur les outils social',
 328+);
 329+
 330+/** Dutch (Nederlands)
 331+ * @author Mitchel Corstjens
 332+ */
 333+$messages['nl'] = array(
 334+ 'sitemetrics' => 'Gedetailleerde statistieken van de site',
 335+ 'sitemetrics-anon-edits' => 'Anonieme bewerkingen',
 336+ 'sitemetrics-anon-edits-day' => 'Anonieme bewerkingen per dag',
 337+ 'sitemetrics-anon-edits-month' => 'Anonieme bewerkingen per maand',
 338+ 'sitemetrics-avatars' => 'Ge-uploaden avatars',
 339+ 'sitemetrics-avatars-day' => 'Avatar uploads per dag',
 340+ 'sitemetrics-avatars-month' => 'Avatar uploads per maand',
 341+ 'sitemetrics-awards' => 'Toegekende prijzen',
 342+ 'sitemetrics-awards-day' => 'Toegekende prijzen per dag',
 343+ 'sitemetrics-awards-month' => 'Toegekende prijzen per maand',
 344+ 'sitemetrics-blog-stats-header' => 'Blog en stem statistieken',
 345+ 'sitemetrics-casual-game-stats' => 'Spel statistieken',
 346+ 'sitemetrics-comments' => 'Commentaar',
 347+ 'sitemetrics-comments-day' => 'Commentaar per dag',
 348+ 'sitemetrics-comments-month' => 'Commentaar per maand',
 349+ 'sitemetrics-contact-imports' => 'Geïmporteerde contact personen',
 350+ 'sitemetrics-contact-invites-day' => 'Uitgenodigde contact personen per dag',
 351+ 'sitemetrics-contact-invites-month' => 'Uitgenodigde contact personen per maand',
 352+ 'sitemetrics-content-header' => 'Bewerking en inhoud statistieken',
 353+ 'sitemetrics-count' => 'Aantal',
 354+ 'sitemetrics-date' => 'Datum',
 355+ 'sitemetrics-difference' => 'Verschil',
 356+ 'sitemetrics-edits' => 'Bewerkingen',
 357+ 'sitemetrics-foeships' => 'Vijandschappen',
 358+ 'sitemetrics-foeships-day' => 'Vijandschappen per dag',
 359+ 'sitemetrics-foeships-month' => 'Vijandschappen per maand',
 360+ 'sitemetrics-friendships' => 'Vriendschappen',
 361+ 'sitemetrics-friendships-day' => 'Vriendschappen per dag',
 362+ 'sitemetrics-friendships-month' => 'Vriendschappen per maand',
 363+ 'sitemetrics-gifts' => 'Cadeaus',
 364+ 'sitemetrics-gifts-day' => 'Cadeaus per dag',
 365+ 'sitemetrics-gifts-month' => 'Cadeaus per maand',
 366+ //'sitemetrics-greater-5-edits' => 'Gebruikers met meer dan 5 bewerkingen',
 367+ //'sitemetrics-greater-100-edits' => 'Gebruikers met meer dan 100 bewerkingen',
 368+ 'sitemetrics-honorifics' => 'Promoties in rang',
 369+ 'sitemetrics-honorifics-day' => 'Promoties in rang per dag',
 370+ 'sitemetrics-honorifics-month' => 'Promoties in rang per maand',
 371+ 'sitemetrics-images' => 'Afbeeldingen',
 372+ 'sitemetrics-images-day' => 'Afbeeldingen per dag',
 373+ 'sitemetrics-images-month' => 'Afbeeldingen per maand',
 374+ 'sitemetrics-invites' => 'Uitnodigingen tot het lezen van weblog pagina\'s',
 375+ 'sitemetrics-invites-day' => 'Uitnodigingen tot het lezen van weblog pagina\'s per dag',
 376+ 'sitemetrics-invites-month' => 'Uitnodigingen tot het lezen van weblog pagina\'s per maand',
 377+ 'sitemetrics-main-ns' => 'Bewerkingen in de hoofd naamruimte',
 378+ 'sitemetrics-main-ns-edits-day' => 'Bewerkingen in de hoofd naamruimte per dag',
 379+ 'sitemetrics-main-ns-edits-month' => 'Bewerkingen in de hoofd naamruimte per maand',
 380+ 'sitemetrics-new-articles' => 'Nieuwe hoofd naamruimte pagina\'s',
 381+ 'sitemetrics-new-articles-day' => 'Nieuwe hoofd naamruimte pagina\'s per dag',
 382+ 'sitemetrics-new-articles-month' => 'Nieuwe hoofd naamruimte pagina\'s per maand',
 383+ 'sitemetrics-new-blogs' => 'Nieuwe weblog pagina\'s',
 384+ 'sitemetrics-new-blogs-day' => 'Nieuwe weblog pagina\'s per dag',
 385+ 'sitemetrics-new-blogs-month' => 'Nieuwe weblog pagina\'s per maand',
 386+ 'sitemetrics-new-users' => 'Nieuwe gebruikers',
 387+ 'sitemetrics-new-users-day' => 'Nieuwe gebruikers per dag',
 388+ 'sitemetrics-new-users-month' => 'Nieuwe gebruikers per maand',
 389+ 'sitemetrics-picgames-created' => 'Gecreëerde afbeelding spelletjes',
 390+ 'sitemetrics-picgames-created-day' => 'Gecreëerde afbeelding spelletjes per dag',
 391+ 'sitemetrics-picgames-created-month' => 'Gecreëerde afbeelding spelletjes per maand',
 392+ 'sitemetrics-picgames-taken' => 'Afbeelding spelletjes gespeeld',
 393+ 'sitemetrics-picgames-taken-day' => 'Afbeelding spelletjes gespeeld per dag',
 394+ 'sitemetrics-picgames-taken-month' => 'Afbeelding spelletjes gespeeld per maand',
 395+ 'sitemetrics-point-stats-header' => 'Punten en beloningen statistieken',
 396+ 'sitemetrics-polls-created' => 'Gecreëerde polls',
 397+ 'sitemetrics-polls-created-day' => 'Gecreëerde polls per dag',
 398+ 'sitemetrics-polls-created-month' => 'Gecreëerde polls per maand',
 399+ 'sitemetrics-polls-taken' => 'Uitgevoerde polls',
 400+ 'sitemetrics-polls-taken-day' => 'Uitgevoerde polls per dag',
 401+ 'sitemetrics-polls-taken-month' => 'Uitgevoerde polls per maand',
 402+ 'sitemetrics-profile-updates' => 'Profiel updates',
 403+ 'sitemetrics-profile-updates-day' => 'Profiel updates per dag',
 404+ 'sitemetrics-profile-updates-month' => 'Profiel updates per maand',
 405+ 'sitemetrics-quizzes-created' => 'Gecreëerde quizzen',
 406+ 'sitemetrics-quizzes-created-day' => 'Gecreëerde quiz vragen per dag',
 407+ 'sitemetrics-quizzes-created-month' => 'Gecreëerde quiz vragen per maand',
 408+ 'sitemetrics-quizzes-taken' => 'Uitgevoerde quizzen',
 409+ 'sitemetrics-quizzes-taken-day' => 'Uitgevoerde quizzen per dag',
 410+ 'sitemetrics-quizzes-taken-month' => 'Uitgevoerde quizzen per maand',
 411+ 'sitemetrics-talk-messages' => 'Gebruikers overleg berichten',
 412+ 'sitemetrics-talk-messages-day' => 'Gebruikers overleg berichten per dag',
 413+ 'sitemetrics-talk-messages-month' => 'Gebruikers overleg berichten per maand',
 414+ 'sitemetrics-title' => 'Gedetailleerde statistieken van de site - $1',
 415+ 'sitemetrics-total-edits-day' => 'Totale bewerkingen per dag',
 416+ 'sitemetrics-total-edits-month' => 'Totale bewerkingen per maand',
 417+ 'sitemetrics-user-page-edits' => 'Gebruikers pagina bewerkingen',
 418+ 'sitemetrics-user-page-edits-day' => 'Gebruikers pagina bewerkingen per dag',
 419+ 'sitemetrics-user-page-edits-month' => 'Gebruikers pagina bewerkingen per maand',
 420+ 'sitemetrics-user-recruits' => 'Gerekruteerde gebruikers',
 421+ 'sitemetrics-user-recruits-day' => 'Gerekruteerde gebruikers per dag',
 422+ 'sitemetrics-user-recruits-month' => 'Gerekruteerde gebruikers per maand',
 423+ 'sitemetrics-user-social-header' => 'Gebruiker en sociale statistieken',
 424+ 'sitemetrics-video' => 'Video',
 425+ 'sitemetrics-video-day' => 'Video\'s per dag',
 426+ 'sitemetrics-video-month' => 'Video\'s per maand',
 427+ //'sitemetrics-viral-stats' => 'Viral Statistics',
 428+ 'sitemetrics-votes' => 'Stemmen en classificaties',
 429+ 'sitemetrics-votes-day' => 'Stemmen en classificaties per dag',
 430+ 'sitemetrics-votes-month' => 'Stemmen en classificaties per dag',
 431+ 'sitemetrics-wall-messages' => 'Muur berichten',
 432+ 'sitemetrics-wall-messages-day' => 'Muur berichten per dag',
 433+ 'sitemetrics-wall-messages-month' => 'Muur berichten per maand',
 434+ 'right-metricsview' => 'Bekijk statistieken van de sociale instrumenten',
 435+);
\ No newline at end of file
Property changes on: trunk/extensions/SiteMetrics/SiteMetrics.i18n.php
___________________________________________________________________
Added: svn:eol-style
1436 + native
Index: trunk/extensions/SiteMetrics/SiteMetrics.php
@@ -0,0 +1,45 @@
 2+<?php
 3+/**
 4+ * SiteMetrics extension - displays statistics about social tools for
 5+ * privileged users.
 6+ *
 7+ * @file
 8+ * @ingroup Extensions
 9+ * @version 1.1
 10+ * @author Aaron Wright <aaron.wright@gmail.com>
 11+ * @author David Pean <david.pean@gmail.com>
 12+ * @author Jack Phoenix <jack@countervandalism.net>
 13+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
 14+ * @link http://www.mediawiki.org/wiki/Extensions:SiteMetrics Documentation
 15+ */
 16+
 17+if ( !defined( 'MEDIAWIKI' ) ) {
 18+ die();
 19+}
 20+
 21+// Extension credits that will show up on Special:Version
 22+$wgExtensionCredits['specialpage'][] = array(
 23+ 'name' => 'SiteMetrics',
 24+ 'version' => '1.1',
 25+ 'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
 26+ 'description' => '[[Special:SiteMetrics|Displays statistics about social tools]]',
 27+ 'url' => 'http://www.mediawiki.org/wiki/Extension:SiteMetrics',
 28+);
 29+
 30+// Set up the new special page
 31+$dir = dirname( __FILE__ ) . '/';
 32+$wgExtensionMessagesFiles['SiteMetrics'] = $dir . 'SiteMetrics.i18n.php';
 33+$wgAutoloadClasses['SiteMetrics'] = $dir . 'SpecialSiteMetrics.php';
 34+$wgSpecialPages['SiteMetrics'] = 'SiteMetrics';
 35+
 36+// New user right, required to use Special:SiteMetrics
 37+$wgAvailableRights[] = 'metricsview';
 38+$wgGroupPermissions['sysop']['metricsview'] = true;
 39+$wgGroupPermissions['staff']['metricsview'] = true;
 40+
 41+// ResourceLoader support for MediaWiki 1.17+
 42+$wgResourceModules['ext.siteMetrics'] = array(
 43+ 'styles' => 'SiteMetrics.css',
 44+ 'localBasePath' => dirname( __FILE__ ),
 45+ 'remoteExtPath' => 'SiteMetrics'
 46+);
\ No newline at end of file
Property changes on: trunk/extensions/SiteMetrics/SiteMetrics.php
___________________________________________________________________
Added: svn:eol-style
147 + native
Index: trunk/extensions/SiteMetrics/SiteMetrics.css
@@ -0,0 +1,52 @@
 2+/* CSS for SiteMetrics extension */
 3+.sm-navigation {
 4+ float: right;
 5+ background-color: #F2F4F7;
 6+ border: 1px solid #dcdcdc;
 7+ width: 180px;
 8+ padding: 5px 10px;
 9+ margin: 15px 0px 0px 10px;
 10+}
 11+
 12+.sm-navigation a {
 13+ display: block;
 14+ margin: 0px 0px 0px 0px;
 15+}
 16+
 17+.sm-navigation h2 {
 18+ color: #333;
 19+ font-size: 16px;
 20+ letter-spacing: -1px;
 21+ margin: 0px 0px 5px 0px !important;
 22+}
 23+
 24+.sm-content {
 25+ width: 75%;
 26+ margin: 5px 0px 0px 0px;
 27+}
 28+
 29+.sm-content h3 {
 30+ margin-bottom: 10px !important;
 31+}
 32+
 33+.sm-content table {
 34+ border-collapse: collapse !important;
 35+ border: 1px solid #dcdcdc;
 36+ margin: 10px 0px 10px 0px;
 37+}
 38+
 39+.sm-content td {
 40+ padding: 2px;
 41+}
 42+
 43+.smt-header {
 44+ font-weight: bold;
 45+ background-color: #F2F4F7;
 46+}
 47+
 48+.smt-table {
 49+ width: 400px;
 50+ padding: 0px;
 51+ border-spacing: 0px;
 52+ border: 1px;
 53+}
\ No newline at end of file
Property changes on: trunk/extensions/SiteMetrics/SiteMetrics.css
___________________________________________________________________
Added: svn:eol-style
154 + native
Index: trunk/extensions/SiteMetrics/SpecialSiteMetrics.php
@@ -0,0 +1,902 @@
 2+<?php
 3+/**
 4+ * A special page for tracking usage of different kinds of social features.
 5+ * @file
 6+ * @ingroup Extensions
 7+ */
 8+
 9+class SiteMetrics extends SpecialPage {
 10+
 11+ /**
 12+ * Constructor -- set up the new special page
 13+ */
 14+ public function __construct() {
 15+ parent::__construct( 'SiteMetrics', 'metricsview' );
 16+ }
 17+
 18+ function formatDate( $date ) {
 19+ $date_array = explode( ' ', $date );
 20+
 21+ $year = $date_array[0];
 22+ $month = $date_array[1];
 23+
 24+ $time = mktime( 0, 0, 0, $month, 1, '20' . $year );
 25+ return date( 'm', $time ) . '/' . date( 'y', $time );
 26+ }
 27+
 28+ function formatDateDay( $date ) {
 29+ $date_array = explode( ' ', $date );
 30+
 31+ $year = $date_array[0];
 32+ $month = $date_array[1];
 33+ $day = $date_array[2];
 34+
 35+ $time = mktime( 0, 0, 0, $month, $day, '20' . $year );
 36+ return date( 'm', $time ) . '/' . date( 'd', $time ) . '/' . date( 'y', $time );
 37+ }
 38+
 39+ function displayChart( $stats ) {
 40+ // reverse stats array so that chart outputs correctly
 41+ $reversed_stats = array_reverse( $stats );
 42+
 43+ // determine the maximum count
 44+ $max = 0;
 45+ for( $x = 0; $x <= count( $reversed_stats ) - 1; $x++ ) {
 46+ if ( $reversed_stats[$x]['count'] > $max ) {
 47+ $max = $reversed_stats[$x]['count'];
 48+ }
 49+ }
 50+
 51+ // Write Google Charts API script to generate graph
 52+ $output = "<script type=\"text/javascript\">
 53+
 54+ var simpleEncoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
 55+ var maxValue = '{$max}';
 56+ var valueArray = new Array(";
 57+
 58+ $first_date = '';
 59+ $last_date = '';
 60+ for( $x = 0; $x <= count( $reversed_stats ) - 1; $x++ ) {
 61+ // get first and last dates
 62+ if ( $x == 0 ) {
 63+ $first_date = $reversed_stats[$x]['date'];
 64+ }
 65+ if ( $x == count( $stats ) - 1 ) {
 66+ $last_date = $reversed_stats[$x]['date'];
 67+ }
 68+
 69+ // make value array for Charts API
 70+ $output .= $reversed_stats[$x]['count'];
 71+ if ( $x != count( $stats ) - 1 ) {
 72+ $output .= ',';
 73+ }
 74+ }
 75+
 76+ $output .= ");
 77+
 78+ function simpleEncode( valueArray, maxValue ) {
 79+ var chartData = ['s:'];
 80+ for ( var i = 0; i < valueArray.length; i++ ) {
 81+ var currentValue = valueArray[i];
 82+ if ( !isNaN( currentValue ) && currentValue >= 0 ) {
 83+ chartData.push( simpleEncoding.charAt( Math.round( ( simpleEncoding.length - 1 ) * currentValue / maxValue ) ) );
 84+ } else {
 85+ chartData.push('_');
 86+ }
 87+ }
 88+ return chartData.join('');
 89+ }
 90+
 91+ imgSrc = '<img src=\"http://chart.apis.google.com/chart?chs=400x200&amp;cht=lc&amp;chd='+simpleEncode(valueArray,maxValue)+'&amp;chco=ff0000&amp;chg=20,50,1,5&amp;chxt=x,y&amp;chxl=0:|{$first_date}|{$last_date}|1:||" . number_format( $max ) . "\"/>';
 92+
 93+ document.write( imgSrc );
 94+
 95+ </script>";
 96+
 97+ return $output;
 98+ }
 99+
 100+ /**
 101+ * @param $title Mixed: title - what kind of stats are we viewing?
 102+ * @param $res Object: ResultWrapper object
 103+ * @param $type String: 'day' for daily stats, 'month' for monthly stats.
 104+ */
 105+ function displayStats( $title, $res, $type ) {
 106+ $dbr = wfGetDB( DB_SLAVE );
 107+
 108+ // build stats array
 109+ $stats = array();
 110+ foreach ( $res as $row ) {
 111+ if ( $type == 'month' ) {
 112+ $stats[] = array(
 113+ 'date' => $this->formatDate( $row->the_date ),
 114+ 'count' => $row->the_count
 115+ );
 116+ } elseif ( $type == 'day' ) {
 117+ $stats[] = array(
 118+ 'date' => $this->formatDateDay( $row->the_date ),
 119+ 'count' => $row->the_count
 120+ );
 121+ }
 122+ }
 123+
 124+ $output = '';
 125+ $output .= "<h3>{$title}</h3>";
 126+
 127+ $output .= $this->displayChart( $stats );
 128+
 129+ $output .= '<table class="smt-table">
 130+ <tr class="smt-header">
 131+ <td>' . wfMsg( 'sitemetrics-date' ) . '</td>
 132+ <td>' . wfMsg( 'sitemetrics-count' ) . '</td>
 133+ <td>' . wfMsg( 'sitemetrics-difference' ) . '</td>
 134+ </tr>';
 135+
 136+ for ( $x = 0; $x <= count( $stats ) - 1; $x++ ) {
 137+ $diff = '';
 138+ if ( $x != count( $stats ) - 1 ) {
 139+ $diff = $stats[$x]['count'] - $stats[$x + 1]['count'];
 140+ if ( $diff > 0 ) {
 141+ $diff = "+{$diff}";
 142+ } else {
 143+ $diff = "{$diff}";
 144+ }
 145+ }
 146+ $output .= "<tr>
 147+ <td>{$stats[$x]['date']}</td>
 148+ <td>" . number_format( $stats[$x]['count'] ) . "</td>
 149+ <td>{$diff}</td>
 150+ </tr>";
 151+ }
 152+
 153+ $output .= '</table>';
 154+
 155+ return $output;
 156+ }
 157+
 158+ /**
 159+ * Show the special page
 160+ *
 161+ * @param $par Mixed: parameter passed to the page or null
 162+ */
 163+ public function execute( $par ) {
 164+ global $wgRequest, $wgScriptPath, $wgOut, $wgUser, $wgRegisterTrack;
 165+
 166+ // Check the the user is allowed to access this page
 167+ if ( !$wgUser->isAllowed( 'metricsview' ) ) {
 168+ $this->displayRestrictionError();
 169+ return;
 170+ }
 171+
 172+ // If user is blocked, s/he doesn't need to access this page
 173+ if ( $wgUser->isBlocked() ) {
 174+ $wgOut->blockedPage();
 175+ return;
 176+ }
 177+
 178+ $output = '';
 179+
 180+ // Add CSS
 181+ if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
 182+ $wgOut->addModuleStyles( 'ext.siteMetrics' );
 183+ } else {
 184+ $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SiteMetrics/SiteMetrics.css' );
 185+ }
 186+
 187+ $statistic = $wgRequest->getVal( 'stat' );
 188+ $pageTitle = ''; // page title, will be set later for each diff. query
 189+ // This is required to make Special:SiteMetrics/param work...
 190+ if( !isset( $statistic ) ) {
 191+ if ( $par ) {
 192+ $statistic = $par;
 193+ } else {
 194+ $statistic = 'Edits';
 195+ }
 196+ }
 197+ // An odd fix to make links like [[Special:SiteMetrics/Wall Messages]]
 198+ // work properly...
 199+ $statistic = str_replace( array( '_', '%20' ), ' ', $statistic );
 200+
 201+ $statLink = SpecialPage::getTitleFor( 'SiteMetrics' );
 202+
 203+ $dbr = wfGetDB( DB_SLAVE );
 204+
 205+ $output .= '<div class="sm-navigation">
 206+ <h2>' . wfMsg( 'sitemetrics-content-header' ) . '</h2>
 207+ <a href="' . $statLink->escapeFullURL( 'stat=Edits' ) . '">' . wfMsg( 'sitemetrics-edits' ) . '</a>
 208+ <a href="' . $statLink->escapeFullURL( 'stat=Main Namespace Edits' ) . '">' . wfMsg( 'sitemetrics-main-ns' ) . '</a>
 209+ <a href="' . $statLink->escapeFullURL( 'stat=New Main Namespace Articles' ) . '">' . wfMsg( 'sitemetrics-new-articles' ) . '</a>';
 210+ // On March 26, 2010: these stats don't seem to be existing and
 211+ // will only be confusing to end users, so I'm disabling them for now.
 212+ // <a href="' . $statLink->escapeFullURL( 'stat=Users Greater Than 5 Edits' ) . '">' . wfMsg( 'sitemetrics-greater-5-edits' ) . '</a>
 213+ // <a href="' . $statLink->escapeFullURL( 'stat=Users Greater Than 100 Edits' ) . '">' . wfMsg( 'sitemetrics-greater-100-edits' ) . '</a>
 214+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Anonymous Edits' ) . '">' . wfMsg( 'sitemetrics-anon-edits' ) . '</a>
 215+ <a href="' . $statLink->escapeFullURL( 'stat=Images' ) . '">' . wfMsg( 'sitemetrics-images' ) . '</a>';
 216+ if ( class_exists( 'Video' ) ) {
 217+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Video' ) . '">' . wfMsg( 'sitemetrics-video' ) . '</a>';
 218+ }
 219+
 220+ $output .= '<h2>' . wfMsg( 'sitemetrics-user-social-header' ) . '</h2>
 221+ <a href="' . $statLink->escapeFullURL( 'stat=New Users' ) . '">' . wfMsg( 'sitemetrics-new-users' ) . '</a>
 222+ <a href="' . $statLink->escapeFullURL( 'stat=Avatar Uploads' ) . '">' . wfMsg( 'sitemetrics-avatars' ) . '</a>
 223+ <a href="' . $statLink->escapeFullURL( 'stat=Profile Updates' ) . '">' . wfMsg( 'sitemetrics-profile-updates' ) . '</a>
 224+ <a href="' . $statLink->escapeFullURL( 'stat=User Page Edits' ) . '">' . wfMsg( 'sitemetrics-user-page-edits' ) . '</a>
 225+ <a href="' . $statLink->escapeFullURL( 'stat=Friendships' ) . '">' . wfMsg( 'sitemetrics-friendships' ) . '</a>
 226+ <a href="' . $statLink->escapeFullURL( 'stat=Foeships' ) . '">' . wfMsg( 'sitemetrics-foeships' ) . '</a>
 227+ <a href="' . $statLink->escapeFullURL( 'stat=Gifts' ) . '">' . wfMsg( 'sitemetrics-gifts' ) . '</a>
 228+ <a href="' . $statLink->escapeFullURL( 'stat=Wall Messages' ) . '">' . wfMsg( 'sitemetrics-wall-messages' ) . '</a>
 229+ <a href="' . $statLink->escapeFullURL( 'stat=User Talk Messages' ) . '">' . wfMsg( 'sitemetrics-talk-messages' ) . '</a>
 230+
 231+ <h2>' . wfMsg( 'sitemetrics-point-stats-header' ) . '</h2>
 232+ <a href="' . $statLink->escapeFullURL( 'stat=Awards' ) . '">' . wfMsg( 'sitemetrics-awards' ) . '</a>
 233+ <a href="' . $statLink->escapeFullURL( 'stat=Honorific Advancements' ) . '">' . wfMsg( 'sitemetrics-honorifics' ) . '</a>';
 234+
 235+ // Only display links to casual game statistics if said extensions are
 236+ // installed...
 237+ if (
 238+ class_exists( 'QuizGameHome' ) ||
 239+ class_exists( 'Poll' ) ||
 240+ class_exists( 'PictureGameHome' )
 241+ )
 242+ {
 243+ $output .= '<h2>' . wfMsg( 'sitemetrics-casual-game-stats' ) . '</h2>';
 244+ if ( class_exists( 'Poll' ) ) {
 245+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Polls Created' ) . '">' . wfMsg( 'sitemetrics-polls-created' ) . '</a>
 246+ <a href="' . $statLink->escapeFullURL( 'stat=Polls Taken' ) . '">' . wfMsg( 'sitemetrics-polls-taken' ) . '</a>';
 247+ }
 248+ if ( class_exists( 'PictureGameHome' ) ) {
 249+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Picture Games Created' ) . '">' . wfMsg( 'sitemetrics-picgames-created' ) . '</a>
 250+ <a href="' . $statLink->escapeFullURL( 'stat=Picture Games Taken' ) . '">' . wfMsg( 'sitemetrics-picgames-taken' ) . '</a>';
 251+ }
 252+ if ( class_exists( 'QuizGameHome' ) ) {
 253+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Quizzes Created' ) . '">' . wfMsg( 'sitemetrics-quizzes-created' ) . '</a>
 254+ <a href="' . $statLink->escapeFullURL( 'stat=Quizzes Taken' ) . '">' . wfMsg( 'sitemetrics-quizzes-taken' ) . '</a>';
 255+ }
 256+ }
 257+
 258+ // Show the "Blog and Voting Statistics" header only if at least some
 259+ // of said features are enabled...
 260+ if (
 261+ class_exists( 'BlogPage' ) || $dbr->tableExists( 'Vote' ) ||
 262+ $dbr->tableExists( 'Comments' ) || $dbr->tableExists( 'user_email_track' )
 263+ )
 264+ {
 265+ $output .= '<h2>' . wfMsg( 'sitemetrics-blog-stats-header' ) . '</h2>';
 266+ }
 267+ if ( class_exists( 'BlogPage' ) ) {
 268+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=New Blog Pages' ) . '">' . wfMsg( 'sitemetrics-new-blogs' ) . '</a>';
 269+ }
 270+ if ( $dbr->tableExists( 'Vote' ) ) {
 271+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Votes and Ratings' ) . '">' . wfMsg( 'sitemetrics-votes' ) . '</a>';
 272+ }
 273+ if ( $dbr->tableExists( 'Comments' ) ) {
 274+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Comments' ) . '">' . wfMsg( 'sitemetrics-comments' ) . '</a>';
 275+ }
 276+ if ( $dbr->tableExists( 'user_email_track' ) && class_exists( 'InviteEmail' ) ) {
 277+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Invitations to Read Blog Page' ) . '">' . wfMsg( 'sitemetrics-invites' ) . '</a>';
 278+ }
 279+
 280+ // Again, show the "Viral Statistics" header only if registration/email
 281+ // tracking is enabled
 282+ if (
 283+ $dbr->tableExists( 'user_register_track' ) && $wgRegisterTrack ||
 284+ $dbr->tableExists( 'user_email_track' )
 285+ )
 286+ {
 287+ $output .= '<h2>' . wfMsg( 'sitemetrics-viral-stats' ) . '</h2>';
 288+ }
 289+ if ( $dbr->tableExists( 'user_email_track' ) ) {
 290+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=Contact Invites' ) . '">' . wfMsg( 'sitemetrics-contact-imports' ) . '</a>';
 291+ }
 292+ // Only show the "User Recruits" link if
 293+ // 1) the table user_register_track exists and
 294+ // 2) registration tracking is enabled
 295+ if ( $dbr->tableExists( 'user_register_track' ) && $wgRegisterTrack ) {
 296+ $output .= '<a href="' . $statLink->escapeFullURL( 'stat=User Recruits' ) . '">' . wfMsg( 'sitemetrics-user-recruits' ) . '</a>';
 297+ }
 298+ $output .= '</div>
 299+ <div class="sm-content">';
 300+
 301+ if ( $statistic == 'Edits' ) {
 302+ $pageTitle = wfMsg( 'sitemetrics-edits' );
 303+ $sql = "SELECT COUNT(*) AS the_count,
 304+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) AS the_date
 305+ FROM {$dbr->tableName( 'revision' )} WHERE rev_user_text <> 'MLB Stats Bot'
 306+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' )
 307+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) DESC
 308+ LIMIT 0,12";
 309+ $res = $dbr->query( $sql, __METHOD__ );
 310+ $output .= $this->displayStats( wfMsg( 'sitemetrics-total-edits-month' ), $res, 'month' );
 311+
 312+ $sql = "SELECT COUNT(*) AS the_count,
 313+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) AS the_date
 314+ FROM {$dbr->tableName( 'revision' )} WHERE rev_user_text <> 'MLB Stats Bot'
 315+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' )
 316+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) DESC
 317+ LIMIT 0,120";
 318+ $res = $dbr->query( $sql, __METHOD__ );
 319+ $output .= $this->displayStats( wfMsg( 'sitemetrics-total-edits-day' ), $res, 'day' );
 320+ } elseif ( $statistic == 'Main Namespace Edits' ) {
 321+ $pageTitle = wfMsg( 'sitemetrics-main-ns' );
 322+ $sql = "SELECT COUNT(*) AS the_count,
 323+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) AS the_date
 324+ FROM {$dbr->tableName( 'revision' )}
 325+ INNER JOIN {$dbr->tableName( 'page' )} ON rev_page=page_id WHERE page_namespace=0
 326+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' )
 327+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' )
 328+ DESC LIMIT 0,12;";
 329+ $res = $dbr->query( $sql, __METHOD__ );
 330+ $output .= $this->displayStats( wfMsg( 'sitemetrics-main-ns-edits-month' ), $res, 'month' );
 331+
 332+ $sql = "SELECT COUNT(*) AS the_count,
 333+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) AS the_date
 334+ FROM {$dbr->tableName( 'revision' )} INNER JOIN {$dbr->tableName( 'page' )} ON rev_page=page_id WHERE page_namespace=0
 335+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' )
 336+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' )
 337+ DESC LIMIT 0,120;";
 338+ $res = $dbr->query( $sql, __METHOD__ );
 339+ $output .= $this->displayStats( wfMsg( 'sitemetrics-main-ns-edits-day' ), $res, 'day' );
 340+ } elseif ( $statistic == 'New Main Namespace Articles' ) {
 341+ $pageTitle = wfMsg( 'sitemetrics-new-articles' );
 342+ $sql = "SELECT COUNT(*) AS the_count,
 343+ DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1) , '%y %m' ) AS the_date
 344+ FROM {$dbr->tableName( 'page' )}
 345+ WHERE page_namespace=0
 346+ GROUP BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m' )
 347+ ORDER BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m' ) DESC
 348+ LIMIT 0,12;";
 349+
 350+ $res = $dbr->query( $sql, __METHOD__ );
 351+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-articles-month' ), $res, 'month' );
 352+
 353+ $sql = "SELECT COUNT(*) AS the_count,
 354+ DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1) , '%y %m %d' ) AS the_date
 355+ FROM {$dbr->tableName( 'page' )}
 356+ WHERE page_namespace=0
 357+ GROUP BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m %d' )
 358+ ORDER BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m %d' ) DESC
 359+ LIMIT 0,120;";
 360+
 361+ $res = $dbr->query( $sql, __METHOD__ );
 362+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-articles-day' ), $res, 'day' );
 363+ } elseif ( $statistic == 'Anonymous Edits' ) {
 364+ $pageTitle = wfMsg( 'sitemetrics-anon-edits' );
 365+ $sql = "SELECT COUNT(*) AS the_count,
 366+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) AS the_date
 367+ FROM {$dbr->tableName( 'revision' )}
 368+ WHERE rev_user = 0
 369+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' )
 370+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) DESC
 371+ LIMIT 0,12";
 372+ $res = $dbr->query( $sql, __METHOD__ );
 373+ $output .= $this->displayStats( wfMsg( 'sitemetrics-anon-edits-month' ), $res, 'month' );
 374+
 375+ $sql = "SELECT COUNT(*) AS the_count,
 376+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) AS the_date
 377+ FROM {$dbr->tableName( 'revision' )}
 378+ WHERE rev_user = 0
 379+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' )
 380+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) DESC
 381+ LIMIT 0,120";
 382+ $res = $dbr->query( $sql, __METHOD__ );
 383+ $output .= $this->displayStats( wfMsg( 'sitemetrics-anon-edits-day' ), $res, 'day' );
 384+ } elseif ( $statistic == 'Images' ) {
 385+ $pageTitle = wfMsg( 'sitemetrics-images' );
 386+ $sql = "SELECT COUNT(*) AS the_count,
 387+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(img_timestamp)), '%y %m') AS the_date
 388+ FROM {$dbr->tableName( 'image' )}
 389+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(img_timestamp)), '%y %m')
 390+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(img_timestamp)), '%y %m') DESC
 391+ LIMIT 0,12";
 392+
 393+ $res = $dbr->query( $sql, __METHOD__ );
 394+ $output .= $this->displayStats( wfMsg( 'sitemetrics-images-month' ), $res, 'month' );
 395+
 396+ $sql = "SELECT COUNT(*) AS the_count,
 397+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(img_timestamp)), '%y %m %d') AS the_date
 398+ FROM {$dbr->tableName( 'image' )}
 399+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(img_timestamp)), '%y %m %d')
 400+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(img_timestamp)), '%y %m %d') DESC
 401+ LIMIT 0,120";
 402+
 403+ $res = $dbr->query( $sql, __METHOD__ );
 404+ $output .= $this->displayStats( wfMsg( 'sitemetrics-images-day' ), $res, 'day' );
 405+ } elseif ( $statistic == 'Video' ) {
 406+ $pageTitle = wfMsg( 'sitemetrics-video' );
 407+ $sql = "SELECT COUNT(*) AS the_count,
 408+ DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1) , '%y %m' ) AS the_date
 409+ FROM {$dbr->tableName( 'page' )}
 410+ WHERE page_namespace=400
 411+ GROUP BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m' )
 412+ ORDER BY DATE_FORMAT( (select FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m' ) DESC
 413+ LIMIT 0,12";
 414+
 415+ $res = $dbr->query( $sql, __METHOD__ );
 416+ $output .= $this->displayStats( wfMsg( 'sitemetrics-video-month' ), $res, 'month' );
 417+
 418+ $sql = "SELECT COUNT(*) AS the_count,
 419+ DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1) , '%y %m %d' ) AS the_date
 420+ FROM {$dbr->tableName( 'page' )}
 421+ WHERE page_namespace=400
 422+ GROUP BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m %d' )
 423+ ORDER BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m %d' ) DESC
 424+ LIMIT 0,120";
 425+
 426+ $res = $dbr->query( $sql, __METHOD__ );
 427+ $output .= $this->displayStats( wfMsg( 'sitemetrics-video-day' ), $res, 'day' );
 428+ } elseif ( $statistic == 'New Users' ) {
 429+ $pageTitle = wfMsg( 'sitemetrics-new-users' );
 430+ if ( $dbr->tableExists( 'user_register_track' ) && $wgRegisterTrack ) {
 431+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `ur_date` , '%y %m' ) AS the_date
 432+ FROM {$dbr->tableName( 'user_register_track' )}
 433+ GROUP BY DATE_FORMAT( `ur_date` , '%y %m' )
 434+ ORDER BY DATE_FORMAT( `ur_date` , '%y %m' ) DESC
 435+ LIMIT 0,12";
 436+ $res = $dbr->query( $sql, __METHOD__ );
 437+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-users-month' ), $res, 'month' );
 438+
 439+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `ur_date` , '%y %m %d' ) AS the_date
 440+ FROM {$dbr->tableName( 'user_register_track' )}
 441+ GROUP BY DATE_FORMAT( `ur_date` , '%y %m %d' )
 442+ ORDER BY DATE_FORMAT( `ur_date` , '%y %m %d' ) DESC
 443+ LIMIT 0,120";
 444+ $res = $dbr->query( $sql, __METHOD__ );
 445+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-users-day' ), $res, 'day' );
 446+ } else { // normal new user stats for this wiki from new user log
 447+ $sql = "SELECT COUNT(*) AS the_count,
 448+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') AS the_date
 449+ FROM {$dbr->tableName( 'logging' )}
 450+ WHERE log_type='newusers'
 451+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d')
 452+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') DESC
 453+ LIMIT 0,12";
 454+ $res = $dbr->query( $sql, __METHOD__ );
 455+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-users-month' ), $res, 'month' );
 456+
 457+ $sql = "SELECT COUNT(*) AS the_count,
 458+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') AS the_date
 459+ FROM {$dbr->tableName( 'logging' )}
 460+ WHERE log_type='newusers'
 461+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d')
 462+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') DESC
 463+ LIMIT 0,120";
 464+ $res = $dbr->query( $sql, __METHOD__ );
 465+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-users-day' ), $res, 'day' );
 466+ }
 467+ } elseif ( $statistic == 'Avatar Uploads' ) {
 468+ $pageTitle = wfMsg( 'sitemetrics-avatars' );
 469+ $sql = "SELECT COUNT(*) AS the_count,
 470+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m') AS the_date
 471+ FROM {$dbr->tableName( 'logging' )}
 472+ WHERE log_type='avatar'
 473+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m')
 474+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m') DESC
 475+ LIMIT 0,12";
 476+ $res = $dbr->query( $sql, __METHOD__ );
 477+ $output .= $this->displayStats( wfMsg( 'sitemetrics-avatars-month' ), $res, 'month' );
 478+
 479+ $sql = "SELECT COUNT(*) AS the_count,
 480+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') AS the_date
 481+ FROM {$dbr->tableName( 'logging' )}
 482+ WHERE log_type='avatar'
 483+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d')
 484+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') DESC
 485+ LIMIT 0,120";
 486+ $res = $dbr->query( $sql, __METHOD__ );
 487+ $output .= $this->displayStats( wfMsg( 'sitemetrics-avatars-day' ), $res, 'day' );
 488+ } elseif ( $statistic == 'Profile Updates' ) {
 489+ $pageTitle = wfMsg( 'sitemetrics-profile-updates' );
 490+ $sql = "SELECT COUNT(*) AS the_count,
 491+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m') AS the_date
 492+ FROM {$dbr->tableName( 'logging' )}
 493+ WHERE log_type='profile'
 494+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m')
 495+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m') DESC
 496+ LIMIT 0,12";
 497+ $res = $dbr->query( $sql, __METHOD__ );
 498+ $output .= $this->displayStats( wfMsg( 'sitemetrics-profile-updates-month' ), $res, 'month' );
 499+
 500+ $sql = "SELECT COUNT(*) AS the_count,
 501+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') AS the_date
 502+ FROM {$dbr->tableName( 'logging' )}
 503+ WHERE log_type='profile'
 504+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d')
 505+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(log_timestamp)), '%y %m %d') DESC
 506+ LIMIT 0,120";
 507+ $res = $dbr->query( $sql, __METHOD__ );
 508+ $output .= $this->displayStats( wfMsg( 'sitemetrics-profile-updates-day' ), $res, 'day' );
 509+ } elseif ( $statistic == 'Friendships' ) {
 510+ $pageTitle = wfMsg( 'sitemetrics-friendships' );
 511+ $sql = "SELECT COUNT(*)/2 AS the_count, DATE_FORMAT( `r_date` , '%y %m' ) AS the_date
 512+ FROM {$dbr->tableName( 'user_relationship' )}
 513+ WHERE r_type=1
 514+ GROUP BY DATE_FORMAT( `r_date` , '%y %m' )
 515+ ORDER BY DATE_FORMAT( `r_date` , '%y %m' ) DESC
 516+ LIMIT 0,12";
 517+ $res = $dbr->query( $sql, __METHOD__ );
 518+ $output .= $this->displayStats( wfMsg( 'sitemetrics-friendships-month' ), $res, 'month' );
 519+
 520+ $sql = "SELECT COUNT(*)/2 AS the_count, DATE_FORMAT( `r_date` , '%y %m %d' ) AS the_date
 521+ FROM {$dbr->tableName( 'user_relationship' )}
 522+ WHERE r_type=1
 523+ GROUP BY DATE_FORMAT( `r_date` , '%y %m %d' )
 524+ ORDER BY DATE_FORMAT( `r_date` , '%y %m %d' ) DESC
 525+ LIMIT 0,120";
 526+ $res = $dbr->query( $sql, __METHOD__ );
 527+ $output .= $this->displayStats( wfMsg( 'sitemetrics-friendships-day' ), $res, 'day' );
 528+ } elseif ( $statistic == 'Foeships' ) {
 529+ $pageTitle = wfMsg( 'sitemetrics-foeships' );
 530+ $sql = "SELECT COUNT(*)/2 AS the_count, DATE_FORMAT( `r_date` , '%y %m' ) AS the_date
 531+ FROM {$dbr->tableName( 'user_relationship' )}
 532+ WHERE r_type=2
 533+ GROUP BY DATE_FORMAT( `r_date` , '%y %m' )
 534+ ORDER BY DATE_FORMAT( `r_date` , '%y %m' ) DESC
 535+ LIMIT 0,12";
 536+ $res = $dbr->query( $sql, __METHOD__ );
 537+ $output .= $this->displayStats( wfMsg( 'sitemetrics-foeships-month' ), $res, 'month' );
 538+
 539+ $sql = "SELECT COUNT(*)/2 AS the_count, DATE_FORMAT( `r_date` , '%y %m %d' ) AS the_date
 540+ FROM {$dbr->tableName( 'user_relationship' )}
 541+ WHERE r_type=2
 542+ GROUP BY DATE_FORMAT( `r_date` , '%y %m %d' )
 543+ ORDER BY DATE_FORMAT( `r_date` , '%y %m %d' ) DESC
 544+ LIMIT 0,120";
 545+ $res = $dbr->query( $sql, __METHOD__ );
 546+ $output .= $this->displayStats( wfMsg( 'sitemetrics-foeships-day' ), $res, 'day' );
 547+ } elseif ( $statistic == 'Gifts' ) {
 548+ $pageTitle = wfMsg( 'sitemetrics-gifts' );
 549+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `ug_date` , '%y %m' ) AS the_date
 550+ FROM {$dbr->tableName( 'user_gift' )}
 551+ GROUP BY DATE_FORMAT( `ug_date` , '%y %m' )
 552+ ORDER BY DATE_FORMAT( `ug_date` , '%y %m' ) DESC
 553+ LIMIT 0,12";
 554+
 555+ $res = $dbr->query( $sql, __METHOD__ );
 556+ $output .= $this->displayStats( wfMsg( 'sitemetrics-gifts-month' ), $res, 'month' );
 557+
 558+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `ug_date` , '%y %m %d' ) AS the_date
 559+ FROM {$dbr->tableName( 'user_gift' )}
 560+ GROUP BY DATE_FORMAT( `ug_date` , '%y %m %d' )
 561+ ORDER BY DATE_FORMAT( `ug_date` , '%y %m %d' ) DESC
 562+ LIMIT 0,120";
 563+
 564+ $res = $dbr->query( $sql, __METHOD__ );
 565+ $output .= $this->displayStats( wfMsg( 'sitemetrics-gifts-day' ), $res, 'day' );
 566+ } elseif ( $statistic == 'Wall Messages' ) {
 567+ $pageTitle = wfMsg( 'sitemetrics-wall-messages' );
 568+ $sql = "SELECT COUNT(*) AS the_count,
 569+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(ub_date)), '%y %m') AS the_date
 570+ FROM {$dbr->tableName( 'user_board' )}
 571+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(ub_date)), '%y %m')
 572+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(ub_date)), '%y %m') DESC
 573+ LIMIT 0,12";
 574+
 575+ $res = $dbr->query( $sql, __METHOD__ );
 576+ $output .= $this->displayStats( wfMsg( 'sitemetrics-wall-messages-month' ), $res, 'month' );
 577+
 578+ $sql = "SELECT COUNT(*) AS the_count,
 579+ DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(ub_date)), '%y %m %d') AS the_date
 580+ FROM {$dbr->tableName( 'user_board' )}
 581+ GROUP BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(ub_date)), '%y %m %d')
 582+ ORDER BY DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(ub_date)), '%y %m %d') DESC
 583+ LIMIT 0,120";
 584+
 585+ $res = $dbr->query( $sql, __METHOD__ );
 586+ $output .= $this->displayStats( wfMsg( 'sitemetrics-wall-messages-day' ), $res, 'day' );
 587+ } elseif ( $statistic == 'User Page Edits' ) {
 588+ $pageTitle = wfMsg( 'sitemetrics-user-page-edits' );
 589+ $sql = "SELECT COUNT(*) AS the_count,
 590+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) AS the_date
 591+ FROM {$dbr->tableName( 'revision' )}
 592+ INNER JOIN {$dbr->tableName( 'page' )} ON rev_page=page_id
 593+ WHERE page_namespace=2
 594+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' )
 595+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) DESC
 596+ LIMIT 0,12;";
 597+
 598+ $res = $dbr->query( $sql, __METHOD__ );
 599+ $output .= $this->displayStats( wfMsg( 'sitemetrics-user-page-edits-month' ), $res, 'month' );
 600+
 601+ $sql = "SELECT COUNT(*) AS the_count,
 602+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) AS the_date
 603+ FROM {$dbr->tableName( 'revision' )}
 604+ INNER JOIN {$dbr->tableName( 'page' )} ON rev_page=page_id
 605+ WHERE page_namespace=2
 606+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' )
 607+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) DESC
 608+ LIMIT 0,120;";
 609+
 610+ $res = $dbr->query( $sql, __METHOD__ );
 611+ $output .= $this->displayStats( wfMsg( 'sitemetrics-user-page-edits-day' ), $res, 'day' );
 612+ } elseif ( $statistic == 'User Talk Messages' ) {
 613+ $pageTitle = wfMsg( 'sitemetrics-talk-messages' );
 614+ $sql = "SELECT COUNT(*) AS the_count,
 615+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) AS the_date
 616+ FROM {$dbr->tableName( 'revision' )}
 617+ INNER JOIN {$dbr->tableName( 'page' )} ON rev_page=page_id
 618+ WHERE page_namespace=3
 619+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' )
 620+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m' ) DESC
 621+ LIMIT 0,12;";
 622+
 623+ $res = $dbr->query( $sql, __METHOD__ );
 624+ $output .= $this->displayStats( wfMsg( 'sitemetrics-talk-messages-month' ), $res, 'month' );
 625+
 626+ $sql = "SELECT COUNT(*) AS the_count,
 627+ DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) AS the_date
 628+ FROM {$dbr->tableName( 'revision' )}
 629+ INNER JOIN {$dbr->tableName( 'page' )} ON rev_page=page_id
 630+ WHERE page_namespace=3
 631+ GROUP BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' )
 632+ ORDER BY DATE_FORMAT( FROM_UNIXTIME(UNIX_TIMESTAMP(rev_timestamp)), '%y %m %d' ) DESC
 633+ LIMIT 0,120;";
 634+
 635+ $res = $dbr->query( $sql, __METHOD__ );
 636+ $output .= $this->displayStats( wfMsg( 'sitemetrics-talk-messages-day' ), $res, 'day' );
 637+ } elseif ( $statistic == 'Polls Created' ) {
 638+ $pageTitle = wfMsg( 'sitemetrics-polls-created' );
 639+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `poll_date` , '%y %m' ) AS the_date
 640+ FROM {$dbr->tableName( 'poll_question' )}
 641+ GROUP BY DATE_FORMAT( `poll_date` , '%y %m' )
 642+ ORDER BY DATE_FORMAT( `poll_date` , '%y %m' ) DESC
 643+ LIMIT 0,12";
 644+ $res = $dbr->query( $sql, __METHOD__ );
 645+ $output .= $this->displayStats( wfMsg( 'sitemetrics-polls-created-month' ), $res, 'month' );
 646+
 647+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `poll_date` , '%y %m %d' ) AS the_date
 648+ FROM {$dbr->tableName( 'poll_question' )}
 649+ GROUP BY DATE_FORMAT( `poll_date` , '%y %m %d' )
 650+ ORDER BY DATE_FORMAT( `poll_date` , '%y %m %d' ) DESC
 651+ LIMIT 0,120";
 652+ $res = $dbr->query( $sql, __METHOD__ );
 653+ $output .= $this->displayStats( wfMsg( 'sitemetrics-polls-created-day' ), $res, 'day' );
 654+ } elseif ( $statistic == 'Polls Taken' ) {
 655+ $pageTitle = wfMsg( 'sitemetrics-polls-taken' );
 656+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `pv_date` , '%y %m' ) AS the_date
 657+ FROM {$dbr->tableName( 'poll_user_vote' )}
 658+ GROUP BY DATE_FORMAT( `pv_date` , '%y %m' )
 659+ ORDER BY DATE_FORMAT( `pv_date` , '%y %m' ) DESC
 660+ LIMIT 0,12";
 661+ $res = $dbr->query( $sql, __METHOD__ );
 662+ $output .= $this->displayStats( wfMsg( 'sitemetrics-polls-taken-month' ), $res, 'month' );
 663+
 664+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `pv_date` , '%y %m %d' ) AS the_date
 665+ FROM {$dbr->tableName( 'poll_user_vote' )}
 666+ GROUP BY DATE_FORMAT( `pv_date` , '%y %m %d' )
 667+ ORDER BY DATE_FORMAT( `pv_date` , '%y %m %d' ) DESC
 668+ LIMIT 0,120";
 669+ $res = $dbr->query( $sql, __METHOD__ );
 670+ $output .= $this->displayStats( wfMsg( 'sitemetrics-polls-taken-day' ), $res, 'day' );
 671+ } elseif ( $statistic == 'Picture Games Created' ) {
 672+ $pageTitle = wfMsg( 'sitemetrics-picgames-created' );
 673+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `pg_date` , '%y %m' ) AS the_date
 674+ FROM {$dbr->tableName( 'picturegame_images' )}
 675+ GROUP BY DATE_FORMAT( `pg_date` , '%y %m' )
 676+ ORDER BY DATE_FORMAT( `pg_date` , '%y %m' ) DESC
 677+ LIMIT 0,12";
 678+ $res = $dbr->query( $sql, __METHOD__ );
 679+ $output .= $this->displayStats( wfMsg( 'sitemetrics-picgames-created-month' ), $res, 'month' );
 680+
 681+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `pg_date` , '%y %m %d' ) AS the_date
 682+ FROM {$dbr->tableName( 'picturegame_images' )}
 683+ GROUP BY DATE_FORMAT( `pg_date` , '%y %m %d' )
 684+ ORDER BY DATE_FORMAT( `pg_date` , '%y %m %d' ) DESC
 685+ LIMIT 0,6";
 686+ $res = $dbr->query( $sql, __METHOD__ );
 687+ $output .= $this->displayStats( wfMsg( 'sitemetrics-picgames-created-day' ), $res, 'day' );
 688+ } elseif ( $statistic == 'Picture Games Taken' ) {
 689+ $pageTitle = wfMsg( 'sitemetrics-picgames-taken' );
 690+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `vote_date` , '%y %m' ) AS the_date
 691+ FROM {$dbr->tableName( 'picturegame_votes' )}
 692+ GROUP BY DATE_FORMAT( `vote_date` , '%y %m' )
 693+ ORDER BY DATE_FORMAT( `vote_date` , '%y %m' ) DESC
 694+ LIMIT 0,12";
 695+ $res = $dbr->query( $sql, __METHOD__ );
 696+ $output .= $this->displayStats( wfMsg( 'sitemetrics-picgames-taken-month' ), $res, 'month' );
 697+
 698+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `vote_date` , '%y %m %d' ) AS the_date
 699+ FROM {$dbr->tableName( 'picturegame_votes' )}
 700+ GROUP BY DATE_FORMAT( `vote_date` , '%y %m %d' )
 701+ ORDER BY DATE_FORMAT( `vote_date` , '%y %m %d' ) DESC
 702+ LIMIT 0,120";
 703+ $res = $dbr->query( $sql, __METHOD__ );
 704+ $output .= $this->displayStats( wfMsg( 'sitemetrics-picgames-taken-day' ), $res, 'day' );
 705+ } elseif ( $statistic == 'Quizzes Created' ) {
 706+ $pageTitle = wfMsg( 'sitemetrics-quizzes-created' );
 707+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `q_date` , '%y %m' ) AS the_date
 708+ FROM {$dbr->tableName( 'quizgame_questions' )}
 709+ GROUP BY DATE_FORMAT( `q_date` , '%y %m' )
 710+ ORDER BY DATE_FORMAT( `q_date` , '%y %m' ) DESC
 711+ LIMIT 0,12";
 712+ $res = $dbr->query( $sql, __METHOD__ );
 713+ $output .= $this->displayStats( wfMsg( 'sitemetrics-quizzes-created-month' ), $res, 'month' );
 714+
 715+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `q_date` , '%y %m %d' ) AS the_date
 716+ FROM {$dbr->tableName( 'quizgame_questions' )}
 717+ GROUP BY DATE_FORMAT( `q_date` , '%y %m %d' )
 718+ ORDER BY DATE_FORMAT( `q_date` , '%y %m %d' ) DESC
 719+ LIMIT 0,120";
 720+ $res = $dbr->query( $sql, __METHOD__ );
 721+ $output .= $this->displayStats( wfMsg( 'sitemetrics-quizzes-created-day' ), $res, 'day' );
 722+ } elseif ( $statistic == 'Quizzes Taken' ) {
 723+ $pageTitle = wfMsg( 'sitemetrics-quizzes-taken' );
 724+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `a_date` , '%y %m' ) AS the_date
 725+ FROM {$dbr->tableName( 'quizgame_answers' )}
 726+ GROUP BY DATE_FORMAT( `a_date` , '%y %m' )
 727+ ORDER BY DATE_FORMAT( `a_date` , '%y %m' ) DESC
 728+ LIMIT 0,12";
 729+
 730+ $res = $dbr->query( $sql, __METHOD__ );
 731+ $output .= $this->displayStats( wfMsg( 'sitemetrics-quizzes-taken-month' ), $res, 'month' );
 732+
 733+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `a_date` , '%y %m %d' ) AS the_date
 734+ FROM {$dbr->tableName( 'quizgame_answers' )}
 735+ GROUP BY DATE_FORMAT( `a_date` , '%y %m %d' )
 736+ ORDER BY DATE_FORMAT( `a_date` , '%y %m %d' ) DESC
 737+ LIMIT 0,120";
 738+
 739+ $res = $dbr->query( $sql, __METHOD__ );
 740+ $output .= $this->displayStats( wfMsg( 'sitemetrics-quizzes-taken-day' ), $res, 'day' );
 741+ } elseif ( $statistic == 'New Blog Pages' ) {
 742+ $pageTitle = wfMsg( 'sitemetrics-new-blogs' );
 743+ $sql = "SELECT COUNT(*) AS the_count,
 744+ DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1) , '%y %m' ) AS the_date
 745+ FROM {$dbr->tableName( 'page' )}
 746+ WHERE page_namespace=500
 747+ GROUP BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM revision WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m' )
 748+ ORDER BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM revision WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m' ) DESC
 749+ LIMIT 0,12;";
 750+
 751+ $res = $dbr->query( $sql, __METHOD__ );
 752+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-blogs-month' ), $res, 'month' );
 753+
 754+ $sql = "SELECT COUNT(*) AS the_count,
 755+ DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1) , '%y %m %d' ) AS the_date
 756+ FROM {$dbr->tableName( 'page' )}
 757+ WHERE page_namespace=500
 758+ GROUP BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m %d' )
 759+ ORDER BY DATE_FORMAT( (SELECT FROM_UNIXTIME( UNIX_TIMESTAMP(rev_timestamp) ) FROM {$dbr->tableName( 'revision' )} WHERE rev_page=page_id ORDER BY rev_timestamp ASC LIMIT 1), '%y %m %d' ) DESC
 760+ LIMIT 0,120;";
 761+
 762+ $res = $dbr->query( $sql, __METHOD__ );
 763+ $output .= $this->displayStats( wfMsg( 'sitemetrics-new-blogs-day' ), $res, 'day' );
 764+ } elseif ( $statistic == 'Votes and Ratings' ) {
 765+ $pageTitle = wfMsg( 'sitemetrics-votes' );
 766+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `Vote_Date` , '%y %m' ) AS the_date
 767+ FROM {$dbr->tableName( 'Vote' )}
 768+ GROUP BY DATE_FORMAT( `Vote_Date` , '%y %m' )
 769+ ORDER BY DATE_FORMAT( `Vote_Date` , '%y %m' ) DESC
 770+ LIMIT 0,12";
 771+ $res = $dbr->query( $sql, __METHOD__ );
 772+ $output .= $this->displayStats( wfMsg( 'sitemetrics-votes-month' ), $res, 'month' );
 773+
 774+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `Vote_Date` , '%y %m %d' ) AS the_date
 775+ FROM {$dbr->tableName( 'Vote' )}
 776+ GROUP BY DATE_FORMAT( `Vote_Date` , '%y %m %d' )
 777+ ORDER BY DATE_FORMAT( `Vote_Date` , '%y %m %d' ) DESC
 778+ LIMIT 0,120";
 779+ $res = $dbr->query( $sql, __METHOD__ );
 780+ $output .= $this->displayStats( wfMsg( 'sitemetrics-votes-day' ), $res, 'day' );
 781+ } elseif ( $statistic == 'Comments' ) {
 782+ $pageTitle = wfMsg( 'sitemetrics-comments' );
 783+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `Comment_Date` , '%y %m' ) AS the_date
 784+ FROM {$dbr->tableName( 'Comments' )}
 785+ GROUP BY DATE_FORMAT( `Comment_Date` , '%y %m' )
 786+ ORDER BY DATE_FORMAT( `Comment_Date` , '%y %m' ) DESC
 787+ LIMIT 0,12";
 788+ $res = $dbr->query( $sql, __METHOD__ );
 789+ $output .= $this->displayStats( wfMsg( 'sitemetrics-comments-month' ), $res, 'month' );
 790+
 791+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `Comment_Date` , '%y %m %d' ) AS the_date
 792+ FROM {$dbr->tableName( 'Comments' )}
 793+ GROUP BY DATE_FORMAT( `Comment_Date` , '%y %m %d' )
 794+ ORDER BY DATE_FORMAT( `Comment_Date` , '%y %m %d' ) DESC
 795+ LIMIT 0,120";
 796+ $res = $dbr->query( $sql, __METHOD__ );
 797+ $output .= $this->displayStats( wfMsg( 'sitemetrics-comments-day' ), $res, 'day' );
 798+ } elseif ( $statistic == 'Contact Invites' ) {
 799+ $pageTitle = wfMsg( 'sitemetrics-contact-imports' );
 800+ $sql = "SELECT SUM(ue_count) AS the_count, DATE_FORMAT( `ue_date` , '%y %m' ) AS the_date
 801+ FROM {$dbr->tableName( 'user_email_track' )}
 802+ WHERE ue_type IN (1,2,3)
 803+ GROUP BY DATE_FORMAT( `ue_date` , '%y %m' )
 804+ ORDER BY DATE_FORMAT( `ue_date` , '%y %m' ) DESC
 805+ LIMIT 0,12";
 806+ $res = $dbr->query( $sql, __METHOD__ );
 807+ $output .= $this->displayStats( wfMsg( 'sitemetrics-contact-invites-month' ), $res, 'month' );
 808+
 809+ $sql = "SELECT SUM(ue_count) AS the_count, DATE_FORMAT( `ue_date` , '%y %m %d' ) AS the_date
 810+ FROM {$dbr->tableName( 'user_email_track' )}
 811+ WHERE ue_type IN (1,2,3)
 812+ GROUP BY DATE_FORMAT( `ue_date` , '%y %m %d' )
 813+ ORDER BY DATE_FORMAT( `ue_date` , '%y %m %d' ) DESC
 814+ LIMIT 0,120";
 815+ $res = $dbr->query( $sql, __METHOD__ );
 816+ $output .= $this->displayStats( wfMsg( 'sitemetrics-contact-invites-day' ), $res, 'day' );
 817+ } elseif ( $statistic == 'Invitations to Read Blog Page' ) {
 818+ $pageTitle = wfMsg( 'sitemetrics-invites' );
 819+ $sql = "SELECT SUM(ue_count) AS the_count, DATE_FORMAT( `ue_date` , '%y %m' ) AS the_date
 820+ FROM {$dbr->tableName( 'user_email_track' )}
 821+ WHERE ue_type IN (4)
 822+ GROUP BY DATE_FORMAT( `ue_date` , '%y %m' )
 823+ ORDER BY DATE_FORMAT( `ue_date` , '%y %m' ) DESC
 824+ LIMIT 0,12";
 825+ $res = $dbr->query( $sql, __METHOD__ );
 826+ $output .= $this->displayStats( wfMsg( 'sitemetrics-invites-month' ), $res, 'month' );
 827+
 828+ $sql = "SELECT SUM( ue_count ) AS the_count, DATE_FORMAT( `ue_date` , '%y %m %d' ) AS the_date
 829+ FROM {$dbr->tableName( 'user_email_track' )}
 830+ WHERE ue_type IN (4)
 831+ GROUP BY DATE_FORMAT( `ue_date` , '%y %m %d' )
 832+ ORDER BY DATE_FORMAT( `ue_date` , '%y %m %d' ) DESC
 833+ LIMIT 0,120";
 834+ $res = $dbr->query( $sql, __METHOD__ );
 835+ $output .= $this->displayStats( wfMsg( 'sitemetrics-invites-day' ), $res, 'day' );
 836+ } elseif ( $statistic == 'User Recruits' ) {
 837+ $pageTitle = wfMsg( 'sitemetrics-user-recruits' );
 838+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `ur_date` , '%y %m' ) AS the_date
 839+ FROM {$dbr->tableName( 'user_register_track' )}
 840+ WHERE ur_user_id_referral <> 0
 841+ GROUP BY DATE_FORMAT( `ur_date` , '%y %m' )
 842+ ORDER BY DATE_FORMAT( `ur_date` , '%y %m' ) DESC
 843+ LIMIT 0,12";
 844+ $res = $dbr->query( $sql, __METHOD__ );
 845+ $output .= $this->displayStats( wfMsg( 'sitemetrics-user-recruits-month' ), $res, 'month' );
 846+
 847+ $sql = "SELECT COUNT(*) AS the_count, DATE_FORMAT( `ur_date` , '%y %m %d' ) AS the_date
 848+ FROM {$dbr->tableName( 'user_register_track' )}
 849+ WHERE ur_user_id_referral <> 0
 850+ GROUP BY DATE_FORMAT( `ur_date` , '%y %m %d' )
 851+ ORDER BY DATE_FORMAT( `ur_date` , '%y %m %d' ) DESC
 852+ LIMIT 0,12";
 853+ $res = $dbr->query( $sql, __METHOD__ );
 854+ $output .= $this->displayStats( wfMsg( 'sitemetrics-user-recruits-day' ), $res, 'day' );
 855+ } elseif ( $statistic == 'Awards' ) {
 856+ $pageTitle = wfMsg( 'sitemetrics-awards' );
 857+ $sql = "SELECT COUNT(*) AS the_count,
 858+ DATE_FORMAT( `sg_date` , '%y %m' ) AS the_date
 859+ FROM {$dbr->tableName( 'user_system_gift' )}
 860+ GROUP BY DATE_FORMAT( `sg_date` , '%y %m' )
 861+ ORDER BY DATE_FORMAT( `sg_date` , '%y %m' ) DESC
 862+ LIMIT 0,12";
 863+ $res = $dbr->query( $sql, __METHOD__ );
 864+ $output .= $this->displayStats( wfMsg( 'sitemetrics-awards-month' ), $res, 'month' );
 865+
 866+ $sql = "SELECT COUNT(*) AS the_count,
 867+ DATE_FORMAT( `sg_date` , '%y %m %d' ) AS the_date
 868+ FROM {$dbr->tableName( 'user_system_gift' )}
 869+ GROUP BY DATE_FORMAT( `sg_date` , '%y %m %d' )
 870+ ORDER BY DATE_FORMAT( `sg_date` , '%y %m %d' ) DESC
 871+ LIMIT 0,120";
 872+ $res = $dbr->query( $sql, __METHOD__ );
 873+ $output .= $this->displayStats( wfMsg( 'sitemetrics-awards-day' ), $res, 'day' );
 874+ } elseif ( $statistic == 'Honorific Advancements' ) {
 875+ $pageTitle = wfMsg( 'sitemetrics-honorifics' );
 876+ $sql = "SELECT COUNT(*) AS the_count,
 877+ DATE_FORMAT( `um_date` , '%y %m' ) AS the_date
 878+ FROM {$dbr->tableName( 'user_system_messages' )}
 879+ GROUP BY DATE_FORMAT( `um_date` , '%y %m' )
 880+ ORDER BY DATE_FORMAT( `um_date` , '%y %m' ) DESC
 881+ LIMIT 0,12";
 882+ $res = $dbr->query( $sql, __METHOD__ );
 883+ $output .= $this->displayStats( wfMsg( 'sitemetrics-honorifics-month' ), $res, 'month' );
 884+
 885+ $sql = "SELECT COUNT(*) AS the_count,
 886+ DATE_FORMAT( `um_date` , '%y %m %d' ) AS the_date
 887+ FROM {$dbr->tableName( 'user_system_messages' )}
 888+ GROUP BY DATE_FORMAT( `um_date` , '%y %m %d' )
 889+ ORDER BY DATE_FORMAT( `um_date` , '%y %m %d' ) DESC
 890+ LIMIT 0,120";
 891+ $res = $dbr->query( $sql, __METHOD__ );
 892+ $output .= $this->displayStats( wfMsg( 'sitemetrics-honorifics-day' ), $res, 'day' );
 893+ }
 894+
 895+ $output .= '</div>';
 896+
 897+ // Set page title here, we can't do it earlier
 898+ $wgOut->setPageTitle( wfMsg( 'sitemetrics-title', $pageTitle ) );
 899+
 900+ $wgOut->addHTML( $output );
 901+ }
 902+
 903+}
\ No newline at end of file
Property changes on: trunk/extensions/SiteMetrics/SpecialSiteMetrics.php
___________________________________________________________________
Added: svn:eol-style
1904 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r96620Translate: allow SiteMetrics extension (r96469) and Nimbus skin (r96356) to b...ashley22:11, 8 September 2011

Status & tagging log