Yearstar MOD
Verfasst: 19.12.2005 18:00
Der MOD bewirkt, dass man bei bestimmten Beitragszahlen eine bestimmte Anzahl an Sternchen kriegt.
Als Ausnahme, soll man aber als Admin alle Sterne (hierbei 12) bekommen. Klappt jedoch nicht!
Wo ist der Fehler?
Als Ausnahme, soll man aber als Admin alle Sterne (hierbei 12) bekommen. Klappt jedoch nicht!
Wo ist der Fehler?
Code: Alles auswählen
// Generate the yearstars code
//
// Change $minposts to reflect the minimum number of posts before the stars
// will show up.
$yearstars = '';
if($postrow[$i]['user_posts'] < 50){
$years=1;
}
elseif($postrow[$i]['user_posts'] < 100){
$years=2;
}
elseif($postrow[$i]['user_posts'] < 150){
$years=3;
}
elseif($postrow[$i]['user_posts'] < 200){
$years=4;
}
elseif($postrow[$i]['user_posts'] < 250){
$years=5;
}
elseif($postrow[$i]['user_posts'] < 300){
$years=6;
}
elseif($postrow[$i]['user_posts'] < 400){
$years=7;
}
elseif($postrow[$i]['user_posts'] < 500){
$years=8;
}
elseif($postrow[$i]['user_posts'] < 600){
$years=9;
}
elseif($postrow[$i]['user_posts'] < 700){
$years=10;
}
elseif($postrow[$i]['user_posts'] < 800){
$years=11;
}
else{
$years=12;
}
if($postrow[$i]['user_level'] != ADMIN){
for ( $y=0 ; $y<$years ; $y++ )
{
$yearstars .= '<img src="' . $images[year_star_gold] . '">';
}
$yearstars .= '<br />';
}
else{
$yearstars .= '
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">
<img src="' . $images[year_star_gold] . '">';
$yearstars .= '<br />';
}