[MODM] AjaxChat integration for XenForo

[MODM] AjaxChat integration for XenForo beta 2a

No permission to download
Edit: Now it works! I've checked the error logs in the ACP. There was a conflict with the Self Delete by Waindigo-addon.
Do you have the error details to share? I'd like to know how to avoid these conflicts when they occur.

Yeah, I have 1.4.1 :)

I should have updated my post. The only issues that seems to have continued would be the underscore issue and when we log in sometimes we're logged right back out and have to log in again. And when people log out sometimes there's a lot of spam listed with logging in and out.

Other than that it works great.
When Ajax Chat sends commands (like ban, private messages, etc.) it separates arguments with spaces. So if it tries to send a message "Hello" to a username with a space (let's say "Tainted Hubris"), it will look for the user "Tainted" and try to send the message "Hubris Hello"...
The Ajax Chat developers introduced underscores as replacement for spaces as a workaround for this issue.

I've also tried to fix the log in/log out issues and so far on my site it seems to be working quite well. I'm just not really sure why.

I've been seriously lacking time to package a new release, I'll try my best!
 
Do you have the error details to share? I'd like to know how to avoid these conflicts when they occur.

Of course:

Don't know how it's exactly known in english (because i've the german language active) but in the first field with the Errorinfo is:
Code:
ErrorException: Fatal Error: Access level to Waindigo_SelfDelete_ControllerPublic_Abstract::_preDispatch() must be public (as in class MODM_AJAXChat_ControllerPublic_Chat) - library/Waindigo/SelfDelete/ControllerPublic/Abstract.php:0

in the processing (2nd field):
Code:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

and in status (3rd field):
Code:
array(3) {
  ["url"] => string(56) "http://***/index.php?chat/login"
  ["_GET"] => array(1) {
    ["chat/login"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Of course:

Don't know how it's exactly known in english (because i've the german language active) but in the first field with the Errorinfo is:
Code:
ErrorException: Fatal Error: Access level to Waindigo_SelfDelete_ControllerPublic_Abstract::_preDispatch() must be public (as in class MODM_AJAXChat_ControllerPublic_Chat) - library/Waindigo/SelfDelete/ControllerPublic/Abstract.php:0

in the processing (2nd field):
Code:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

and in status (3rd field):
Code:
array(3) {
  ["url"] => string(56) "http://***/index.php?chat/login"
  ["_GET"] => array(1) {
    ["chat/login"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
Thanks for the details.

This is an error/forward compatibility issue on my part.
In library/MODM/AJAXChat_ControllerPublic_Chat.php, at line 5 change the code as follows (changes in red):
Rich (BB code):
<?php

class MODM_AJAXChat_ControllerPublic_Chat extends XenForo_ControllerPublic_Abstract
{
    public protected function _preDispatch($action)
    {
        if (!XenForo_Visitor::getInstance()->hasPermission('modm_ajaxchat', 'ajax_chat_view'))
        {
            throw $this->getErrorOrNoPermissionResponseException('');
        };
    }
 
Hey folks,

What does this mean exactly?

"Select the nodes you want to generate channels from. Leaving this setting blank will generate a "wrong channel name" error."

From my understanding, I have to actually create a new forum category just for this mod?

I checked "disable native UI inteface.." option but it still looks, well ugly and not matching my site's theme. Did miss anything?
 
Last edited:
it doesent show up as forum section, when installed and you followed setup propertly a navbar button should apear named "Chat" if nothing then make sure you given premissions to your group to be able to access it.
 
it doesent show up as forum section, when installed and you followed setup propertly a navbar button should apear named "Chat" if nothing then make sure you given premissions to your group to be able to access it.

It shows up now (please see my post). But, it's ugly and doesn't inherit my forum style even though disable native UI is checked.
 
It shows up now (please see my post). But, it's ugly and doesn't inherit my forum style even though disable native UI is checked.
well it's still in beta stage so you will be finding problems here and there secondly it isnt really meant to work with 1.4.x of xenforo but it paerently do but then isuses would be found for sure.
 
Anyone know how to show number of users in chat, in the Chat tab (nav menu)?
This is not supported, although it could be a nice feature. I'll look into it.

Considering UI, I've made improvements in inheriting XenForo style, but this is limited to "default" XenForo themes. If your site provides an extensively modified layout/style, you'll have to have the chat UI customized too.
This, for example, is obtained without modification because it is totally based on a standard XF style with modified colors/style properties:
upload_2015-1-5_22-10-35.webp
 
Thanks @ManOnDaMoon

Yes the # of users in tab (realtime of course) would be a great feature, plus makes members more engaging in chat.

Some other feature requests if I may :)

- disable / enable certain bbcodes
- inherited from XF spam/word filtering
- enable / disable emoticons (or certain ones). On a side note, I'd love to replace all with modern, flat ones.
- disable the auto drop down in the user list when you log in. Not sure what the purpose of this is.
- disable some other features like roll dice. I'm running a Christian forum so I don't want people to use this to cast lots lol ;) (joke)
 
The style customization files have been moved to xenforo templates in this add-on: modm_ajaxchat_shoutbox and modm_ajaxchat_shoutbox.css
 
Fg1dS3I.png

Whuy chatbox appears like this on forums list?
 
Check your console for javascript errors, it seems the shoutbox isn't loaded properly.
In browser's console?
Code:
 XenForo.activate()
xenforo.js:209 XenForo.init() 283ms. jQuery 1.11.0/1.2.8-dev
tweet_button.b68aed79dd9ad79554bcd8c9141c94c8.fi.html:1 Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
xenforo.js:220 XenForo.activate(e.fn.init[1])
Edit: it works now in xenPorta's page, but not in the forums list?
aNTcgIt.png


Edit2: i think modm_ajaxchat_wf_shoutbox was broken, now it works perfectly after copied EWRblock_AjaxChatShoutbox to modm_ajaxchat_wf_shoutbox
 
Last edited:
Top Bottom