Hello,
I just set up the latest FlashChat - intesting as stand alone everything works.
I used the SMF FlashChat mod to integrate into the forum - all is well and working properly for admin and regular members.
I have two groups that no matter who they are, when they try to start the chat, they come up as "You Are Banned" in the chat login. I have serched the chat admin and there are no banned members also non in SMF.
Does anyone have a fix for this issue or a direction to point me in?
Thank you,
Tooth.
in www/smf/chat/inc/cmses/smfcm2.php
...find the following and add your usergroups bold type
------------------------------------------------------------------
function getRoles($status, $additionalGroups)
{
if($status == 1 || in_array(1, $additionalGroups)) return ROLE_ADMIN;
if($status == 2 || in_array(2, $additionalGroups)) return ROLE_MODERATOR;
if($status == 3 || in_array(3, $additionalGroups)) return ROLE_MODERATOR;
if($status == 0 || ($status > 3 && $status < 9 )) return ROLE_USER;
if(in_array(0, $additionalGroups)) return ROLE_USER;
if($status == 11 ) { return ROLE_USER; }
if($status == 10 ) { return ROLE_USER; }
if($status == 9 ) { return ROLE_USER; } s
return null;
}
function getUserProfile($userid)
-----------------------------------------------------------------------------------
Cheers,
Tooth
actually, the best way to handle this (because you would have to do additional lines for each and every group is to change
if($status == 0 || ($status > 3 && $status < 9 )) return ROLE_USER;
to be
if($status == 0 || ($status > 3 && $status < 99 )) return ROLE_USER;
Thanks Kindred,
Are you saying to forget the three lines that I added?
if($status == 11 ) { return ROLE_USER; }
if($status == 10 ) { return ROLE_USER; }
if($status == 9 ) { return ROLE_USER; }
That I should just add the edit on the line...
if($status == 0 || ($status > 3 && $status < 9 )) return ROLE_USER;
to be
if($status == 0 || ($status > 3 && $status < 99 )) return ROLE_USER;
---------------------------------
As the code was, my group 9 was being banned untill I added the three lines, a new line for each group.
I am very new to PHP and SMF, so I am only asking so as to understand...
Does this range in the line you edited now cover from group 3 upto 99?
I will try this... :)
Thanks for the reply.
Tooth
yes, assuming all future groups are intended to be role_user, the line I suggested will make groups 4 (greater than 3) through 98 (less than 99) set to role_user... instead of a new line per group.
...thank you! ;)
Im using vbulletin and will this work at all? im going all over the web to find the answer and i need help asap
why would you ask about vbulletin on an SMF support?