Rosetta Code:Village Pump/Unimplemented tasks: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 9:
::I think there's a wiki variable you can add to [[Template:unimpl_header]] for that. --[[User:Short Circuit|Short Circuit]] 17:38, 16 February 2009 (UTC)
 
'''I think that using bots isn't good, it's better try to use a PHP Script. Taketo adisplay look at my code:unimplemented tasks.''' --[[User:Guga360|Guga360]] 21:56, 16 February 2009 (UTC)
 
--[[User:Guga360|Guga360]] 21:58, 16 February 2009 (UTC)
<lang>
<?
if (!isset($_GET['lang'])) die("Language not specified.");
$lang = $_GET['lang'];
 
function categorytitles($category) {
$titlesarr = array();
$titles = unserialize(file_get_contents("http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:$category&cmlimit=500&format=php"));
$titles = $titles['query']['categorymembers'];
foreach ($titles as $i) {
array_push($titlesarr, $i['title']);
}
return $titlesarr;
}
 
$alltasks = categorytitles("Programming_Tasks");
$langtasks = categorytitles($lang);
$notimplemented = array_diff($alltasks, $langtasks);
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 
<html>
 
<head>
<title>Not implemented tasks in <? echo $lang; ?> </title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
 
<body>
 
<div class="title">
Not implemented tasks in <? echo $lang; ?>:
<br>
</div>
 
<div class="list">
<ul>
<?
foreach ($notimplemented as $i) {
?>
<li><span class="item"><? echo $i; ?></span></li>
<?
}
?>
</ul>
</div>
</body>
</html>
</lang>
Anonymous user