PDA

View Full Version : Freddie's simple stars hack in 2.03


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

wacnstac
11-23-2001, 08:37 PM
Will this simply not work with 2.03 or 2.21? If not can anyone suggest another simple stars hack that will and that is similar to this one? I don't really need any of these complex stars hacks that I have seen floating around in these hacks forums lately.

Lesane
11-24-2001, 06:57 AM
I use this one on my board (2.0.3):
http://vbulletin.org/forum/showthread.php?s=&threadid=19081&highlight=stars

Its not really complex ;)