News:

Wondering if this will always be free?  See why free is better.

Main Menu

FlashChat integration issue [SOLVED]

Started by tooth, March 11, 2008, 05:46:59 PM

Previous topic - Next topic

tooth

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.

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

Kindred

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;
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tooth

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

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tooth


bpdexplorer129nc

Im using vbulletin and will this work at all? im going all over the web to find the answer and i need help asap

Kindred

why would you ask about vbulletin on an SMF support?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: