FlashChat Integration with 1.1.1 Final, 1.1RC3 & 1.1RC2 Default Theme

Started by Simplemachines Cowboy, January 18, 2006, 10:54:47 PM

Previous topic - Next topic

jiminoregon

Quote from: digit on May 01, 2006, 05:05:34 AM
Quote from: Simplemachines Cowboy on April 24, 2006, 04:55:23 PM
sopas,
If you mean when you try to log into FlashChat, you get banned, you need to search on the flashchat forum for that fix.
It has something to do with the usergroups in smf. I think there was a post a couple pages up from this that talks about it also.

YES.  This is a problem.

I just upgraded to the latest version 4.5.7.

Quite a few members are reporting being banned.

It DOES have to do with groups in SMF.

I believe you can just increase the number of groups in sfmCMS2.php

here....



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;

  return null;
  }



you are probably getting this error because you have more than 9 Groups???

That's my best guess anyway!!!!!!!!!!!!

I hope that's right!

(can someone please confirm???)

Thanks!




I changed 9 to 20 and that fixed it for me.

Jim

digit

surprising...  it's not working for me!!!  :(
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

jiminoregon

Quote from: digit on May 01, 2006, 10:51:04 AM
surprising...  it's not working for me!!!  :(

When installing did you use the SMF 1.1 CMS choice?  Are you using SMF 1.1rc1 or newer?

Jim

digit

Not quite sure what you mean by that.

I am running SMF 1.1 RC2
Flashchat 4.5.7
In my FlashChat config.php I have...

'CMSsystem' => 'smfCMS2',

what's odd is it doesn't seem to make any difference if I comment that out or not - it seems the smf user data is STILL being accessed!

I did notice that the people who were complaining about being banned belonged to groups 9 and 29...  I removed them from group 29 and all seems wel..

Definately a little confused here.
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

jiminoregon

Quote from: crazee1 on April 10, 2006, 01:17:46 AM
I have performed the steps and I have a chat link at the top like I should, but when I click on it I get the following error:

Fatal error: smf_main(): Failed opening required '/home/teamente/public_html/smf/Sources/Chat.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teamente/public_html/smf/index.php on line 348


I have created the chat.php and placed it in the sources directory as the instructions state.  Any ideas?

That's your problem...you created chat.php and chat.template.php...they need to be Chat.php and Chat.template.php.

Jim

jiminoregon

Quote from: digit on May 01, 2006, 11:04:03 AM
Not quite sure what you mean by that.

I am running SMF 1.1 RC2
Flashchat 4.5.7
In my FlashChat config.php I have...

'CMSsystem' => 'smfCMS2',

what's odd is it doesn't seem to make any difference if I comment that out or not - it seems the smf user data is STILL being accessed!

I did notice that the people who were complaining about being banned belonged to groups 9 and 29...  I removed them from group 29 and all seems wel..

Definately a little confused here.

Instead of changing the groups...you could have also changed the 9 to 99.

Jim

bar

Hi,

The flashchat integration worked for a few days then suddenly the following message appeared:

QuoteFatal error: Call to a member function on a non-object in D:\webs\mywebsiteaddress.com\html\forum\chat\info_embedded.php on line 34


Could someone please help. Thanks.

Simplemachines Cowboy

What is line 34 in your info.embedded.php?

Post a block of code above and below that line please.

And when does this error appear?
When you open your forum?
When you click on the chat button in your forum?
Or what?
My SMF forum: The Open Range

jiminoregon

Quote from: sopas24 on April 24, 2006, 05:14:23 PM
Another thing i can put the buton chat in apollo, justa apear the place like a "x".

When you press the X does it take you to the chat?  If so you just have a simple path problem.  Check the properties of the link and make sure they match where the file pic is at.

Jim

bar

Quote from: Simplemachines Cowboy on May 03, 2006, 11:33:40 PM
What is line 34 in your info.embedded.php?

Post a block of code above and below that line please.

And when does this error appear?
When you open your forum?
When you click on the chat button in your forum?
Or what?

Line 34:    $rec = $rs->next();

How do i post a block of code above and below that line?

It appears on my forum where the FlashChat Users information appears (below the Users Online section).

The chat works well when they click on the Chat Button, it appears in a new window.

bar

Now it says:

QuoteFatal error: Call to a member function on a non-object in D:\webs\mywebsiteaddress.com\html\forum\chat\bot\bot_class.php on line 347

QuoteLine 347:         while(($rec = $res->next()) != null)

jiminoregon

#91
Quote from: bar on May 04, 2006, 06:09:18 AM
Quote from: Simplemachines Cowboy on May 03, 2006, 11:33:40 PM
What is line 34 in your info.embedded.php?

Post a block of code above and below that line please.

And when does this error appear?
When you open your forum?
When you click on the chat button in your forum?
Or what?

Line 34:    $rec = $rs->next();

