
grimm.otzberg at freenet
Aug 20, 2008, 3:55 AM
Post #4 of 4
(62 views)
Permalink
|
----- original Nachricht -------- Betreff: Re: [Mediawiki-l] change {{NUMBEROFARTICLES}} Gesendet: Di 19 Aug 2008 22:08:17 CEST Von: "Benjamin Lees"<emufarmers[at]gmail.com> > On Fri, May 2, 2008 at 1:46 PM, Steffen Grimm > <grimm.otzberg[at]freenet.de>wrote: > > > > > > > Hello, > > I've got a wiki abot a special theme. All pages, which doesn,t apply to > the > > wiki are linked to wikipedia (with a template) But I want, that these > pages > > aren't counted in {{NUMBEROFARTICLES}}. I've got pages in other > namespaces, > > which should be counted, too. > > This variable isn't working right, so I decided to change the code: > > <? > > include ('dbpass.php'); > > @mysql_connect($dbhost, $dbuser, $dbpass); > > @$x=mysql_select_db($dbdata); > > if (empty($x)) { > > echo "Fehler beim Verbinden mit dem Datenbankserver<br>"; > > exit; > > } > > $sql = " page WHERE page_namespace = 0 OR > > page_namespace = 4;"; > > $result = mysql_query($sql); > > > > $a = 0; > > while ($resuld = mysql_fetch_array($result, MYSQL_NUM)) { > > $a++; > > } > > $sql = " page WHERE page_is_redirect > 0;"; > > $result = mysql_query($sql); > > > > $c = 0; > > while ($resuld = mysql_fetch_array($result, MYSQL_NUM)) { > > $c++; > > } > > $sql = " page WHERE page_len = 5;"; > > $result = mysql_query($sql); > > > > $d = 0; > > while ($resuld = mysql_fetch_array($result, MYSQL_NUM)) { > > $d++; > > } > > $summe = $a + $b; > > $summe -= $c + $d; > > ?> > > This code is working allright, but I don't know where to place it. Must I > > put it to initStats.inc in the maintenance-folder, or in > > SpecialStatistics.php? > > Please help me!! :-( > > > > > Just change $wgContentNamespaces < > http://www.mediawiki.org/wiki/Manual:$wgContentNamespaces>. > _______________________________________________ > MediaWiki-l mailing list > MediaWiki-l[at]lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l > --- original Nachricht Ende ---- Thank you, but I want to count all pages with a size bigger than 5 Bytes (because of the redirecting-template Unbegrenzter Speicher, Top-Spamschutz, 120 SMS und eigene E-MailDomain inkl. http://office.freenet.de/dienste/emailoffice/produktuebersicht/power/mail/index.html _______________________________________________ MediaWiki-l mailing list MediaWiki-l[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
|