Template talk:Pagecount

-
Jump to: navigation, search

Usage is: {{pagecount|xx}} to display the number of content pages for language code xx.

Hey, kids!

You can generate this completely useless template in your own home by following this li'l recipe:

<?php
$wiki = array(
	"af" => "http://af.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ar" => "http://beidipedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ast" => "http://nunyepedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"bar" => "http://stupidedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"be" => "http://be.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"bg" => "http://bg.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"bn" => "http://bn.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"bs" => "http://bs.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ca" => "http://valenciclopedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"cs" => "http://necyklopedie.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"cy" => "http://cy.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"da" => "http://spademanns.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"dlm" => "http://dlm.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"de" => "http://de.uncyclopedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"el" => "http://anegkyklopaideia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"en" => "http://en.uncyclopedia.co/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"eo" => "http://neciklopedio.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"es" => "http://inciclopedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"et" => "http://et.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"fa" => "http://fa.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"fi" => "http://hikipedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"fo" => "http://fo.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"fr" => "http://desencyclopedie.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"fy" => "http://fy.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ga" => "http://ga.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"gl" => "http://desgalipedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"got" => "http://got.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"grc" => "http://grc.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"he" => "http://eincyclopedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"hr" => "http://hr.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"hu" => "http://unciklopedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"hy" => "http://hy.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"id" => "http://tolololpedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ie" => "http://ie.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"is" => "http://is.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"io" => "http://io.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"it" => "http://nonciclopedia.miraheze.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ja" => "http://ja.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"jv" => "http://ndhablek.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ka" => "http://ka.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"km" => "http://km.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ko" => "http://uncyclopedia.kr/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"la" => "http://la.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"lb" => "http://lb.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"li" => "http://li.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"lo" => "http://lo.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"lt" => "http://lt.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"lv" => "http://lv.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"meta" => "http://meta.uncyclomedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"mg" => "http://mg.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"mk" => "http://mk.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"mn" => "http://mn.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"mo" => "http://mo.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ms" => "http://ms.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"mwl" => "http://mwl.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"nds" => "http://kamelopedia.mormo.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"nl" => "http://oncyclopedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"nn" => "http://nn.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"no" => "http://no.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"oc" => "http://oc.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"pl" => "http://nonsensopedia.miraheze.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"pt" => "http://pt.desciclopedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ro" => "http://ro.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ru" => "http://absurdopedia.net/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"ryu" => "http://ansaikuropedia.miraheze.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"sco" => "http://sco.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"simple" => "http://simple.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"sk" => "http://necyklopedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"sl" => "http://sl.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"sr" => "http://sr.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"su" => "http://su.goblogpedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"sv" => "http://sv.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"th" => "http://th.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"tl" => "http://pekepedia.net/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"tlh" => "http://tlh.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"tr" => "http://tr.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"uk" => "http://uk.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"vls" => "http://vls.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"yi" => "http://keinziklopedie.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"yue" => "http://yue.uncyclopedia.info/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"zea" => "http://zea.oncyclopedia.org/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"zhcn" => "http://zh.uncyclopedia.wikia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"zhhk" => "http://uncyclopedia.hk/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"zhtw" => "http://uncyclopedia.tw/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"zombie" => "http://zombie.pedia.ws/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"illogic-en" => "http://en.illogicopedia.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"illogic-fr" => "http://fr.illogicopedia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"illogic-ja" => "http://newusopedia.miraheze.org/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"illogic-nl" => "http://nl.illogicopedia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"illogic-no" => "http://no.illogicopedia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php",
	"illogic-pt" => "http://pt.illogicopedia.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=php");
 $stats = array();
 print "{{-start-}}<noinclude>\n'''Template:Pagecount'''\nPagecount statistics for each language wiki xx, invoke using: {{pagecount|xx}}\n</noinclude>";
 print "{{#switch: {{{1}}}\n";
 foreach ($wiki as $wiki => $url) 
        {
         $handle = fopen( $url, "r");
         $stat=fgets($handle);fclose($handle);
         $stat=substr($stat,strpos($stat,'"articles";i:')+13);
         $stats[$wiki]=substr($stat,0,strpos($stat,";"));
         print " | " . $wiki . " = " . $stats[$wiki] . "\n";
        }
 print " | updated = " . date("F j, Y") . "\n";
 print "}}\n";
 print "{{-stop-}}\n";
?>

See also

wtf

It doesnt seem to be working; .pt has over 3900 articles and it says 3700 in Main Page =S Mafagafo 20:07, 14 February 2007 (EST)

Main Page currently has 54951 brazillion pages as the size for pt: - which is huge. That's not counting any pages which have been eaten by mafagafos. --Carlb 13 December 2018 (DOA)