A list of Mediawikis using the $shortname extension

"; echo << idname FNORD; while($row = mysql_fetch_assoc($result)) { if (!empty($row['mainurl'])) $url=$row['mainurl']; else { $url=explode("S",$row['statsurl']); $url=$url[0]; } echo "".$row['id']."".$row['name'].""; } } elseif (isset($_GET["name"])) { $name=mysql_escape_string($_GET["name"]); $query="SELECT id from extensions where shortname='$name';"; $result=mysql_query($query) or die("Sorry, i didnt find the extension name '$name'."); if (mysql_num_rows($result)==0) die("Sorry, i didnt find the extension name '$name'."); $id=mysql_fetch_row($result); $id=$id[0]; $query="SELECT DISTINCT mediawikis.name,mediawikis.id,mediawikis.mainurl,mediawikis.statsurl from mediawikis,mediawikis_extensions WHERE mediawikis_extensions.mediawikis_id=mediawikis.id AND mediawikis_extensions.extensions_id=$id;"; $result=mysql_query($query); echo "

A list of Mediawikis using the $name

"; echo << idname FNORD; while($row = mysql_fetch_assoc($result)) { if (!empty($row['mainurl'])) $url=$row['mainurl']; else { $url=explode("S",$row['statsurl']); $url=$url[0]; } echo "".$row['id']."".$row['name'].""; } } else { $query="SELECT id,shortname from extensions;"; $result=mysql_query($query) or die; echo "

All Mediawiki extensions listed on mediawiki.org

Click the X in the \"used by\"-column to find out which Wikis actually use this extension.

"; echo << idname FNORD; while($row = mysql_fetch_assoc($result)) { $url="http://www.mediawiki.org/wiki/".$row['shortname']; echo "".$row['id']."".$row['shortname']."X"; } } echo ""; /* $query = "SELECT family.Position, food.Meal ". "FROM family LEFT JOIN food ". "ON family.Position = food.Position"; */ /* mysql_connect("localhost", "grewes", "3572horse") or die(mysql_error()); mysql_select_db("wikidb"); $query="SELECT * from extensions"; $result=mysql_query($query); $extensions=array(); while($row = mysql_fetch_array($result)) { $extensions[$row['shortname']]=$row['id']; } mysql_close(); $wiki_results=array(); foreach($wikis as $wiki) { $tmp=array(); foreach($wiki[1] as $wikiextension) { array_push($tmp,$extensions[$wikiextension]); } array_push($wiki_results,array($wiki[0],$tmp)); } foreach($wiki_results as $wiki_result) { foreach($wiki_result[1] as $wiki_extension) { echo "INSERT INTO mediawikis_extensions (mediawikis_id,extensions_id) VALUES (".$wiki_result[0].",".$wiki_extension.");\n"; } } /* Array ( [0] => Array ( [0] => 12 [1] => Array ( [0] => 154 [1] => 1087 [2] => 1137 [3] => 154 [4] => 299 [5] => 299 [6] => 1262 [7] => 546 [8] => 599 [9] => 857 [10] => 921 [11] => 990 [12] => 299 [13] => 202 [14] => 476 ) ) */ ?>