Extension:Hierachy of categories/ja

This extension gives an overview about the root, currently 4 levels of sub and the incorrectly (cycles creating) categorized items. In addition the number of associated pages are given.

ソース
copy the following to extensions/Hierachy.php and extensions/SpecialHOC.php respectively

moreover, add the following to lines to your LocalSettings.php:

SpecialHOC.php
';

// legend $out .= ' '; $wgOut->addHTML($out); }

function getBoxText($cat, $color, $art, $subcat) { $info = ''. str_replace('_', ' ', $cat). ''; if ($art != -1) $info .= ' Articles: '. $art; if ($subcat != -1) $info .= ' Subcategories: '. $subcat; return $info. ' ';		 }

function getList($cat, $level, $err = array) { $Hrch = new Hierachy; $sc = $Hrch->getSubCategories($cat); $list[] = array("name" => $cat, "level" => $level, "article" => $Hrch->getNumberOfSubpages($cat) - count($sc), "subcategories" => count($sc));

foreach ($sc as $item) { if (in_array($item, $err)) $list[] = array("name" => $item, "level" => "-1", "article" => -1, "subcategories" => -1); else $list = array_merge($list, $this->getList($item, $level + 1, array_merge($err, array($item)))); }			return $list; }       }        SpecialPage::addPage( new HOC ); $wgMessageCache->addMessage('hoc' ,'Hierachy of Categories'); }