$beginwaarde = 0;
$eindwaarde = 1001;
$postidarray = array();
$arrayteller = "0";
$select = "select * from wp_posts";
$query = mysql_query($select);
$records = mysql_num_rows($query);
while ($list = mysql_fetch_object($query)) {
if(substr($list->post_title, 0, 1) == “#”) {
$uitslagposttitle = substr($list->post_title, 1, 3);
if($uitslagposttitle > $beginwaarde and $uitslagposttitle < $eindwaarde) {
// $postidarray[$uitslagposttitle] = $list->ID; // echo $uitslagposttitle; echo “
“;
$postauthorarray[$uitslagposttitle] = $list->post_author; // echo $uitslagposttitle; echo “
“;
//$arrayteller++;
}
}
}
$authorarrayteller = “0”;
$authorselect = “select * from wp_users”;
$authorquery = mysql_query($authorselect);
$authorrecords = mysql_num_rows($authorquery);
while ($authorlist = mysql_fetch_object($authorquery)) {
$author = $authorlist->display_name;
$authorid[$author] = $authorlist->ID;
//echo $authorid[$author]; echo $author; echo “
“;
}
$bijdragenarray = array();
$aantalid = count($postauthorarray);
//echo $aantalid;
$aantalauthor = count($authorid);
foreach ($authorid as $auteur => $auteurnummer) {
// echo $auteur; echo “
“;
//$bijdragenarray[$auteur] = “0”;
foreach ($postauthorarray as $postnummer => $auteurnummer2) {
if ($auteurnummer == $auteurnummer2) {
$bijdragenarray[$auteur]++;
// echo $postnummer; echo $auteurnummer2; echo “
“;
}
}
// echo $bijdragenarray[$auteur]; echo “
“;
}
if(isset($bijdragenarray)) {
arsort($bijdragenarray);
}
echo “
$teller. | $naamarray[$teller] “; } else { if ($scorearray[$teller] == $scorearray[$teller-1]) { echo “, $naamarray[$teller] “; } else { echo ” |
“; echo $scorearray[$teller-1]; echo “ |
“; echo $teller; echo “. |
$naamarray[$teller] “; } } } echo ” |
“; echo $scorearray[$teller]; echo “ |
“;
//echo “Totaal $aantalposts punten”;
?>
Met nog wat kleine bugs en natuurlijk nog niet alle hoezen geplaatst !