Chat 2 by Siropu

Chat 2 by Siropu [Paid] 2.3.5

No permission to buy (€29.99)
Code:
XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 src/XF/Db/AbstractStatement.php:212
Generated by: Unknown account Oct 22, 2017 at 3:26 AM

Code:
Stack trace
DELETE  FROM xf_siropu_chat_message WHERE message_date <=
------------

#0 src/XF/Db/Mysqli/Statement.php(174): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
#1 src/XF/Db/Mysqli/Statement.php(35): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
#2 src/XF/Db/Mysqli/Statement.php(46): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(69): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(202): XF\Db\AbstractAdapter->query('DELETE  FROM xf...', '30')
#5 src/addons/Siropu/Chat/Repository/Message.php(82): XF\Db\AbstractAdapter->delete('xf_siropu_chat_...', 'message_date <=', '30')
#6 src/addons/Siropu/Chat/Cron/Message.php(11): Siropu\Chat\Repository\Message->deleteMessagesOlderThan('30')
#7 [internal function]: Siropu\Chat\Cron\Message::deleteOlderMessages(Object(XF\Entity\CronEntry))
#8 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#9 src/XF/Job/Manager.php(241): XF\Job\Cron->run(8)
#10 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 8)
#11 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 8)
#12 job.php(15): XF\Job\Manager->runQueue(false, 8)
#13 {main}
 
Also, some bugs here.

1.webp
3.webp
2.webp

Chrome Version 62.0.3202.62 (Official Build) beta (64-bit)

Edit: you can't see it very well. The menu selection for font color/size/family is behind the chat bar.
 
Is there a option to have a text box for input instead of a single line?
What do you mean?

Where are you loading the editor script?
I'm loading the editor the same way XF does it using the <xf:editorrow...

Once you've selected at least one choice in Options -> Chat -> Disallowed custom BB codes, you can't select none anymore, you're always stuck with at least one choice.
You have to hold CTRL key to deselect, but I will add an option to make it easier.
The selection seems to have no effect however. The selected BB Code button is still shown in the editor toolbar.
The effect is not being able to use that bbcode in the chat. I will fix the button issue.
When you toggle BB Code off somewhere else in XenForo and head to the message page, the editor there will be disabled as well.
I've noticed that. You can enable the BB code toggle button from chat options.

I keep getting that the name doesn't match the required format.

/nick Andrew
I can't reproduce this.

@Solidus, will fix the db error. As for the other issue, that's a problem with the editor itself not repositioning the menus in fixed position. I will submit a bug report to see if they can do something about it.
 
