miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Photo album addon for miniBB Attract your miniBB-community, letting members publish their own photos with the Photo album add-on!
News & Announcements miniBB Community Forum / News & Announcements /
Short link for this topic:

Custom rankings solution added

 Page Page 1 of 2:  1  2  »» 
Author Team
8-)
#1 | Posted: 5 Oct 2005 10:42
Custom ranks solution, based on built-in miniBB functionality, displays custom ranks based on posts number, in each post. For example, having 1-100 posts user is "Newbie", 300-600 - "Advanced", 600-1000 - "Prof." etc. Ranks will be displayed near each post (for example, under Nickname). Created as sponsored feature for Alfaspace - you may see it in action on our forthcoming test forums provided by Virtualis.
Author RaptOr
Forums Member
#2 | Posted: 5 Oct 2005 23:03
I wanna do this:

If somebody have wrote 10 posts, he get's one point. 20 - 2 point's etc.?

It should look like this:

RaptOr
Member

(avatar)

Points: 4

please help, very important!
Author Gluek
Forums Member
#3 | Posted: 6 Oct 2005 01:57
Use images instead text rank:

function parseUserInfo_num_posts($val){
if($GLOBALS['action']=='userinfo') return $val-$GLOBALS['row'][10];
else{
$pip="<img src=\"img/pip.gif\" border=\"0\" alt=\"*\">";
if($val>=1 and $val<=10) $rank=$pip;
elseif($val>10 and $val<=50) $rank=$pip.$pip;
elseif($val>50 and $val<=100) $rank=$pip.$pip.$pip;
elseif($val>100 and $val<=500) $rank=$pip.$pip.$pip.$pip;
elseif($val>200) $rank=$pip.$pip.$pip.$pip.$pip;
else $rank=0;
return '<span class=txtSm>'.$rank.'</span>';
}
}
Author Team
8-)
#4 | Posted: 6 Oct 2005 09:51
to RaptOr

function parseUserInfo_num_posts($val){
if($GLOBALS['action']=='userinfo') return $val-$GLOBALS['row'][10];
else{
$rank=floor($val/10);
return '<span class=txtSm>'.$rank.' Points</span>';
}
}
Author _Marco
Forums Member
#5 | Posted: 6 Oct 2005 10:14
That seems easy :-)

_Marco
Author RaptOr
Forums Member
#6 | Posted: 6 Oct 2005 12:39 | Edited by: RaptOr
:o it works ! Thanks!
Author qqqqqq
Forums Member
#7 | Posted: 9 Oct 2005 20:03
i allready installed this script on my forum but how can i make this:

when user is a newbie there is small icon under his name

when user is a advanced there are 2 small icons under his name
----
-
----
-
when user is a writer for living there are 5 small icons under his name
Author Team
8-)
#8 | Posted: 10 Oct 2005 09:52
So, depends on what do you mean by "newbie" and "advanced". If this is what we have in our default solution, then:

function parseUserInfo_num_posts($val){
if($GLOBALS['action']=='userinfo') return $val-$GLOBALS['row'][10];
else{
$img="URL_TO_YOUR_IMAGE/icon.gif";
if($val>=1 and $val<=300) $rank='newbie<br />'.$img;
elseif($val>300 and $val<=600) $rank='advanced'.$img.$img;
elseif($val>600 and $val<=1000) $rank='prof.';
elseif($val>1000 and $val<=1500) $rank='writing for living';
elseif($val>1500) $rank='writer forever';
else $rank='';
return '<span class=txtSm>'.$rank.'</span>';
}
}

Use your imagination...
Author qqqqqq
Forums Member
#9 | Posted: 12 Oct 2005 00:15 | Edited by: qqqqqq
this is my code

/* Custom ranks function */
//1-50 - Tek dosao
//50-100 - Ponekad navrati
//100-200 - Bronzani clan
//200-400 - Srebreni clan
//400+ - Zlatni clan

function parseUserInfo_num_posts($val){
if($GLOBALS['action']=='userinfo') return $val-$GLOBALS['row'][10];
else{
$img="localhost/mini/img/icon.gif";
if($val>=1 and $val<=50) $rank='Tek dosao<br />'.$img;
elseif($val>50 and $val<=100) $rank='Ponekad navrati'.$img.$img;
elseif($val>100 and $val<=200) $rank='Bronzani clan'.$img.$img.$img;
elseif($val>200 and $val<=400) $rank='Srebreni clan'.$img.$img.$img.$img;
elseif($val>400) $rank='Zlatni clan'.$img.$img.$img.$img.$img;
else $rank='';
return '<span class=txtSm>'.$rank.'</span>';
}
}


but it is not working i put ran image in my img directory
Author qqqqqq
Forums Member
#10 | Posted: 12 Oct 2005 00:23 | Edited by: qqqqqq
i fixed it
Author Team
8-)
#11 | Posted: 12 Oct 2005 10:44
I am wondering why you guys are missing up the terms URL and PATH. URL_TO_YOUR_IMAGE - begins with HTTP: // !!!
Author Jamieg285
Forums Member
#12 | Posted: 2 Feb 2006 12:06
Is it possible to show the users post count and their rank? This solution appears to replace the count with rank.

My PHP isn't good enough to work out how to do both.
Author Team
8-)
#13 | Posted: 2 Feb 2006 12:10
This is possible of course... in default solution, you just need to concatenate $rank with $val. For example:

$rank='newbie'

replace to

$rank='newbie'.$val

or to

$rank='newbie ('.$val.')'

if you want amount of posts listed in parentheses.
Author Jamieg285
Forums Member
#14 | Posted: 3 Feb 2006 22:22
So simple, but so effective.

Thanks Team
Author coco
Forums Member
#15 | Posted: 13 Nov 2006 14:58
$rank='newbie'

replace to

$rank='newbie'.$val



This does not work in my case. Can you help me please.
I think that the problem is in main_posts_cell.

thank you
 Page Page 1 of 2:  1  2  »» 
News & Announcements miniBB Community Forum / News & Announcements / Custom rankings solution added Top
Your Reply Click this icon to move up to the quoted message

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
miniBB Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts