AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

Joe N

Hi. I installed the ajax chat.

I have this error on the shoutbox. It says ChatBot: Error: Connection status: 500

How come? FORUM URL: www.3smf.com/thechill

See attachment for more details:
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


mrtrc266

Quote from: Joe N on June 04, 2009, 05:11:18 AM
Hi. I installed the ajax chat.

I have this error on the shoutbox. It says ChatBot: Error: Connection status: 500

How come? FORUM URL: www.3smf.com/thechill

See attachment for more details:

Here you go your fix as well as some other useful info is in the link below.

~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

Joe N

Quote from: mrtrc266 on June 04, 2009, 10:41:01 AM
Quote from: Joe N on June 04, 2009, 05:11:18 AM
Hi. I installed the ajax chat.

I have this error on the shoutbox. It says ChatBot: Error: Connection status: 500

How come? FORUM URL: www.3smf.com/thechill

See attachment for more details:

Here you go your fix as well as some other useful info is in the link below.

~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

I checked my index.php for my Shoutbox and chat.

Shoutbox:

<?php
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license GNU Affero General Public License
 * @link https://blueimp.net/ajax/
 */

if (!$_GET['shoutbox']){
$host  $_SERVER['HTTP_HOST'];
$uri   rtrim(dirname(dirname($_SERVER['PHP_SELF'])), '/\\');
$extra 'chat/index.php';
header("Location: http://$host$uri/$extra");
}

// Show all errors:
error_reporting(E_ALL);

// Path to the chat directory:
define('AJAX_CHAT_PATH'dirname($_SERVER['SCRIPT_FILENAME']).'/');

// Include custom libraries and initialization code:
require(AJAX_CHAT_PATH.'lib/custom.php');

// Include Class libraries:
require(AJAX_CHAT_PATH.'lib/classes.php');

// Initialize the chat:
$ajaxChat = new CustomAJAXChat();
?>


Chat:

<?php
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license GNU Affero General Public License
 * @link https://blueimp.net/ajax/
 */

// Show all errors:
error_reporting(E_ALL);

// Path to the chat directory:
define('AJAX_CHAT_PATH'dirname($_SERVER['SCRIPT_FILENAME']).'/');

// Include custom libraries and initialization code:
require(AJAX_CHAT_PATH.'lib/custom.php');

// Include Class libraries:
require(AJAX_CHAT_PATH.'lib/classes.php');

// Initialize the chat:
$ajaxChat = new CustomAJAXChat();
?>


What should it be?

Thanks
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


mrtrc266

#2263
For your 500 error all you should have to do is set these file permissions (CHMOD) to 755

yourforum/chat/index.php

and

yourforum/shoutbox/index.php

Joe N

I tried it but said:

Change permissions (CHMOD)
The CHMOD command failed. Perhaps your host has disabled this function, or your forum runs on a Windows server.
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


mrtrc266

Quote from: Joe N on June 04, 2009, 01:45:33 PM
I tried it but said:

Change permissions (CHMOD)
The CHMOD command failed. Perhaps your host has disabled this function, or your forum runs on a Windows server.

I would definately contact your host about that. You should be able to CHMOD your files as needed.

Hardcase

Quote--------------------------------------------------------------------------------
Quote from: Hardcase on Yesterday at 07:48:49 PM
Just moved hosts and previously had no problems at all with my chatbox, but now when i enter anything with a hyphen it gives me this:

example: there's
output: there/'s



I know this is not the most important issue, but I believe you mean apostrophes ('), not hyphens (-), right?... Maybe it's not important, but just to avoid misconclusions or misunderstandings. 

You are right sir, but it does not answer the question, so can someone please help :D

philcross


Help required please...

I have 2.0 RC1-1 installed but emulated RC1 to install AjaxChat.

After installation, when I click the button I get a new page open with

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

blah blah blah


Can someone tell me where the problem lies please?

The install went OK so Im not sure where to start looking.

Thanks

mikungfu

Hi, one simple question:

What file should I edit in order to define the position of the shoutbox in the page layout. In the main page, it is presently above "News" and it is slightly shorter in length, comparing with the boards categories. I want to correct that, but I don't know which are the apropriate files.

Thanks! :)


[unplugged]

@mikungfu

All of the pertinent code should be located in the index.template.php
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



mikungfu

Quote from: SunKing on June 04, 2009, 09:43:29 PM
@mikungfu

All of the pertinent code should be located in the index.template.php

Thanks! It took me a while to figure out how to deal with the code (not much of a php expert: can't write but can read a bit, lol), but in the end I managed to do what I wanted.

Chit-Chat ChatterBox Boss

Quote from: Chit-Chat ChatterBox Boss on June 04, 2009, 02:29:16 AM
mrtrc266 I have this code here:


<?php

// Chat bot messages 

if(stristr($text'ChatBot Help Me'))
{
// KEYWORDS TRIGGER START   
$this->insertChatBotMessage
(
$this->getPrivateMessageID(),
//This is what the chatbot says when the visitor enters help me anywhere in a sentence!
"\nHow may I help you? Say any of the following lines.
1) ChatBot Commands\n"
);
// KEYWORD TRIGGER END
}

if(
stristr($text'ChatBot Commands'))
{
// KEYWORDS TRIGGER START   
$this->insertChatBotMessage
(
$this->getPrivateMessageID(),
//This is what the chatbot says when the visitor enters help me anywhere in a sentence!
"\nHere are all the commands you can use!:
Command: /kick [name]
Result: This will kick the member out of the chat room.
Command: /kick [name] [number]
Result: This will kick the member out of the chat room for the amount of time(in minutes) that you put for the number.
Command: /whois [name]
Result: This will display the member's IP Address.
Command: /me [your action]
Result: This will display your name in a action form. Example: "
/me fell off his chair" = Bill fell off his chair\n"

);
// KEYWORD TRIGGER END
}

?>



And I want to display only for the user roles (theres 4. 4 = bot, 3  = admin, 2 = mod, 1 = normal user). So this is what I tried to do but it doesn't seem to work.


<?php

// Chat bot messages 
if(stristr($text'ChatBot Help Me'))
{
if($this->getUserRole() == AJAX_CHAT_USER || $this->getUserRole() == AJAX_CHAT_MODERATOR || $this->getUserRole() != AJAX_CHAT_ADMIN)
{
// KEYWORDS TRIGGER START   
$this->insertChatBotMessage
(
$this->getPrivateMessageID(),
//This is what the chatbot says when the visitor enters help me anywhere in a sentence!
"\nHow may I help you? Say any of the following lines.
1) ChatBot Commands\n"
);
// KEYWORD TRIGGER END
}
else
{
return false;
}
}

if(
stristr($text'ChatBot Commands'))
{
if($this->getUserRole() == AJAX_CHAT_MODERATOR || $this->getUserRole() != AJAX_CHAT_ADMIN)
{
// KEYWORDS TRIGGER START   
$this->insertChatBotMessage
(
$this->getPrivateMessageID(),
//This is what the chatbot says when the visitor enters help me anywhere in a sentence!
"\nHere are all the commands you can use!:
Command: /kick [name]
Result: This will kick the member out of the chat room.
Command: /kick [name] [number]
Result: This will kick the member out of the chat room for the amount of time(in minutes) that you put for the number.
Command: /whois [name]
Result: This will display the member's IP Address.
Command: /me [your action]
Result: This will display your name in a action form. Example: "
/me fell off his chair" = Bill fell off his chair\n"
);
// KEYWORD TRIGGER END
}
else
{
// KEYWORDS TRIGGER START   
$this->insertChatBotMessage
(
$this->getPrivateMessageID(),
//This is what the chatbot says when the visitor enters help me anywhere in a sentence!
"\nHere are all the commands you can use!:
Command: /me [your action]
Result: This will display your name in a action form. Example: "
/me fell off his chair" = Bill fell off his chair\n"
);
// KEYWORD TRIGGER END
}
}

