Subu1
26.12.2002, 02:36
Um einen Statistik balken in der Postbit zu bekommen, muß ich laut diesem Hack die Showthread.php verändern. Nur wenn ich das genau so mache steht der Balken mittig im Fenster.
Kann ich den nicht austauschen und Ihn an einer anderen Stelle wieder einsetzen, damit er ganz unten steht?
hier mal der Hack:
This hack was requested by SgtSling.
This is a very simple hack that displays the PM statistics of a user in the thread view screen. It requires no template modifications because it appends itself on to $post[posts]. ;)
Here is how to implement this hack.
In showthread.php look for the following code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$postbits .= getpostbit($post);
}
And replace it with the following:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$pmcount=$DB_site->query_first("select count(*) as msgs from privatemessage where userid = $post[userid]");
$pmratio = 100 * $pmcount[msgs] / $pmquota;
if($pmratio > 100) {
$pmratio = 100;
}
$pmstats = "<p><font face=\"verdana\" size=\"1\">PM Stats:</font><br>";
$pmstats = "$pmstats<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"80%\" bordercolor=\"#000000\" bordercolorlight=\"#000000\" bordercolordark=\"#000000\"><tr><td bgcolor=\"#b5b5b5\"><img src=\"images/polls/bar3.gif\" width=\"$pmratio%\" height=\"9\"></td></tr></table>";
$pmstats = "$pmstats\n$pmcount[msgs]/$pmquota";
$post[posts]="$post[posts]$pmstats";
$postbits .= getpostbit($post);
}
und hier wie es aussieht: http://www.eselsreiter.net/board/showthread.php?threadid=1872
grüße subu1, mag nicht mehr knobeln *g*, wäre schön wenn Ihr eine Lösung hättet.
Kann ich den nicht austauschen und Ihn an einer anderen Stelle wieder einsetzen, damit er ganz unten steht?
hier mal der Hack:
This hack was requested by SgtSling.
This is a very simple hack that displays the PM statistics of a user in the thread view screen. It requires no template modifications because it appends itself on to $post[posts]. ;)
Here is how to implement this hack.
In showthread.php look for the following code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$postbits .= getpostbit($post);
}
And replace it with the following:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$pmcount=$DB_site->query_first("select count(*) as msgs from privatemessage where userid = $post[userid]");
$pmratio = 100 * $pmcount[msgs] / $pmquota;
if($pmratio > 100) {
$pmratio = 100;
}
$pmstats = "<p><font face=\"verdana\" size=\"1\">PM Stats:</font><br>";
$pmstats = "$pmstats<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"80%\" bordercolor=\"#000000\" bordercolorlight=\"#000000\" bordercolordark=\"#000000\"><tr><td bgcolor=\"#b5b5b5\"><img src=\"images/polls/bar3.gif\" width=\"$pmratio%\" height=\"9\"></td></tr></table>";
$pmstats = "$pmstats\n$pmcount[msgs]/$pmquota";
$post[posts]="$post[posts]$pmstats";
$postbits .= getpostbit($post);
}
und hier wie es aussieht: http://www.eselsreiter.net/board/showthread.php?threadid=1872
grüße subu1, mag nicht mehr knobeln *g*, wäre schön wenn Ihr eine Lösung hättet.