Hallo Forumnutzer!
Statt der normalen topuser.php aus dem Forum kann man mit diesem Script nach neun verschiedenen Zählern diverser PScripts sortieren lassen.
Viel Spaß damit!
Thomas
$boardname - Toplist\";
$sort=$_GET[sort];
if ($sort==\"\") $sort=\"posts\";
//############ Toplist anzeigen ##########################
echo \"
\";
?>
Forum: Bestes Karma
Forum: Meiste Posts
Forum: Meiste eröffneten Threads
Forum: Meistgesehenste Threads
Forum: Größte Threads
Abstimmung: Häufigste Meinung
Links: Meistgeklickte Links
Links: Beste Links
Bilder: Beste Fotos
Die $topuser Top-$sort in $boardname
\";
if ($sort==\"karma\") {
$sqlbefehl= \"Select * FROM $tab_user where karma!=0 order by karma desc limit $topuser\";
$topbezeichnung=\"nickname\";
$topkriterium=\"karma\";
}
if ($sort==\"posts\") {
$sqlbefehl= \"Select * FROM $tab_user order by postcount desc limit $topuser\";
$topbezeichnung=\"nickname\";
$topkriterium=\"postcount\";
}
if ($sort==\"thread\") {
$sqlbefehl = \"Select u.id,u.nickname,u.email,u.usertyp,u.showemail,
Count(t.userid) as postcount
From $tab_user u
Left Join $tab_thread t on t.userid=u.id
Group By u.nickname Order By postcount Desc limit $topuser\";
$topbezeichnung=\"nickname\";
$topkriterium=\"postcount\";
}
if ($sort==\"angezeigt\") {
$sqlbefehl= \"Select * FROM $tab_thread order by count desc limit $topuser\";
$topbezeichnung=\"titel\";
$topkriterium=\"count\";
}
if ($sort==\"hottest\") {
$sqlbefehl= \"Select * FROM $tab_thread order by postcount desc limit $topuser\";
$topbezeichnung=\"titel\";
$topkriterium=\"postcount\";
}
if ($sort==\"votes\") {
$sqlbefehl= \"Select * FROM \".$tabpref.\"poll_data order by votes desc limit $topuser\";
$topbezeichnung=\"auswahl\";
$topkriterium=\"votes\";
}
if ($sort==\"linkscount\") {
$sqlbefehl= \"Select * FROM \".$tabpref.\"pl_links order by counter desc limit $topuser\";
$topbezeichnung=\"titel\";
$topkriterium=\"counter\";
}
if ($sort==\"linksvote\") {
$sqlbefehl= \"Select * FROM \".$tabpref.\"pl_links order by votepunkte desc limit $topuser\";
$topbezeichnung=\"titel\";
$topkriterium=\"votepunkte\";
}
if ($sort==\"bildvote\") {
$sqlbefehl= \"Select * FROM \".$tabpref.\"pi_bild order by votepunkte desc limit $topuser\";
$topbezeichnung=\"titel\";
$topkriterium=\"votepunkte\";
}
$gettop = mysql_query($sqlbefehl, $serverid);
echo mysql_error($serverid);
$toprang = 1;
while ( $top = mysql_fetch_array($gettop)) {
if ($tdclass == \"odd\") {
$tdclass=\"even\";
$c_row = $c_even; }
else { $tdclass=\"odd\";
$c_row = $c_odd; }
echo \"
$toprang
\".$top[$topkriterium].\"
\".stripslashes($top[$topbezeichnung]).\"
\";
$toprang++;
}
echo \"\";
echo $d_fuss; require(\"fuss.php\");
?>
hab das ma bissel ausgebaut ... müsst nur link neu angeben und bissel dem von netAction anpassen da ich bei mir anderen aufbau auf meiner seite hab ...
Auswahl
User: TOP User im Forum
Forum: Meist eröffnete Threads
Bilder: Best Bewertete Fotos
User: Meist besuchte Profile
Forum: Meist gesehenste Threads
Bilder: Meist gesehenste Fotos
User: Zuletzt Online
Forum: Größte Threads
Bilder: Meist Kommentierte Fotos
0
ORDER BY Bewertung DESC, votezahl DESC limit $topuser\";
$ueberschrift=\"Best Bewertete Fotos\";
$link=\"index.php?db=photo&id=\";
$linkwo=\"id\";
$linktitel=\"titel\";
$topbezeichnung=\"Bild\";
$topkriterium=\"Bewertung\";
}
if ($sort==\"bildhits\") {
$sqlbefehl = \"SELECT *
FROM $tab_pibild
WHERE hits > 0
ORDER BY hits DESC limit $topuser\";
$ueberschrift=\"Meist gesehenste Fotos\";
$link=\"index.php?db=photo&id=\";
$linkwo=\"id\";
$linktitel=\"titel\";
$topbezeichnung=\"Bild\";
$topkriterium=\"hits\";
}
if ($sort==\"bildkom\") {
$sqlbefehl = \"SELECT imgid, COUNT( * ) AS kommentare
FROM $tab_pikom
GROUP BY imgid DESC
ORDER BY kommentare DESC limit $topuser\";
$ueberschrift=\"Meist Kommentierte Fotos\";
$link=\"index.php?db=photo&id=\";
$linkwo=\"imgid\";
$linktitel=\"\";
$topbezeichnung=\"Bild\";
$topkriterium=\"kommentare\";
}
echo \"
$ueberschrift
#
$topkriterium
$topbezeichnung
\";
$gettop = mysql_query($sqlbefehl, $serverid);
echo mysql_error($serverid);
$toprang = 1;
while ( $top = mysql_fetch_array($gettop)) {
if ($tdclass == \"odd\") {
$tdclass=\"even\";
$c_row = $c_even; }
else { $tdclass=\"odd\";
$c_row = $c_odd; }
if ($topbezeichnung == \"Bild\") {
//Bild votepunkte/votezahl
$sourcefile= \"photos/org/\".$top[$linkwo].\".jpg\";
$thumbfile = \"photos/thumbs/\".$top[$linkwo].\".jpg\";
if (!file_exists(\"$thumbfile\")) {
@CreateImage($thumb_size,$sourcefile,$thumbfile,$thumb_border);
}
echo \"
$toprang
\".$top[$topkriterium].\"
\";
}
elseif ($sort == \"useronline\") {
echo \"
$toprang
\".date(\"d.m.Y, H:i\",$top[$topkriterium]).\"
$top[$linktitel]
\";
}
else {
echo \"
$toprang
\".$top[$topkriterium].\"
$top[$linktitel]
\";
}
$toprang++;
}
echo \"
\";
?>
Vielleicht kann man die Reihungen selbst auch noch verlinken? Wäre sinnvoll, wenn ich zb gleich direkt das beste Foto sehen wollen würde, oder in den größten Thread wechseln.