Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: tooth on March 11, 2008, 05:46:59 PM

Title: FlashChat integration issue [SOLVED]
Post by: tooth on March 11, 2008, 05:46:59 PM
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.
Title: Re: FlashChat integration issue [SOLVED]
Post by: tooth on March 11, 2008, 07:36:06 PM
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
Title: Re: FlashChat integration issue [SOLVED]
Post by: Kindred on March 11, 2008, 11:51:18 PM
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;
Title: Re: FlashChat integration issue [SOLVED]
Post by: tooth on March 12, 2008, 06:59:27 AM
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
Title: Re: FlashChat integration issue [SOLVED]
Post by: Kindred on March 12, 2008, 08:22:17 AM
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.
Title: Re: FlashChat integration issue [SOLVED]
Post by: tooth on March 12, 2008, 10:57:30 PM
...thank you!  ;)
Title: Re: FlashChat integration issue [SOLVED]
Post by: bpdexplorer129nc on January 18, 2009, 03:15:21 AM
Im using vbulletin and will this work at all? im going all over the web to find the answer and i need help asap
Title: Re: FlashChat integration issue [SOLVED]
Post by: Kindred on January 18, 2009, 07:40:38 AM
why would you ask about vbulletin on an SMF support?