How do i post a block of code above and below that line?

It appears on my forum where the FlashChat Users information appears (below the Users Online section).

The chat works well when they click on the Chat Button, it appears in a new window.

Just copy and paste it like this:

/**
Retrieves the number of users who are chatting in any room.
Leave the $room parameter empty to return the number of users in all room.
*/
function numusers( $room = "" )
{
   if($room) {
      $stmt = new Statement("SELECT COUNT(*) AS numb FROM {$GLOBALS['fc_config']['db']['pref']}connections WHERE userid IS NOT NULL AND roomid=?");
      $rs = $stmt->process($room);
   } else {
      $stmt = new Statement("SELECT COUNT(*) AS numb FROM {$GLOBALS['fc_config']['db']['pref']}connections,{$GLOBALS['fc_config']['db']['pref']}rooms
                       WHERE userid IS NOT NULL AND ispublic IS NOT NULL
                       AND {$GLOBALS['fc_config']['db']['pref']}connections.roomid = {$GLOBALS['fc_config']['db']['pref']}rooms.id");
      $rs = $stmt->process();
   }
   
   $rec = $rs->next();

   return $rec?$rec['numb']:0;
}

/**
Retrieves a list of the users (by login ID) who are in $room.
Leave the $room parameter empty to return a list of all users in all rooms.
*/

bar

It didnt seem to work. Still getting that error

QuoteFatal error: Call to a member function on a non-object in D:\webs\mywebsiteaddress.com\html\forum\chat\info_embedded.php on line 34

crazee1


Simplemachines Cowboy

Bar,
Well, the smf portion is working, in that it's trying to get info from the chat file regarding users.
And your file looks right, line 34 is exactly like mine.
I would post your question for Veronica in the FlashChat forums.

Make sure you include the other error you had, the problem may have something to do with your bot settings.
My SMF forum: The Open Range

^DooM^

Quote from: krustyop on April 03, 2006, 01:36:57 PM
EDIT
any idea why the who's online page still reports unknown action?

Here are a couple isues i'm wondering about,
This is not related to the fact that I use a custom theme, nor that my forum is in french,
I have the same issues in all themes/languages:

I want the chat to open inside the Iframe, that is working fine, exept for the following:


1-Linktree does not show that we are in the chat see image:

As a matter of fact, I have the same issue with coppermine gallerie opened in a Iframe, Linktree does not show
Any ideas?



2-The action in the who's online page of the forum reports Unknown Action as shown here

Coppermine works fine, since some code was added in coppermine file, but where should I add this code, or what should I modify for the action=chat to be reported in the Who's online section ???



Hope anyone can guide me on this one!

Dom

Find this code in Sources/Who.php

// Unlisted or unknown action.

ABOVE that line add this block of code.

//show whos in the chat
elseif (isset($actions['action'])&&($actions['action']=='chat'))
{
    $data[$k] = 'Currently in the <a href="' . $scripturl . '?action=chat">Chat Room</a>';
}


That will show who is in the chat and link the words 'Chat Room' to the chat.

I hope this helps.
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

Simplemachines Cowboy

^DooM^, you DA MAN!

Thanks. I will add this to the tutorial with credit to you.
My SMF forum: The Open Range

^DooM^

#97
Hey no problem :) You did the hard part.

I have integrated this chat with 8 themes now and its all working great.

Thanks for your hard work.

By the way here is another little tip for any of you guys that have integrated the chat and find that some of your users are banned. (I had this problem..)

Find this line of code in your flashchat installation folder inc/cmses/smfCMS2.php

if($status == 0 || ($status > 3 && $status < 9 )) return ROLE_USER;
Change to
if($status == 0 || ($status > 3 && $status < 99 )) return ROLE_USER;

The reason for this is the chat works out who is admin/moderator etc by the groupid number that is stored in the smf_members table. Any ID above 3 is classed as a normal user and has no admin rights. Now for some reason whoever coded this thought 9 ID groups would be enough (It's not. I have 12 so far). Any ID above 9 is banned. If it still says they are banned get them to clear there cache.

I hope this helps someone else out there as it took me about an hour to track that down ;)

Cheers!
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

Simplemachines Cowboy

OK ^DooM^, riddle me this:
I am getting this error when I access action=who:

Quote8: Undefined variable: scripturl
File: /home/mydomain/public_html/forum/Sources/Who.php
Line: 324

Which is this line in Who.php:

$data[$k] = 'Currently in the <a href="' . $scripturl . '?action=chat">Chat Room</a>';

Any ideas?
My SMF forum: The Open Range

^DooM^

#99
Make sure you have it set in the global line of Who.php's determineActions function.

function determineActions($urls)
{
global $txt, $db_prefix, $user_info, $scripturl, $ID_MEMBER;


$scripturl is there so you do not have to hardcode your website address and is used everywhere in 1.1rc2
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

Advertisement: