MyBB Community Forums

Full Version: AJAX Chat - including MyBB integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Hi... i have a problem with this mod.

when i try to open index.php i have this error

Query: SELECT userID, userName, userRole, channel, UNIX_TIMESTAMP(dateTime) AS timeStamp, ip FROM ``.ajax_chat_online ORDER BY userName; Error-Report: Incorrect table name 'ajax_chat_online' Error-Code: 1103
(2009-05-13, 12:25 PM)T0m Wrote: [ -> ]
(2007-10-18, 09:27 PM)madblueimp Wrote: [ -> ]Important:
As the time and effort spent to support the AJAX Chat project has increased my support here on this topic will discontinue.I will continue to answer support requests on the Official SourceForge project site.
Feel free to use this topic for user-to-user support.

Again i requote.
Sorry but dont work for me Sad
Hello from the SourceForge project site.

I just want to clarify the situation regarding support for this project here. We (actually it's just me at the moment) can offer only very limited support for the integration versions of chat. We do not have anyone on the team currently who has a test run of myBB working with AJAX Chat integrated (I may do so in the future if time permits). If you have particular questions about the myBB integration, your best bet is to communicate here as a group. I always appreciate it if you report fixes you find on the SF site so that I can push the changes through to the official version.

If the problem is specific to myBB integration (for example, rooms not showing up) here is the best place to search for help among other users, and earlier posts in this thread. If it is a general problem (chatbot gives error: 404 ) it may be answered on the project wiki:
http://ajax-chat.wiki.sourceforge.net/
(sourceforge is a total mess right now and I'm thinking of moving to google code if it doesn't improve, but the wiki works).
Or you can try on our forums, but if it looks like a mybb specific issue I will just send you to ask someone who knows myBB's integration better.

For example, someone on our forums posted the following fix to have channels show up properly:

lib/class/CustomAJAXChat.php line 115 is: 
if($forumPermissions[$value]['canview'] == 'yes' || $value == $this->getConfig('defaultChannelID')) { 
 
should be: 
if($forumPermissions[$value]['canview'] == '1' || $value == $this->getConfig('defaultChannelID')) { 

This issue cropped up with the latest myBB version and I could use a confirmation of whether or not this change fixes the problem.

Problems like the "XML Parsing Error" listed earlier are actually not directly related to myBB. There is a fix for that on the wiki.

Sometimes it's unclear where the problem lies. That's when it's really hard to find where to look.
I think this is a Great Project, specially because it have a MyBB Integration, but dont have documentation at SourceForge page, this is a great dissappointment.

Maybe some users can make a group for the project and help u on it Wink

So, what do you think about it?

Im really interested on the ajax chat project.

Regards.
(2009-07-03, 04:09 AM)rafaweb Wrote: [ -> ]dont have documentation at SourceForge page, this is a great dissappointment.

Do you mean it's disappointing that the documentation is hosted on sourceforge? Because it's there in the wiki. I plan to put the documentation in the project as an HTML file in the next release.

I am also thinking of moving from sourceforge completely though. Probably to GitHub. For now, though, sourceforge is the best option we have.

You're welcome to join the team if you're interested in helping. I only know phpbb3, not mybb.
(2009-07-03, 06:11 AM)Frug Wrote: [ -> ]
(2009-07-03, 04:09 AM)rafaweb Wrote: [ -> ]dont have documentation at SourceForge page, this is a great dissappointment.

Do you mean it's disappointing that the documentation is hosted on sourceforge? Because it's there in the wiki. I plan to put the documentation in the project as an HTML file in the next release.

I am also thinking of moving from sourceforge completely though. Probably to GitHub. For now, though, sourceforge is the best option we have.

You're welcome to join the team if you're interested in helping. I only know phpbb3, not mybb.

The problem is not the host, the problem of the documentation is because is poor.

Mmm, for the team Join, I send you a PM now.

Regards.
Mmm, the documentation covers nearly everything we support. SMF is not mentioned in the documentation for reasons I mentioned above.

I have a suspicion you haven't found our wiki: http://ajax-chat.wiki.sourceforge.net/

If you have particular suggestions of what to add to the wiki (such as SMF related topics) I can make you a wiki editor there.

As I mentioned, I plan to bundle the wiki with the next release as well. It seems people have trouble finding it, which I blame on sourceforge being a confusing mess.
I would like to insert the Ajax chat on the index page as Shoutbox.
Does someone want to explain where we need to insert the following code:

Quote:Shoutbox:
=========

AJAX Chat is also usable as shoutbox - this is a short guide on how to set it up:


1. Shoutbox stylesheet
----------------------

Add the following line to the stylesheet (CSS) of all pages displaying the shoutbox:

@import url("http://example.org/path/to/chat/css/shoutbox.css");

Replace http://example.org/path/to/chat/ with the URL to the chat.
Modify css/shoutbox.css to your liking.


2. Shoutbox function
--------------------

Add the following function to your PHP code:

<?php
function getShoutBoxContent() {
// URL to the chat directory:
if(!defined('AJAX_CHAT_URL')) {
define('AJAX_CHAT_URL', './chat/');
}

// Path to the chat directory:
if(!defined('AJAX_CHAT_PATH')) {
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/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;
}
?>

Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory.


2. Shoutbox output
------------------

Display the shoutbox content using the shoutbox function:

<div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>

Thanks in advance, Smile
I'm interested in using this as a shoutbox too. I got the chat working with Mybb but not as a shoutbox.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38