miniBB ®®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
How To miniBB Community Forum / How To /

Using bb_special's $userRanks

 Page:  1  2  »» 
PeKa
Forums Member
#1 | Posted: 2 May 2002 14:10 | Edited by: Moderator
Reply 
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 ;-)
PeKa
Forums Member
#2 | Posted: 2 May 2002 14:14
Reply 
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
Team
8-)
#3 | Posted: 2 May 2002 14:40
Reply 
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 :)
Team
8-)
#4 | Posted: 2 May 2002 15:28
Reply 
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);
}
PeKa
Forums Member
#5 | Posted: 2 May 2002 15:33
Reply 
Thanks for this quick update ^_^'

Already updated it *wooooosh*
Anonymous
Guest
#6 | Posted: 17 Oct 2003 10:54
Reply 
Why don't you make it as a plugin/hack since most of the user will definitely want it ?
4days
Champi0n
#7 | Posted: 17 Oct 2003 11:59
Reply 
1.7 will be here soon, something along the lines of Peka's original post could be added to the manual.
Team
8-)
#8 | Posted: 17 Oct 2003 12:27
Reply 
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 :)
Max
Guest
#9 | Posted: 17 Oct 2003 13:43
Reply 
PeKa, can you describe in simple words how it will work?
Marius
Forums Member
#10 | Posted: 6 Jun 2005 16:37
Reply 
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
Team
8-)
#11 | Posted: 6 Jun 2005 16:48
Reply 
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.

http://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 :-)
Marius
Forums Member
#12 | Posted: 6 Jun 2005 17:43
Reply 
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
Team
8-)
#13 | Posted: 6 Jun 2005 17:49
Reply 
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 :-)
Marius
Forums Member
#14 | Posted: 6 Jun 2005 20:46
Reply 
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
Marius
Forums Member
#15 | Posted: 6 Jun 2005 20:48
Reply 
I got it...Its far more simple than the flash actionscript I'm used too :)

Thanks a ton Team!

Marius
 Page:  1  2  »» 
Your Reply
Bold Style  Italic Style  Image Link  URL Link 


» 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.

 
Online now: Guests - 41
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®