In light of religious terrorist attacks in Paris, please see Category:blasphemy!

Freedom Porn:free technology/CategoryBrowser

From Freedom Porn
Jump to: navigation, search

You will need too turn on $wgUseCategoryBrowser in your LocalSettings.php.

Changes

To make the browser more logical, you will need to edit includes/Skin.php and change drawCategoryBrowser function to the following:

        function drawCategoryBrowser( $tree, $children="" ) {
                $return = '';
 
                $first=true;
                foreach ( $tree as $element => $parent ) {
                        # add our current element to the list
                        $eltitle = Title::newFromText( $element );
                        $current =  Linker::link( $eltitle, $eltitle->getText() );
                        if($first==false)
                        {
                                $return .= "$children";
                        }
 
                        if ( empty( $parent ) ) {
                                # element start a new list
                                $return .= "\n";
                        } else {
                                # grab the others elements
                                $return .= $this->drawCategoryBrowser( $parent, ' ⇒ '.$current ) . ' ⇒ ';
                        }
                        $return .=$current;
                        $first=false;
                }
 
                return $return;
        }