wacnstac
10-21-2001, 01:15 PM
Ok, I have been using Freddie's simple stars hack going way back. Had it in version 2.01 but can't seem to get it to work in 2.03.
In stars.php:
<?php
// very basic stars hack by freddie
unset($stars);
if ($post[usergroupid]==5 || $post[usergroupid]==6 || $post[usergroupid]==84)
{
// Admin and Supermod Stars
$starsgif = '<img src="images/deer.gif" border=0>';
$stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;
}
else
{
// Everyone else
$starsgif = '<img src="images/deer.gif" border=0>';
if ($post[posts] > 1000)
$stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;
elseif ($post[posts] > 200)
$stars .= $starsgif . $starsgif . $starsgif . $starsgif;
elseif ($post[posts] > 100)
$stars .= $starsgif . $starsgif . $starsgif;
elseif ($post[posts] > 20)
$stars .= $starsgif . $starsgif;
elseif ($post[posts] > 5)
$stars .= $starsgif;
if (!$stars)
$stars = '<br>';
else
$stars .= '<br><br>';
}
?>
In showthread.php
$counter=0;
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
include('stars.php');
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$postbits .= getpostbit($post);
}
and I haven't changed my postbits template yet, it still calls $stars. Yet my stars don't show up. Is there anything in 2.03 that would make this good old reliable hack not work?
Thanks
In stars.php:
<?php
// very basic stars hack by freddie
unset($stars);
if ($post[usergroupid]==5 || $post[usergroupid]==6 || $post[usergroupid]==84)
{
// Admin and Supermod Stars
$starsgif = '<img src="images/deer.gif" border=0>';
$stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;
}
else
{
// Everyone else
$starsgif = '<img src="images/deer.gif" border=0>';
if ($post[posts] > 1000)
$stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;
elseif ($post[posts] > 200)
$stars .= $starsgif . $starsgif . $starsgif . $starsgif;
elseif ($post[posts] > 100)
$stars .= $starsgif . $starsgif . $starsgif;
elseif ($post[posts] > 20)
$stars .= $starsgif . $starsgif;
elseif ($post[posts] > 5)
$stars .= $starsgif;
if (!$stars)
$stars = '<br>';
else
$stars .= '<br><br>';
}
?>
In showthread.php
$counter=0;
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
include('stars.php');
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$postbits .= getpostbit($post);
}
and I haven't changed my postbits template yet, it still calls $stars. Yet my stars don't show up. Is there anything in 2.03 that would make this good old reliable hack not work?
Thanks