AjaxChat Integration (latest version 3.2.1)

Started by .HuNTeR., August 27, 2008, 12:59:06 AM

Previous topic - Next topic

mrtrc266

Quote from: thesicilian on March 30, 2010, 08:33:16 AM
Quick question, is there any way to stop the Shoutbox timing out on SMF 1.1.11, if peeps aren't chatting for a little bit, it times out and the chat stays static, members then think that no-one is chatting. Any help would be very much appreciated.

Also are logs created of whats spoken about in the shoutbox?


To adjust the amount time before people remain idle please hit the link in my signature.

To view the logs www.yoursite.com/chat/index.php?view=logs

thesicilian

Quote from: mrtrc266 on March 30, 2010, 11:14:00 AM
Quote from: thesicilian on March 30, 2010, 08:33:16 AM
Quick question, is there any way to stop the Shoutbox timing out on SMF 1.1.11, if peeps aren't chatting for a little bit, it times out and the chat stays static, members then think that no-one is chatting. Any help would be very much appreciated.

Also are logs created of whats spoken about in the shoutbox?


To adjust the amount time before people remain idle please hit the link in my signature.

To view the logs www.yoursite.com/chat/index.php?view=logs

I've checked the view=logs link, all I get the chat box with no logs. All the chat has been in the shoutbox. Is there a file on the server that stores all the shoutbox logs?

Regards the idle thing, I found the details in your signature, will they apply to the shoutbox?

mrtrc266

Quote from: thesicilian on March 30, 2010, 11:34:54 AM
Quote from: mrtrc266 on March 30, 2010, 11:14:00 AM
Quote from: thesicilian on March 30, 2010, 08:33:16 AM
Quick question, is there any way to stop the Shoutbox timing out on SMF 1.1.11, if peeps aren't chatting for a little bit, it times out and the chat stays static, members then think that no-one is chatting. Any help would be very much appreciated.

Also are logs created of whats spoken about in the shoutbox?


To adjust the amount time before people remain idle please hit the link in my signature.

To view the logs www.yoursite.com/chat/index.php?view=logs

I've checked the view=logs link, all I get the chat box with no logs. All the chat has been in the shoutbox. Is there a file on the server that stores all the shoutbox logs?

Regards the idle thing, I found the details in your signature, will they apply to the shoutbox?

If you DO NOT have your chat & shout integrated then you need to do the edits in the /shoutBox folder for them to have any effect in the shoutbox.

Good question regarding the logs, same thing applied I imaging, if you don't have chat/shout integrated then you might only be able to view the logs for the chat. They are stored in the database though you can see them via phpMyAdmin , you'll be looking for _ajaxshout_messages

thesicilian

Thank you for your reply mrtrc266 :)

I'd like to more or less turn off the timeout, so members will always see activity in the shoutbox. Could I set the inactive timeout to say 600 (10hours). Would this be ok to do? Would I need to change the inactive check interval value?

// Minutes until a user is declared inactive (last status update) - the minimum is 2 minutes:
$config['inactiveTimeout'] = 600;
// Interval in minutes to check for inactive users:
$config['inactiveCheckInterval'] = 5;

mrtrc266

Quote from: thesicilian on March 30, 2010, 12:07:10 PM
Thank you for your reply mrtrc266 :)

I'd like to more or less turn off the timeout, so members will always see activity in the shoutbox. Could I set the inactive timeout to say 600 (10hours). Would this be ok to do? Would I need to change the inactive check interval value?

// Minutes until a user is declared inactive (last status update) - the minimum is 2 minutes:
$config['inactiveTimeout'] = 600;
// Interval in minutes to check for inactive users:
$config['inactiveCheckInterval'] = 5;


I would think that about 60 minutes would be fine. If they haven't done anything in an hr then more than likely their not even there LOL. The Inactive Check Interval simply means that every 5 minutes it will check to see who has been idle for 60 minutes or more then boot them off.

Here are a couple more settings that will probably help to make sure your users don't miss any chat. Max time diff defines how many days the chat will stay visible. Max # of messages defines how many messages will be called every time you log in.

