miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
News miniBB Support Forums / News /  
 

Custom rankings solution added

 
 
Page  Page 1 of 2:  1  2  Next »

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
Partaker
#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
Partaker
#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
Partaker
#5 | Posted: 6 Oct 2005 10:14 
That seems easy :-)

_Marco

Author RaptOr
Partaker
#6 | Posted: 6 Oct 2005 12:39 
:o it works ! Thanks!

Author qqqqqq
Partaker
#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
Partaker
#9 | Posted: 12 Oct 2005 00:15 
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
Partaker
#10 | Posted: 12 Oct 2005 00:23 
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
Partaker
#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
Partaker
#14 | Posted: 3 Feb 2006 22:22 
So simple, but so effective.

Thanks Team

Author coco
Partaker
#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  Next » 
News miniBB Support Forums / News /
 Custom rankings solution added
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