Advertisement:

Author Topic: AjaxChat Integration (latest version 3.2.1)  (Read 2177797 times)

Offline wiki

  • Semi-Newbie
  • *
  • Posts: 22
Re: AjaxChat Integration
« Reply #860 on: March 18, 2009, 09:14:50 AM »
Here you go wiki.

I upload the files and now i can see the shoutbox only at my home page but the chat is not integrated and i got this (error: connection status:500) here the photo of my home page beside can we make the logout button at same menu row?
Thx a lot

Sorry for the delay, I had to run off to work. I just uploaded the same files that I gave you and it seems to work fine, check it out here....It must be something else.
http://monsters-mansion.com/testrc1/index.php [nofollow]

username: test
password: testuser

I chk the site u gave me and i can't see the shoutbox at main page so i should disable it?

Here the mod i am using:
1.     Cristalab Icon Set  1.0
2.    jQLightbox  0.3
3.    Hide SMF Version 1.0.3b


Offline arrowboy55

  • Jr. Member
  • **
  • Posts: 110
Re: AjaxChat Integration
« Reply #861 on: March 18, 2009, 10:12:37 AM »
@ arrowboy55  there is not a submit button, you just hit the enter key and your shout is sent

Okay, and thank you.  Except I have tried that and it never enters the chat when I hit enter.  The shoutbox does not seem "tall" enough maybe?

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #862 on: March 18, 2009, 01:08:30 PM »
@ Rex Zac  did you get it sorted?

Offline tfs

  • Full Member
  • ***
  • Posts: 422
  • Gender: Male
Re: AjaxChat Integration
« Reply #863 on: March 18, 2009, 01:50:41 PM »
I'd like to have the shoutbox remember more than the last ten items before they scroll off.  I've tried editing the obvious stuff in \forum\shoutbox\lib\config.php but they don't seem to make a  difference.

Basically I'd like to increase it to 30 items, and have those remain for three days before being removed for time reasons.

Here's what I changed in \forum\shoutbox\lib\config.php

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

Should I be making the change in forum\ajaxchat\lib\config.php even though it's the shoutbox I want to modify?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline tfs

  • Full Member
  • ***
  • Posts: 422
  • Gender: Male
Re: AjaxChat Integration
« Reply #864 on: March 18, 2009, 02:10:37 PM »
Should I be making the change in forum\ajaxchat\lib\config.php even though it's the shoutbox I want to modify?

I answered my own question by editing forum\ajaxchat\lib\config.php, which made the desired change in the shoutbox.  I wonder then, does the file forum\shoutbox\lib\config.php get used at all?  Is it possible to configure settings in the shoutbox and the chat window seperately?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline Rex Zac

  • Semi-Newbie
  • *
  • Posts: 32
Re: AjaxChat Integration
« Reply #865 on: March 18, 2009, 02:13:33 PM »
@ Rex Zac  did you get it sorted?

i did, it work, however, am not sure should that go the way i said or i just overwrite with some older version so it work :D

Offline [unplugged]

  • Sophist Member
  • *****
  • Posts: 1,312
  • Gender: Male
  • I know just enough to get me in trouble...
    • Empire of the Sun
Re: AjaxChat Integration
« Reply #866 on: March 18, 2009, 05:12:17 PM »
*scratches head*

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


Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #867 on: March 19, 2009, 12:03:37 AM »
Here are some the most common questions and answers to getting your Chat Room and Shoutbox going on your forum for AJAX Chat Intergration 3.X 
  • Please be sure to check the following settings in the Admin Panel.
  • For SMF 1.1.X Admin/Configuration/Features and Options/
  • For SMF 2 RC1  Admin/Configuration/Modifications/Chat/
  • Enable the ShoutBox?
  • Check for ShoutBox on any page or uncheck for only in index page: 
  • Integrate shout box and chat room?
  • Chat in popup page?
  • Enable online chat users numbering on chat button?
  • Show online users below total logged in time section?
  • Also be sure to CHECK PERMISSIONS!   ;)
If you are using a custom theme you will need to edit the following files in your custom theme using a Package Parser
  • Themes/yourtheme/index.template.php
  • Themes/yourtheme/style.css
  • And possibly...
  • Themes/yourtheme/BoardIndex.template.php
  • If your theme does not have a BoarIndex.template don't worry about it, that means your forum is using the default BoardIndex.template
Here some known issues and fixes caused by either other Mods or some servers
  • If you install the Mod and it looks like it installs fine but the shoutbox and chat room are blank please READ THIS
  • If you have problems and you also have Pretty URL's installed please READ THIS
  • Using a Portal System like Tiny Portal, EZ Portal etc and having problems? Try THIS
  • If your regular members can delete posts in the Chat and Shout it's because you allow them to post Events in your Calendar READ THIS