Code:
ErrorException: [E_NOTICE] Undefined index: message_color src/addons/Siropu/Chat/Pub/Controller/Chat.php:469
Code:
Stack trace
#0 src/addons/Siropu/Chat/Pub/Controller/Chat.php(469): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/dat/...', 469, Array)
#1 src/XF/Mvc/Dispatcher.php(249): Siropu\Chat\Pub\Controller\Chat->actionSaveSettings(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Siropu\\Chat:Cha...', 'SaveSettings', 'json', Object(XF\Mvc\ParameterBag), 'siropuChat', Object(Siropu\Chat\Pub\Controller\Chat), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1844): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}
Code:
Request state
array(4) {
  ["url"] => string(29) "/index.php?chat/save-settings"
  ["referrer"] => string(19) "https://mytest.com/"
  ["_GET"] => array(1) {
    ["chat/save-settings"] => string(0) ""
  }
  ["_POST"] => array(6) {
    ["editor_on_top"] => string(1) "1"
    ["display_mode"] => string(16) "above_forum_list"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

And

Code:
XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 src/XF/Db/AbstractStatement.php:212
Code:
Stack trace
DELETE  FROM xf_siropu_chat_message WHERE message_date <=
------------

#0 src/XF/Db/Mysqli/Statement.php(174): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
#1 src/XF/Db/Mysqli/Statement.php(35): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
#2 src/XF/Db/Mysqli/Statement.php(46): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(69): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(202): XF\Db\AbstractAdapter->query('DELETE  FROM xf...', '30')
#5 src/addons/Siropu/Chat/Repository/Message.php(82): XF\Db\AbstractAdapter->delete('xf_siropu_chat_...', 'message_date <=', '30')
#6 src/addons/Siropu/Chat/Cron/Message.php(11): Siropu\Chat\Repository\Message->deleteMessagesOlderThan('30')
#7 [internal function]: Siropu\Chat\Cron\Message::deleteOlderMessages(Object(XF\Entity\CronEntry))
#8 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#9 src/XF/Job/Manager.php(241): XF\Job\Cron->run(7.9999990463257)
#10 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9999990463257)
#11 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 7.9999990463257)
#12 job.php(15): XF\Job\Manager->runQueue(false, 8)
#13 {main}
Code:
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(19) "https://mytest.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
@Siropu just wanted to thank you for sending XF1 license holders of your chat addon this new one for XF2. Little things like that, no branding etc goes a long way to goodwill and keeping your customers happy. Keep up the good work and I look forward to supporting your other developments in the future.
 
Last edited:
Has anyone been able to make chat visible to guests without creating a room for them? If you have, how did you do it?
What do you mean by "make chat visible to guests"? If user group Unregistered/Unconfirmed has the the permissions "View chat" and "Use chat", they can see the chat, but cannot see any rooms if no guest room is selected.
 
What do you mean by "make chat visible to guests"? If user group Unregistered/Unconfirmed has the the permissions "View chat" and "Use chat", they can see the chat, but cannot see any rooms if no guest room is selected.
I want guests to be able to view the chatrooms but not be able to post in them. This isn't possible if a room isn't set up for them, they have to be able to join a room first in order to see anything.
 
The only thing you can do is set the general room as guest room and only give the view permission for Unregistered/Unconfirmed user group. You can't view other rooms if you haven't joined them and guests can't join rooms.
 
The only thing you can do is set the general room as guest room and only give the view permission for Unregistered/Unconfirmed user group. You can't view other rooms if you haven't joined them and guests can't join rooms.
Thank you, Siropu. That works fine.
 
What do you mean?


I'm loading the editor the same way XF does it using the <xf:editorrow...


You have to hold CTRL key to deselect, but I will add an option to make it easier.

The effect is not being able to use that bbcode in the chat. I will fix the button issue.

I've noticed that. You can enable the BB code toggle button from chat options.


I can't reproduce this.

@Solidus, will fix the db error. As for the other issue, that's a problem with the editor itself not repositioning the menus in fixed position. I will submit a bug report to see if they can do something about it.

Screen Shot 2017-10-22 at 12.19.52 PM.webp
This is from typing /nick testname
 
@Siropu

My bold editor button is missing. I have it enabled in the options, but the html source of the page states, that it is among the disabled buttons: data-buttons-remove="_align,_indent,_list,undo,redo,italic,color,fontFamily,fontSize,_link,_image,_media,xfQuote,xfSpoiler,xfCode,xfInlineCode,bold,xfSmilie"

Also disabling basic bb codes like bold or italic won't prevent user from using them with keyboard shortcuts like CTRL + B. After submitting, these bb codes will also still be rendered by the chat.
 
Code:
Error: Call to undefined method Siropu\Chat\Pub\Controller\Conversation::assertMessageExists() src/addons/Siropu/Chat/Pub/Controller/Conversation.php:222
Code:
Stack trace
#0 src/XF/Mvc/Dispatcher.php(249): Siropu\Chat\Pub\Controller\Conversation->actionDelete(Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Siropu\\Chat:Con...', 'Delete', 'json', Object(XF\Mvc\ParameterBag), '', Object(Siropu\Chat\Pub\Controller\Conversation), NULL)
#2 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#3 src/XF/App.php(1844): XF\Mvc\Dispatcher->run()
#4 src/XF.php(328): XF\App->run()
#5 index.php(13): XF::runApp('XF\\Pub\\App')
#6 {main}
Code:
Request state
array(4) {
  ["url"] => string(135) "/chat/conversation/*/delete?_xfRequestUri=%2F&_xfWithData=1&_xfToken=***&_xfResponseType=json"
  ["referrer"] => string(19) "https://mytest.com/"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "***,***"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 
A couple of minor bugs on the demo site:

1. Hovering over the timestamp of the most recent message causes the message list to scroll slightly.
Xenforo-2-SiropuChat-Beta-LastMsgScroll.gif

2. The list of open rooms causes the "Private conversations" element to drop down, which pushes the chatter list to the left, leaving little room for chat messages:
Xenforo-2-SiropuChat-Beta-RoomList-ResponsiveLayoutIssue.webp

3. In private conversations, changing from one conversation to another and then clicking the recipient's name in the chat message window will go directly to their profile page, skipping the member tooltip.

And a possible usability enhancement: with "Hide chatter list" checked, there does not seem to be a way to change between private chats. Could I suggest implementing a one-click user list toggle (without needing to open the settings menu)? On narrow viewports this is already possible via the "Users" button. Or add a drop-down of conversations when "Private conversations" is clicked when already in this section. Or alternatively, show a narrow conversation list instead? (mocked up below, the toggle would alternate between standard and narrow user list in the private conversation area). There are a number of ways to approach this that would avoid needing to dive into the chat settings menu to uncheck "hide chatter list" just to switch between private chat conversations.
Xenforo-2-SiropuChat-Beta-SuggestionNarrowConversationListDoNotHide2.webp
 
Would you mind to provide a method to alter the data in each controller or shift the code from the data trait into something like a repository? The XFCP is not able to override traits and per php definition, you can't override trait functions and call them from within the overriding function without a workaround. So if someone wanted to extend the data, he had to hook into every controller method that makes use of it instead and do postprocessing instead of in place processing.
 
Top Bottom