Extension:CategoryLink

This extensions adds the ability to create a two column table of categories to a wiki site. It creates a link to each category

This extension can be used as such:

Examples of CategoryLinks
Currently not available

Related Extensions

 * Extension:CategoryTree can also produce a category list, but with a different appearance and more/different options.

Source Code
 'Category Links', 'author' => 'Kyle van der Meer', 'url' => 'http://www.mediawiki.org/wiki/Extension:CategoryLink#Source_Code', 'description' => 'Displays a two column table of categories.',);

function registercategorylinks { global $wgParser; $wgParser->setHook('categorylinks', 'printcategorylinks'); }

function printcategorylinks { $link = mysql_connect('host', 'user', 'password') or die('Could not connect: ' . mysql_error); mysql_select_db('database_name') or die('Could not select database'); $query = 'SELECT cl_to FROM categorylinks group by cl_to'; $result = mysql_query($query) or die('Query failed: ' . mysql_error); $num_rows = mysql_num_rows($result); while($num_row = mysql_fetch_array($result)) { $data[] = $num_row['cl_to']; }		$args .= " "; return (.$args.); } ?>

--Kyle van der Meer 17:10, 2 August 2007 (UTC)