// Max time difference in hours for messages to display on each request:
$config['requestMessagesTimeDiff'] = 24;
// Max number of messages to display on each request:
$config['requestMessagesLimit'] = 10;



thesicilian

Thank you for that mrtrc266, changing the settings now :)

Twi12561

Does anyone know why one of my chat users is getting this message?

ChatBot: Error: Connection status: 0

I see messages about 404 and 500, but nothing for a simple zero. Any takers?


[unplugged]

Quote from: mrtrc266 on March 19, 2009, 12:03:37 AM
If you get a Connection  Status: 0 error from time to time it's harmless and you can stop it from showing
Open chat/js/chat.js
Find
this.addChatBotMessageToChatList('/error ConnectionStatus '+this.getHttpRequest(identifier).status);
Replace with
if (this.getHttpRequest(identifier).status != 0) {
this.addChatBotMessageToChatList('/error ConnectionStatus '+this.getHttpRequest(identifier).status);
}

« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



ryu1revline

#5688
Hello there.  :)

I just installed Ajax and the install was successful without any problems. The shout box is working perfect, but I don't know how to access the chat feature.

The forums are SMF 1.1.11 with the Mystic Jade theme. The mods are Tiny Portal, Aeva Media, and now Ajax chat. What I'm looking to do is have the chat button show at the top of the screen, and have the chat integrated without a pop-up window.

My guess is that my theme is blocking the view of the chat mod, so I would really appreciate any help getting this working.  ;)

thesicilian

Quote from: SunKing on May 19, 2009, 12:23:29 PM
Alright. Here is the first (of many, I hope) tweak for the AjaxChat mod.
Here's what I did:

Post Notification

The first step is to change a value for one of the database entries, so make backups! I think this could be made a permanent change without ill consequences maybe in future releases. ;)

The dateTime field of ajax_chat_messages needs the type changed to timestamp.

Next, open Sources/Post.php and search for
notifyMembersBoard($notifyData);
add after it:
// Ajax Chat New Topic Notification
global $user_info, $board, $scripturl, $boardName, $topic;
    $smcFunc['db_insert']('',
      'ajax_chat_messages',
      array(
         'userID' => 'int', 'userName' => 'string-255', 'userRole' => 'int', 'channel'=> 'int', 'ip' => 'string-255', 'text' => 'string-255',
         ),
      array(
         $posterOptions['id'], $user_info['name'], 1, 0, $posterOptions['ip'], '[color=red][b]New Topic: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url][/b][/color]'
         ),
      array('autopost')
   );
    // End Ajax Chat New Topic Notification


search for
sendNotifications($topic, 'reply');

replace it with:

     {
sendNotifications($topic, 'reply');

// Ajax Chat New Reply Notification
global $user_info, $board, $scripturl, $boardName, $topic;
    $smcFunc['db_insert']('',
      'ajax_chat_messages',
      array(
         'userID' => 'int', 'userName' => 'string-255', 'userRole' => 'int', 'channel'=> 'int', 'ip' => 'string-255', 'text' => 'string-255',
         ),
      array(
         $posterOptions['id'], $user_info['name'], 1, 0, $posterOptions['ip'], '[color=red][b]New Reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url][/b][/color]'
         ),
      array('autopost')
   );
    // End Ajax Chat New Reply Notification
     }


That's it. Now, every time someone posts, a nice notification will popup in the chat/shoutbox displaying a link to the new post/reply.

This is by no means my creation, but rather a reworking of a tweak for nneonneo's shoutbox that I could not live without. ;)

Many thanks to hiver101 for pointing me in the right direction.

DEMO        Enjoy!

If the above mod is applied, will posts in Moderators room be included in the shout box? As only Admin and Mod's have access to that, so wouldn't want the subject title posted in the shoutbox.

Twi12561

Quote from: SunKing on March 30, 2010, 10:36:11 PM
Quote from: mrtrc266 on March 19, 2009, 12:03:37 AM
If you get a Connection  Status: 0 error from time to time it's harmless and you can stop it from showing
Open chat/js/chat.js
Find
this.addChatBotMessageToChatList('/error ConnectionStatus '+this.getHttpRequest(identifier).status);
Replace with
if (this.getHttpRequest(identifier).status != 0) {
this.addChatBotMessageToChatList('/error ConnectionStatus '+this.getHttpRequest(identifier).status);
}


