Topic: Ranks w/ stars ?
You know, new member will have 1 star, active 2, addicted 3 etc..
Is there a mod like this for punbb ?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Ranks w/ stars ?
You know, new member will have 1 star, active 2, addicted 3 etc..
Is there a mod like this for punbb ?
There is a french guy who coded something like that.
Go to to PunBB.fr to see the code,
and to CtrlAltSuppr.com to view the demo.
Didn't understand exactly what to do..
Can anyone please translate it for me ?
Thanks in Advance !
btw, that forum (CtrlAltSuppr.com) is amazing! didn't know you can make punbb look like this...
I talked with the mod creator (Ju) very nice person!
and he told me what to do..
this is the mod:
open "viewtopic.php"
find:
$post_count++;
$user_avatar = '';
$user_info = array();
$user_contacts = array();
$post_actions = array();
$is_online = '';
$signature = '';
// If the poster is a registered user.
if ($cur_post['poster_id'] > 1)
{
after add:
$rank_pips = "";
if($cur_post['num_posts'] > 5000) { $num_pips = 10; }
elseif($cur_post['num_posts'] > 3000) { $num_pips = 9; }
elseif($cur_post['num_posts'] > 2000) { $num_pips = 8; }
elseif($cur_post['num_posts'] > 1000) { $num_pips = 7; }
elseif($cur_post['num_posts'] > 500) { $num_pips = 6; }
elseif($cur_post['num_posts'] > 300) { $num_pips = 5; }
elseif($cur_post['num_posts'] > 100) { $num_pips = 4; }
elseif($cur_post['num_posts'] > 50) { $num_pips = 3; }
elseif($cur_post['num_posts'] > 10) { $num_pips = 2; }
else { $num_pips = 1; }
for($pip=0; $pip<$num_pips; $pip++) {
$rank_pips .= '<img src="img/pip.gif" alt="" />';
}
Find:
<dl>
<dt><strong><?php echo $username ?></strong></dt>
<dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
After, add :
<?php echo "<dd class=\"usertitle\">".$rank_pips."</dd>\n"; ?>
Save viewtopic.php and upload (overwrite)
I didn't creat this mod... all the credit goes to "Ju" !
added to the punres wiki http://punres.org/doku.php?id=how-tos:adding_rank_icons
there should be a default image supplyed with it for those who are graphicaly challanged (and lazy)
there should be a default image supplyed with it for those who are graphicaly challanged (and lazy)
lol
there should be a default image supplyed with it for those who are graphicaly challanged (and lazy)
Which one takes precidence? graphically challenged or lazy? j/j.
BTW Love the Michael Savage Quote.
shinko_metsuo wrote:there should be a default image supplyed with it for those who are graphicaly challanged (and lazy)
Which one takes precidence? graphically challenged or lazy? j/j.
BTW Love the Michael Savage Quote.
for me its lazyness (I took the red IF ones)
Micheal Savage ownz w00t!
added to the punres wiki http://punres.org/doku.php?id=how-tos:adding_rank_icons
The last step needs changed to
<?php echo "<dd class=\"usertitle\">".$rank_pips."</dd>\n"; ?>
else it gives a parse error.
Here's a little star if anybody wants it.
Ok, the programming part is solved...now we just need some good rank images...
If anyone has any good likes, please share them...
This image is from Proboards -> http://4d5.net/boardimages/star.gif
<?php echo "<dd class=\"usertitle\">".$rank_pips."</dd>\n"; ?>
else it gives a parse error.
weird i did not get any error
I did when I used the one from punres because the double quotes weren't escaped.
You can use this special character ? , but I'm afraid iexplorer doesn't likes it
You can use this special character ? , but I'm afraid iexplorer doesn't likes it
works in my IE6 at least...
simkin wrote:You can use this special character ? , but I'm afraid iexplorer doesn't likes it
works in my IE6 at least...
Ok, good to know then. When I tested it, ie wasn't showing this character, but could be caused by the OS.
I've Installed this little mod, and seems there is some kind of problem with the rank of guests. They were getting more rank than the members. I didn't know how to solve this, so I moved the rank bar to the bottom of the user info, together with post count, and this way the rank is not being displayed for guests. ^^
Hello. I had the same problem, but now everything is working OK. Thank you.
What if... im the admin and i decide to give all the stars to mods and admins without the need to the post counter?.
thank you in advance.
I've made some pips you may use. You can download the files here:
http://punres.org/files.php?pid=98
This is what you're getting (separate of course):
if you wana update your ranks, you have to update it in the options and than change the code, maybe there should be a way to rank set up thats in the database, like adding an option like how many pips do you to show with each rank
i have this error. please help me resolve it... thanks in advance
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Xitami\xxx\_forums\viewtopic.php on line 363
Just for style/redability reasons, this here
after add:
$rank_pips = ""; if($cur_post['num_posts'] > 5000) { $num_pips = 10; } elseif($cur_post['num_posts'] > 3000) { $num_pips = 9; } elseif($cur_post['num_posts'] > 2000) { $num_pips = 8; } elseif($cur_post['num_posts'] > 1000) { $num_pips = 7; } elseif($cur_post['num_posts'] > 500) { $num_pips = 6; } elseif($cur_post['num_posts'] > 300) { $num_pips = 5; } elseif($cur_post['num_posts'] > 100) { $num_pips = 4; } elseif($cur_post['num_posts'] > 50) { $num_pips = 3; } elseif($cur_post['num_posts'] > 10) { $num_pips = 2; } else { $num_pips = 1; } for($pip=0; $pip<$num_pips; $pip++) { $rank_pips .= '<img src="img/pip.gif" alt="" />'; }
IMHO should be more like this :
$postct_split = array(10,50,100,300,500,1000,2000,3000,5000);
$pip_img = '<img src="img/pip.gif" alt="" />';
$rank_pips = $pip_img;
foreach($postct_split as $stars) {
if($cur_post['num_posts'] > $stars) { $rank_pips .= $pip_img;}
}
Saves 9 lines of code
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Ranks w/ stars ?
Powered by PunBB, supported by Informer Technologies, Inc.