?>



How can I set this to work correctly? (You can see what part is for mods and admins and then the other is for normal users). When I do this change nothing displays.

Any idea on this. I keep trying but seem to fail. When I do the above edit it also seems to make the chat lag a little when I do the commands. Maybe thats because it is looking in the code but having a brain fart and not working. So maybe someone that knows how to get the commands working above for only the desired ranks would be GREAT!
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

mrtrc266

Quote from: philcross on June 04, 2009, 03:53:01 PM
Help required please...
I have 2.0 RC1-1 installed but emulated RC1 to install AjaxChat.
After installation, when I click the button I get a new page open with
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
blah blah blah

Can someone tell me where the problem lies please?
The install went OK so Im not sure where to start looking.
Thanks
For your Internal Server error all you should have to do is set these file permissions (CHMOD) to 755

yourforum/chat/index.php

and

yourforum/shoutbox/index.php

mrtrc266

@ Hardcase not sure off the top of my head, out of 114 pages I have never seen that before, what's the url to your site? I will take a look when I get a few moments.

@ Chatterbox, is that the "make you chatbot smarter edit?" If so I have never messed with it, but I've been meaning to and will check it out on my next days off.

Chit-Chat ChatterBox Boss

Quote from: mrtrc266 on June 05, 2009, 01:24:05 AM
@ Chatterbox, is that the "make you chatbot smarter edit?" If so I have never messed with it, but I've been meaning to and will check it out on my next days off.
Sounds great. Yea all I am thinking it is (obviously) is I am not placing the strings correct, or I am missing something for it to look for the user roles. Hope this can be solved cause as you can see in the code I am editing I want it to show commands (based on your user role). In the near future after solving this problem I will add more things that the bot can do through this edit!

Thanks bro!
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

philcross

QuoteFor your Internal Server error all you should have to do is set these file permissions (CHMOD) to 755

yourforum/chat/index.php

and

yourforum/shoutbox/index.php

THANK YOU SO MUCH !!!

Please tell me that wasn't in the instructions - I didnt see it if it was.  :-[




mrtrc266

Quote from: philcross on June 05, 2009, 01:44:11 AM
QuoteFor your Internal Server error all you should have to do is set these file permissions (CHMOD) to 755

yourforum/chat/index.php

and

yourforum/shoutbox/index.php

THANK YOU SO MUCH !!!

Please tell me that wasn't in the instructions - I didnt see it if it was.  :-[

Nope, not in the instructions....only in my signature LOL  ;)
~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

mrtrc266

Quote from: Chit-Chat ChatterBox Boss on June 05, 2009, 01:38:32 AM
Quote from: mrtrc266 on June 05, 2009, 01:24:05 AM
@ Chatterbox, is that the "make you chatbot smarter edit?" If so I have never messed with it, but I've been meaning to and will check it out on my next days off.
Sounds great. Yea all I am thinking it is (obviously) is I am not placing the strings correct, or I am missing something for it to look for the user roles. Hope this can be solved cause as you can see in the code I am editing I want it to show commands (based on your user role). In the near future after solving this problem I will add more things that the bot can do through this edit!

Thanks bro!

This should be a fun one LOL. I am not a coder...more of a tweaker ;)  SK might like to take this challenge, this could be a lot of fun. I've been meaning to play with this and mess with my members LOL. We could have our personal AI Bot:D

philcross

#2278
Me again

I got Chat working, but have noticed a problem (dont know if its my pc or viewable by everyone).

But, since Chat started working, the menu bar on the forum index page is "flickering"

See http://www.xxxxxxxxx.co.uk/xxxx/index.php

Anyone else see it, or just me.

Any ideas ?

Thanks

OOPS user=xxxxxxxxx password=xxxxxxxxx

mrtrc266

@ philcross I just went to your site in IE and FF and it looks fine in both browsers. I don't see any flickering at all.

Advertisement: