miniBB ® 

miniBB

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

Using bb_special's $userRanks

 
 
Page  Page 1 of 2:  1  2  Next »

Author PeKa
Partaker
#1 | Posted: 2 May 2002 14:10 
Hey there,

just a suggestion how to make ranking easier as an admin:

Edit bb_specials.php, directly after <? type:

$Ranks=array("Rank1","Rank2","Rank3","Rank4","Rank5");

And change $userRanks to:

$userRanks=array(1=>$Ranks[0],2=>$Ranks[1],3=>$Ranks[2]
, 4=>$Ranks[2],5 =>$Ranks[1],6=>$Ranks[3],7=>$Ranks[4],8=>$Ranks[3],9=>$Ranks[5],10=>$Ranks[5]);


This means to have an easier way to assign Ranks, as you can put people into groups (Just basic PHP, but helps a lot).

To get to know their ID, search for nothing in 'search users' within your admin panel. It will print out every registered user of your board, with their ID printed in ().

The default rank for everybody can be found in your language file, the variable is named $l_member, nearly at the end of the file.

Just thought this could help somebody ;-)

Author PeKa
Partaker
#2 | Posted: 2 May 2002 14:14 
Sorry, &quo t; is put in by your board, also 4=> ; ; is put in where 4=>$Ranks[2], should be.

maybe you'll have to trim(); everything when parsing by preg_replace?
Strange behaviour

Author Team
8-)
#3 | Posted: 2 May 2002 14:40 
PeKa
Thanks for suggestion, and... yes, that "strange" split of &quot was a need-to-fix bug of a board... we are working on the fix :)

Author Team
8-)
#4 | Posted: 2 May 2002 15:28 
Ok. It seems, now it splits "normally" (of course, for avoiding splits, you have to enter 'spaces' more often :)

We will fix this in next release, for those, who can't wait, here is a solution for more correct words splitting, just replace function warpText() to that:

function wrapText($wrap,$text){
$ft=0;
$exploded=explode(' ',$text);
for($i=0;$i<sizeof($exploded);$i++) {
$str=$exploded[$i];

if (substr_count($str, '<')>0 or substr_count($str, '>')>0 or substr_count($str, '&#')>0 or substr_count($str, '&quot;')>0 or substr_count($str, '&amp;')>0 or substr_count($str, '&lt;')>0 or substr_count($str, '&gt;')>0) $ft=1; else $ft=0;

if (strlen($str)<$wrap and $ft!=0) $dT=TRUE;

if(strlen($str)>$wrap and $ft!=0) {

$sf=FALSE; $qf=0;
$chkPhr=''; $sym=0;
for ($a=0; $a<strlen($str); $a++) {
if ($qf==2) $qf=0;
if ($str[$a]=="\n") { $sym=0; }

if ($str[$a]=='<') { $qf=1; $ft=0; $dT=TRUE; }
elseif ($str[$a]=='>') { $qf=2; $ft=0; $dT=FALSE; }

if ($str[$a]=='&' and isset($str[$a+1]) and ($str[$a+1]=='#' or substr($str,$a+1,4)=='quot' or substr($str,$a+1,3)=='amp') or substr($str,$a+1,2)=='lt' or substr($str,$a+1,2)=='gt') { $sf=TRUE; }
if ($sf and $str[$a]==';') { $sf=FALSE; }

if ($qf>=1 or $dT) {
$chkPhr.=$str[$a];
}
elseif($qf==0) { if(!$sf) $sym++; if ($sym<$wrap) $chkPhr.=$str[$a]; else {$chkPhr.=$str[$a].' '; $sym=0;} }
} //cycle

if (strlen($chkPhr)>0) $exploded[$i]=$chkPhr;
$sym=0; $qf=0; $chkPhr='';
}
elseif (strlen($str)>$wrap and !$dT) $exploded[$i]=chunk_split($exploded[$i],$wrap,' ');

} //i cycle

return implode(' ',$exploded);
}

Author PeKa
Partaker
#5 | Posted: 2 May 2002 15:33 
Thanks for this quick update ^_^'

Already updated it *wooooosh*

Author Anonymous
Guest
#6 | Posted: 17 Oct 2003 10:54 
Why don't you make it as a plugin/hack since most of the user will definitely want it ?

Author 4days
Champi0n
#7 | Posted: 17 Oct 2003 11:59 
1.7 will be here soon, something along the lines of Peka's original post could be added to the manual.

Author Team
8-)
#8 | Posted: 17 Oct 2003 12:27 
Anonymous
Rankings is not our main concept.

For previous versions, there was a plugin called "visual specials" where you were able to edit ranks visually, but it will take time until our hands will be on it in next version :)

Author Max
Guest
#9 | Posted: 17 Oct 2003 13:43 
PeKa, can you describe in simple words how it will work?

Author Marius
Partaker
#10 | Posted: 6 Jun 2005 16:37 
Special avatar for admin and moderators

Hi, I'm new to minibb, but what I've been able to do with it so far...I'm deeply impressed. I installed the avatar plugin and know the following should be relatively easy, but I'm am a noob at this coding.

I wonder if it would be possible to give members with certain ranking special priveledges to restrickted avatars. If so...how?

Kind regards,
Marius

Author Team
8-)
#11 | Posted: 6 Jun 2005 16:48 
I don't know what you are talking about exactly, but I could suppose that you could use manual $userRanks array which build in miniBB.

https://www.minibb.com/forums/index.php?action=manual#userrankings

For example, my avatar is created this way. And we have no avatars plug-in installed on our board at all :-)

Author Marius
Partaker
#12 | Posted: 6 Jun 2005 17:43 
Right....I saw that...I just don't exactly know how to code it out. I understand the rank naming as described (that is simple enough), but how could I code that for gifs located inside the forum_avatars folder?

So avatars could be assigned to the admin and moderators that no one else has access to in the avatar list.

Thanks for helping out :)

Kind regards,
Marius

Author Team
8-)
#13 | Posted: 6 Jun 2005 17:49 
Then:

1) Don't put them into avatars folder - create special folder for them, outside 'shared_files'

2) My avatar is listed as:

$userRanks=array(1=>'<img src="./img/smilies/cool.gif" width=15 height=15 border=0 alt="8-)">');

Bolded is my user ID. Italic - URL to your picture.

That's all :-)

Author Marius
Partaker
#14 | Posted: 6 Jun 2005 20:46 
Hey thanks...that worked like a charm...one more thing:

Does this mean you can not have 'admin' displayed under your name?

Or is there a work around.

Kind regards,
Marius

Author Marius
Partaker
#15 | Posted: 6 Jun 2005 20:48 
I got it...Its far more simple than the flash actionscript I'm used too :)

Thanks a ton Team!

Marius

Page  Page 1 of 2:  1  2  Next » 
How To miniBB Support Forums / How To /
 Using bb_special's $userRanks
 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