If you get a 500 Connection error you might have to set your file permissions as well.
There are 2 folder for the AJAX Chat Intergration Mod "Chat" and "Shoutbox".
For AJAX Chat Intergration Version 3 be sure to change the file permissions (CHMOD) /chat/index.php and /shoutbox/index.php to 755 (and in some cases CHMOD the actual "Folders" as well).
This could possible be the solution for this as well.... "If you install the Mod and it looks like it installs fine but the   shoutbox and chat room are blank"
If you get this error XML Parsing Error: junk after document element
Open yourforum/chat/lib/config.php
Find
Code: [Select]
// The content-type of the XHTML page (e.g. "text/html", will be set dependent on browser capabilities if set to null):
$config['contentType'] = null;
Replace with
Code: [Select]
// The content-type of the XHTML page (e.g. "text/html", will be set dependent on browser capabilities if set to null):
$config['contentType'] = 'text/html';

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
Code: [Select]
this.addChatBotMessageToChatList('/error ConnectionStatus '+this.getHttpRequest(identifier).status);Replace with
Code: [Select]
if (this.getHttpRequest(identifier).status != 0) {
this.addChatBotMessageToChatList('/error ConnectionStatus '+this.getHttpRequest(identifier).status);
}
AJAX Chat User submitted tweaks (Thank you for your contributions.) 

Here are some tips for adding some functionality and customization to your Ajax Chat Room.
Disable guests accessing chat in version 3.2
Open and find /chat/lib/config.php / Change true to false
Code: [Select]
// Enable/Disable guest logins:
$config['allowGuestLogins'] = true;
Redirect the Logout back to your forum when you log out of the Chat Room
Open.....yourforum/chat/lib/config.php
Find
Code: [Select]
// Argument that is given to the handleLogout JavaScript method:
$config['logoutData'] = './?logout=true';
Replcace with (of course change http://yourforum.com to your forum) ;)
Code: [Select]
// Argument that is given to the handleLogout JavaScript method:
$config['logoutData'] = 'http://yourforum.com';
           
Set how long you want members to be idle before they are timed out.
Open.....yourforum/chat/lib/config.php (Change to whatever you like.)
Find
Code: [Select]
// Minutes until a user is declared inactive (last status update) - the minimum is 2 minutes:
$config['inactiveTimeout'] = 2;
// Interval in minutes to check for inactive users:
$config['inactiveCheckInterval'] = 5;
           
Edit/Remove the channels that are currently boards.
Open.....yourforum/chat/lib/config.php
Find
Code: [Select]
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = null;
And replace with the code below and just change the numbers to the number of the boards for the boards you want to have as channels

EXAMPLE: If "General Discussion" was board #1 and you had another board "SMF Talk" was board #2 then your code would look like this. This would make it so ONLY General Discussion and SMF Talk would appear in the channel list.

Code: [Select]
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = array(1,2);
To have ONLY the Public Room avaliable in the Channel List, change the array to 0 (Thanks stikkki)
Code: [Select]
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = array(0);
You can also change the name of the Public Channel to something like "YourForums Lounge" Find and change Public to whatever you like
Code: [Select]
// Default channelName used together with the defaultChannelID if no channel with this ID exists:
$config['defaultChannelName'] = 'Public';
To actually add custom channels that are NOT in your board.
Open....yourforum/chat/lib/class/CustomAJAXChat.php (Just change Custom_Channel_1 and 'Custom_Channel_2 to what you want. No white spaces allowed.)
Find
Code: [Select]
      return $this->_channels;
Replace with
Code: [Select]
      $this->_channels = array_merge($this->_channels, array('Custom_Channel_1'=>567, 'Custom_Channel_2'=>890));
      return $this->_channels;

Find
Code: [Select]
      return $this->_allChannels;
Replace with
Code: [Select]
      $this->_allChannels = array_merge($this->_allChannels, array('Custom_Channel_1'=>567, 'Custom_Channel_2'=>890));
      return $this->_allChannels;
           
To set default Chat Room template and/or remove the template selection from drop down list
Remove selection from list delete the ones you don't want from the "Availabe Styles" array.
To set default template just change "Default style" to what you want.

Open.....yourforum/chat/lib/config.php
Find
Code: [Select]
// Available styles:
$config['styleAvailable'] = array('beige','black','grey','Oxygen','Lithium','Sulfur','Cobalt','Mercury','Radium','prosilver','subsilver2','subblack2','subSilver','Core','MyBB','vBulletin');
// Default style:
$config['styleDefault'] = 'Core';
           
Add a Welcome Message when you users enter the Chat
Open.....yourforum/chat/js/custom.js
Find
Code: [Select]
// Overriding client side functionality:
Add After (of course change Welcome to the Monsters Chat Room! to whatever you like.)
Code: [Select]

 ajaxChat.customInitialize = function() {
   ajaxChat.addChatBotMessageToChatList('Welcome to the Monsters Chat Room!');
}
           
Change the name of your Chatbot
Open.....yourforum/chat/lib/config.php
Find and change Chatbot to whatever you'd like.
Code: [Select]
// The userName used for ChatBot messages
$config['chatBotName'] = 'ChatBot';
           
This is a fun one..Add a command to take over the Chat Bot
The command will look like this....EXAMPLE  /takeover I have been taken over..will result in
ChatBot: I have been taken over
Open.....yourforum/chat/lib/class/CustomAJAXChat.php
Find
Code: [Select]
}
?>

Replace with
Code: [Select]
// Add custom commands
function parseCustomCommands($text, $textParts) {
 switch($textParts[0]) { 
  case '/takeover':
  $this->insertChatBotMessage( $this->getChannel(), $text );
  return true; 
  default:
  return false; 
 }

}
?>

Open.....yourforum/chat/js/custom.js
Find
Code: [Select]
// Overriding client side functionality:
Add after
Code: [Select]

 ajaxChat.replaceCustomCommands = function(text, textParts) {
   switch(textParts[0]) {
      case '/takeover':
      text=text.replace('/takeover', ' ');
      return '<span class="chatBotMessage">' + text + '</span>';
      default:
      return text;
   }
}



Adding some Smileys, BBCode and Font Color Palette to your Shoutbox (FOR AJAX CHAT INTERGRATION 2.3 AND 2.5 ONLY)
http://www.simplemachines.org/community/index.php?topic=257973.msg1930049#msg1930049
« Last Edit: May 13, 2010, 01:03:47 AM by mrtrc266 »

Offline Kirsten07734

  • Semi-Newbie
  • *
  • Posts: 40
Re: AjaxChat Integration
« Reply #868 on: March 19, 2009, 02:08:42 AM »
I successfully installed version 2.5 of this mod on an SMF 2.0 RC1 site a few weeks ago.  At that time we were supposed to install the Ajax Chat software first, then install the mod to integrate it into SMF.  It worked fine and the forum users loved it.

I upgraded another forum tonight and naturally wanted to use the Ajax Chat mod again.  This time I installed version 3.0 of the Ajax Chat mod, which includes the Ajax Chat software in the mod itself.  But this time I'm getting the following error message in both the chat room and the shoutbox:

Quote
ChatBot: Error: Connection status: 404

It appears that version 2.5 is no longer available for download and I no longer have the copy I used.

Offline herohenson

  • Semi-Newbie
  • *
  • Posts: 76
    • PinoyGroundz
Re: AjaxChat Integration
« Reply #869 on: March 19, 2009, 05:02:49 AM »
im getting this error when i going to chatroom, and i cant use the shoutbox? can any one help me here? here's my site www.pinoygroundz.comuf.com here's the error im getting

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #870 on: March 19, 2009, 09:54:28 AM »
@Kirsten07734

In addition to uninstalling 2.5 did you remove the chat folder from your root directory before you installed version 3?

Offline berrylife

  • Semi-Newbie
  • *
  • Posts: 32
Re: AjaxChat Integration
« Reply #871 on: March 19, 2009, 11:49:34 AM »
hi ive installed the 3.0 version on 2.0 RC1. it says it installs fine but when i click on the chat tab i get this



i dont know what it means, how would i fix it please!

Offline Kirsten07734

  • Semi-Newbie
  • *
  • Posts: 40
Re: AjaxChat Integration
« Reply #872 on: March 19, 2009, 12:17:50 PM »
In addition to uninstalling 2.5 did you remove the chat folder from your root directory before you installed version 3?

Yes.  I had some trouble with the upgrade from 1.1.8 to 2.0 RC1 and wound up blowing the forum away, installing a fresh copy of 2.0 RC1, and then using repair_settings to connect my old database to my new instance of SMF 2.0 RC1. 

The new instance is lightly modded, using mods I have used in the past with Ajax Chat mod 2.5 (Stop Spammer and View Only Boards).

------
BTW, thanks very much for the mod.  My users much prefer it to FlashChat or X7 Chat.  I have a forum for people with disabilities and my vision impaired folks find Ajax Chat much easier to use with their accessibility software.  We'll be running a test with JAWS (a text reader for the blind) once this instance is fully operational.  I'll report back on how well it works if you're interested.  Finding a chat room for the blind as well as the deaf has been nearly impossible and this one comes the closest so far.

Offline Podologo

  • Jr. Member
  • **
  • Posts: 232
  • Gender: Male
  • SMF 2.0 RC3
    • Daventry Weather
Re: AjaxChat Integration
« Reply #873 on: March 19, 2009, 05:43:07 PM »


This is a great mod which is going down well with my members, but is there a way to clear chat history easily, perhaps automatically?

Any help/advice will be appreciated.

Podologo


The richest person is not the one who has the most, but the one who needs the least.

Offline tfs

  • Full Member
  • ***
  • Posts: 422
  • Gender: Male
Re: AjaxChat Integration
« Reply #874 on: March 19, 2009, 06:03:18 PM »
This is a great mod which is going down well with my members, but is there a way to clear chat history easily, perhaps automatically?

There's some settings in \chat\lib\config.php that you might look at.  Such as...

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

As  far as I can tell, this is a setting to say how old a messages can get before it's purged.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #875 on: March 19, 2009, 07:17:54 PM »
This is weird, I am upgrading to 3.0 on my live site and during uninstall I cannot remove this from my index.template.php without my index page crashing, this happens on the default theme and my custom theme. Any ideas? Thanks in advance.
Find
Code: [Select]
function getChatInterface() {
    global $scripturl;
    static $ajaxChat;
 
    if (!$ajaxChat) {
        // URL to the chat directory:
        if (!defined('AJAX_CHAT_URL')) {
            define('AJAX_CHAT_URL', str_replace("index.php", "chat/", $scripturl));
        }
 
        // Path to the chat directory:
        if (!defined('AJAX_CHAT_PATH')) {
            define('AJAX_CHAT_PATH', dirname(__FILE__) . '/../chat/');
        }
 
        // Validate the path to the chat:
        if (@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
            // Include Class libraries:
            require_once(AJAX_CHAT_PATH.'lib/classes.php');
 
            // Initialize the chat interface:
            $ajaxChat = new CustomAJAXChatInterface();
        }
    }
 
    return $ajaxChat;
}

function getShoutBoxContent()
{
    global $scripturl;
 
    // Get the URL to the chat directory:
    if (!defined('AJAX_CHAT_URL'))
    {
        define('AJAX_CHAT_URL', str_replace("index.php", "chat/", $scripturl));
    }
   
    // Get the real path to the chat directory:
    if (!defined('AJAX_CHAT_PATH'))
    {
define('AJAX_CHAT_PATH', dirname(__FILE__) . '/../chat/');
    }
   
    // Validate the path to the chat:
    if (@is_file(AJAX_CHAT_PATH . 'lib/classes.php'))
    {
        // Include Class libraries:
        require_once(AJAX_CHAT_PATH.'lib/classes.php');
 
        // Initialize the shoutbox:
        $ajaxChat = new CustomAJAXChatShoutBox();
 
        // Parse and return the shoutbox template content:
        return $ajaxChat->getShoutBoxContent();
    }
    return null;
}
 
function getChatOnlineUserIDs() {
    return ($chatInterface = getChatInterface()) ? $chatInterface->getOnlineUserIDs() : array();
}

?>
Replace with
Code: [Select]
?>
EDIT: I got it sorted, the Top Stats MOD was interfering with something.
« Last Edit: March 19, 2009, 07:44:44 PM by mrtrc266 »

Offline tibaba

  • Semi-Newbie
  • *
  • Posts: 14
Re: AjaxChat Integration
« Reply #876 on: March 19, 2009, 07:20:26 PM »
Hello,

First, sorry for my bad english. I will try to explain my problem :

I will use the shout box and the chat, but not together.

If I check "Integrate shout box and chat room?", chat and shoutbox work without problem

(See ok.jpg)

If I uncheck "Integrate shout box and chat room?", chat work without problem, but shoutbox is blank, only menubar come.

(See nok.jpg)


Any idea?

Thanks in advance.


Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: AjaxChat Integration
« Reply #877 on: March 19, 2009, 07:31:00 PM »
@ tibaba  in the second pic it looks like the shoutbox is just collapsed?

Offline tibaba

  • Semi-Newbie
  • *
  • Posts: 14
Re: AjaxChat Integration
« Reply #878 on: March 19, 2009, 07:32:33 PM »
No, it's not collapsed, already tried this lol  :P

You can try it at : www.tibaba.ch [nofollow]

bullbreedluverz

  • Guest
Re: AjaxChat Integration
« Reply #879 on: March 19, 2009, 07:52:12 PM »
hi mrtrc266 - in your FAQ you give instructions to edit/remove channels from channel list

Code: [Select]
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = array(1,2);

i dont want any channels based on my forum boards i just want to have the public channel - how would i configure this edit correctly - would i just place 
Code: [Select]
$config['limitChannelList'] = array(0);