Thank you, SunKing. :)

[unplugged]

Quote from: ryu1revline on March 31, 2010, 01:36:16 AM
Hello there.  :)

I just installed Ajax and the install was successful without any problems. The shout box is working perfect, but I don't know how to access the chat feature.

The forums are SMF 1.1.11 with the Mystic Jade theme. The mods are Tiny Portal, Aeva Media, and now Ajax chat. What I'm looking to do is have the chat button show at the top of the screen, and have the chat integrated without a pop-up window.

My site is guildofinfamy.com (won't let me post links for some reason)

My guess is that my theme is blocking the view of the chat mod, so I would really appreciate any help getting this working.  ;)

Welcome to SMF! You just need to add the code for the button to your index.template.php for the Mystic Jade theme. You can find this code listed in the package parser.

Quote from: thesicilian on March 31, 2010, 07:20:35 AM
If the above mod is applied, will posts in Moderators room be included in the shout box? As only Admin and Mod's have access to that, so wouldn't want the subject title posted in the shoutbox.
Every post will be listed. However, there is also a tweak floating around to "ignore" certain boards by wrapping that code in an if statement. I'll see if I can find it for you.

Quote from: Twi12561 on March 31, 2010, 01:17:57 PM
Thank you, SunKing. :)

You are quite welcome.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Faythi

Hi guys, I was wondering if there is code to put this on my homepage of my website. I saw the link of how to put this on your portal, but it looked like that applied to a CMS like Simple Portal. Is there a function I could call or could someone give me somewhat of a hint as to how I can start this?

Scaala

Quote from: Scaala on March 22, 2010, 05:07:49 AMI just tried installing your mod and it seems to install correctly.  The option settings and permission settings all appear and are adjustable.  The tab for the chat appears just fine (I'm not interested in the shoutbox...).

Anyway, I click on the chat tab, and it opens a popup window for the chat...  The request hesitates for about 3/4 of a second, and then it provides this error message on a completely white background:

[an error occurred while processing this directive]

I just realized I have a bit of additional information.  The error log of my forum counted a number of errors from Ajaxchat while I had it installed.  The error information:

8: Undefined Index Chat  -  File:  forum/Sources/Subs.php  -  Line 3931

...Which seems to refer to this block of code added by the Ajaxchat mod:

$num = empty($modSettings['enableChatButtonNo']) ? 0 : count(chatOnlineUsers());
$chatButton = 'Chat'; $chatButton .= ($num > 0) ? ('('.$num.')') : '';
$chatLink = str_replace("index.php", "chat/index.php", $scripturl);
if (!empty($modSettings['chatPopUp']))
$chatLink .= '" onclick="openWindow(this.href);this.blur();return false;';


Does this suggest a likely cause?

TehCraw

Hi, I installed AjaxChat on my forum running SMF 2.0 RC3, and the install looks good. The button appeared in the menu, but when I click it, it just opens a blank screen. I already looked at this post, but I'm not sure if it applies and I'm afraid to mess something up.

Thanks.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler

exteeyou

Quote from: ScottyBoy on March 31, 2010, 10:58:48 PM
Hi, I installed AjaxChat on my forum running SMF 2.0 RC3, and the install looks good. The button appeared in the menu, but when I click it, it just opens a blank screen. I already looked at this post, but I'm not sure if it applies and I'm afraid to mess something up.

Thanks.

I am having the same issue as well

TehCraw

Boy, this is a really popular mod. 285 pages to this thread.  :o
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler

mrtrc266

#5697
@ ScottyBoy,  exteeyou and Scalla have you by any chance tried changing you file permissions (CHMOD) to 755? for

/chat/index.php and /shoutBox/index.php

@ Faythi there might be an SSI method to have this work outside SMF. Hopefully an experienced coder might be able offer a suggestion or 2?

TehCraw

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler

mrtrc266

Quote from: ScottyBoy on April 01, 2010, 01:30:30 AM
Nice! Thanks, man.

You're welcome. So I take it that fixed it? If so I will add that as another possible solution for that problem on the FAQ's Page.

Advertisement: