Quote:
Originally Posted by Mist
You'll need to edit the part of functions.php.
A start:
PHP Code:
if($bbuserinfo['storep'] < 100)
{
$userstars = '<img src="{imagesfolder}/1stars.gif" border="0" alt="" />';
}
It would probably be easiest to do it with a switch statement but hey 
|
Mist, $bbuserinfo['storep'] will display the points of the user wich is viewing the post (you) and not the points of the author of the post.
Big J, open admin/functions.php and find:
PHP Code:
eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";");
Add after it:
PHP Code:
if ($post[storep]<100) {
$post[storestar] = "<img src=\"images/stars/1.gif\" border=\"0\">";
} elseif ($post[storep]<200) {
$post[storestar] = "<img src=\"images/stars/2.gif\" border=\"0\"><img src=\"images/stars/2.gif\" border=\"0\">";
} elseif ($post[storep]<300) {
$post[storestar] = "<img src=\"images/stars/3.gif\" border=\"0\"><img src=\"images/stars/3.gif\" border=\"0\"><img src=\"images/stars/3.gif\" border=\"0\">";
} elseif ($post[storep]<400) {
$post[storestar] = "<img src=\"images/stars/4.gif\" border=\"0\"><img src=\"images/stars/4.gif\" border=\"0\"><img src=\"images/stars/4.gif\" border=\"0\"><img src=\"images/stars/4.gif\" border=\"0\">";
} elseif ($post[storep]<500) {
$post[storestar] = "<img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\">";
} elseif ($post[storep]<600) {
$post[storestar] = "<img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\">";
} elseif ($post[storep]<700) {
$post[storestar] = "<img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\">";
}
Play with it. Put $post[storestar] in your postbit template to display the stars.