Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Нow to display the chat window in popout or in block???
Very thanks for any answers.
Нow to display the chat window in popout or in block???
Very thanks for any answers.
Comments
Comment #1
TrevorBradley CreditAttribution: TrevorBradley commentedI'm trying the same thing today, without much luck. I've managed to get the node to render using:
(where 1 is the nid of the chat node) but that just displays the node without the chat area...
Comment #2
TrevorBradley CreditAttribution: TrevorBradley commentedOK, I've figured it out, but it will require editing the module... It looks as if it's hard coded to refuse chat functionality unless it's loaded on its own node page...
On line 696 of chatroom.module, comment out this line:
//if ($view_mode == 'full' && node_is_page($node)) {
and replace it with this one...
if ($view_mode == 'full') {
Then enable PHP Filter, and use:
print drupal_render(node_view(node_load(1)));
Within the block you want to display.
It would be awesome if there was some way to call chatroom_chat_view function to display chat windows in other contexts.
Comment #3
TrevorBradley CreditAttribution: TrevorBradley commentedJust fixed this again after the update (though I got confused that there were two calls to node_is_page within chatroom.module)...
I think this was incorrectly flagged as "needs work" when created. I don't see why this one line fix would hurt anything in the module. Any chance this might make it in? Chat works great in blocks and there's no reason to exclude it from them!
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedmoving to 7.x-2.x.
7.x-1.x is dead to me.
Comment #5
TrevorBradley CreditAttribution: TrevorBradley commentedUgh... Not fun.
I kept getting bizzare error messages trying to update, and then assuming there was no possible upgrade path I simply deleted all chatroom database tables, the entry from the system table, and tried to install from scratch.
When accessing the chat node I now get a white screen of death and the following error in my logs:
PHP Fatal error: Call to a member function get() on a non-object in .../sites/all/modules/chatroom/chatroom.module on line 388
I'll keep poking it to see if I get a different response.
Also, I'm assuming the README is out of date - it still makes reference to chatroomread.php.
EDIT... Looks like this might be a nodejs issue, hold on..
EDIT2: Nope, I thought it was because nodejs wasn't properly installed... but I'm still getting this error. Investigating.
EDIT3: My fault (Due to attempting to add chat as a block on the sidebar) - though I still can't get it to work. I'll investigate and report back.
Comment #6
TrevorBradley CreditAttribution: TrevorBradley commentedHaving a new issue, starting a new thread...
Comment #7
TrevorBradley CreditAttribution: TrevorBradley commentedNope, I give up, going back to 7.x-1.x. Nodejs is too hard for me this weekend.
I keep getting a 403 Forbidden error message when the javascript attempts to POST to [mysite]/chatroom/message/post/2.. when I go to that page manually I'm getting the following error messages.
Warning: Missing argument 2 for chatroom_user_has_access() in chatroom_user_has_access() (line 424 of [...]/sites/all/modules/chatroom/chatroom.module).
Notice: Undefined variable: account in chatroom_user_has_access() (line 425 of [...]/sites/all/modules/chatroom/chatroom.module).
Notice: Trying to get property of non-object in Chatroom->userHasAccess() (line 117 of[...]/sites/all/modules/chatroom/chatroom.chatroom.inc).
Any ideas?
Comment #8
TrevorBradley CreditAttribution: TrevorBradley commentedIssue title changed back, not my thread to hijack...
Comment #9
langworthy CreditAttribution: langworthy commentedI placed a chatroom in a block by using Views.
Re: #7. I get 403 errors if the chat is not public. i'll see if there is an issue for that.
Comment #10
TrevorBradley CreditAttribution: TrevorBradley commented@langworthy: I can confirm the chat I was getting errors on was private - only accesible to authenticated users.
Thanks for the tips on Views... I'll have to give that a try if I ever get brave enough to try 7.x-2.x out again...
Comment #11
langworthy CreditAttribution: langworthy commented@TrevorBradley: the 7.x-2.x branch of chatroom has been update so I'm no longer getting the errors on private chats.
If you want to quickly test out the current state of chatroom you can take a look at a simple distro I've created. http://github.com/sprice/chat
Comment #12
fenda CreditAttribution: fenda commentedSo we would need to display a single Drupal field HTML (the chatroom field) by itself in a menu page callback. This would allow us to make chat popups etc. (Would also making use chat on smart phones easier)
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedthis is possible now via some simple site config. so i guess this boils down to a documentation issue. i'm happy to review a doc page if someone creates one explaining how to create a content type with a chatroom field.