Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
1.5k views
in Plugins by
Hi,

i would like to integrate Ajaxchat on Q2A.

here: https://github.com/Frug/AJAX-Chat/wiki/Custom-integration-howto

But i really don't know how to do ? i can pay someone to do this ?

thank you Claude
Q2A version: 1.6.2
by
I don't have an answer about the app you mention, but there is a chat plugin available (made by me) for Q2A: https://github.com/svivian/q2a-chat-room
by
Hi Scoot,

Thank's i already add this plugin. i just need more option because i would like to create a private room, for admin and moderator. This is why i ask this question. ;)

my problem, i'm not professional for this and really not understand some part, but i try ;).

if someone is interesting to offer this service, i can pay ;). i work for a nice project with Q2A in the future, but is under-construction.

if you know, let me know.

Thank you Claude
by
Hi Claude, I am interested in integrating Ajaxchat with your Q2A installation. Can you please PM me your requirements?
by
edited by
I have made this demo on my testing site you can see it on http://digitizormedia.com/qa -> first register / login to q2a site and then open chatroom -> http://digitizormedia.com/qa/chat - you can see you are automatically logged into chat.

I am writing a tutorial on this and will share it on this forum in a short while. You can use it to configure it on your Q&A. Best.

3 Answers

+5 votes
by
selected by
 
Best answer

The integration involves three important steps:

1. Initializing the Q2A environment inside AJAX-Chat

2. Re-jigging Q2A users and setting them up so that they can log into AJAX-Chat without registering

3. Set Q2A user to be able to automatically log into chat if they are already logged into Q2A.

I have jotted down the integration steps on a detailed blog post which you can find here: http://digitizor.com/2014/01/30/integrate-ajaxchat-question2answer-q2a/

Thanks.

by
Thank you very much. I will try on monday. I see the demo perfect. I will try to hide some options : disconnect, select theme, and settings viewer for the user ;)

Thanks again
Claude
by
Tutorial Updated with new content and more information. Thanks.
0 votes
by

Hi dkd903, 

i follow your instruction, everything ok but only for the admin. When i try to login with the user, i get an error. 

maybe i do something wrong in config.php, CustomAJAXChat.php, custom.php. I think is some problem to redicrection because can not find the user. 

 

some error here on CustomAJAXChat.php :

 

// Store the channels the current user has access to
// Make sure channel names don't contain any whitespace
function &getChannels() {
if($this->_channels === null) {
$this->_channels = array();
 
$customUsers = $this->getCustomUsers();
 
// Get the channels, the user has access to:
if($this->getUserRole() == AJAX_CHAT_GUEST) {
$validChannels = $customUsers[0]['channels'];
} else {
$validChannels = $customUsers[$this->getUserID()]['channels'];
}
 
thank you for you help
by
My tutorial does not mention about any change in the above function that you have pasted.
by
hi dkd903,

yes of course, this is a code include in CustomAJAXChat.php. after follow the instruction, i get an error there.

Maybe because i not create a room, but by default, is public and private.

I just not understand because when i log in administrator (Q2A), the chat open without problem. i can see the administrator name. Login and Logout ok. but not for user.

thank for you help
by
Hi Claude, if you want to add custom rooms based on Q2A categories, then this tutorial may be of some help to you -> http://digitizor.com/2014/02/01/how-to-create-chatrooms-in-php-ajax-chat-based-on-question2answer-categories/
by
Is everything okay now?
by
Yes dkd903, this is perfect. Thank you very much for you help
by
You're welcome, sir
0 votes
by

After editing the file, I get a white screen with : // Question2Answer initialization: define('Q2A', true); require_once '../qa-include/qa-base.php'; require_once QA_INCLUDE_DIR.'qa-app-users.php'; require_once QA_INCLUDE_DIR.'qa-db-selects.php';

http://piaskownica.vot.pl/chat/

 

...