Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Looking to see if integrating with Organic Groups is on the list or could make the list (possible)?
Basically when a user logs in, drupalchat would look at all the groups the user belongs to and then filter/create the Online User list based on all the members belonging to those groups.
Thanks,
David
Comments
Comment #1
Equinger CreditAttribution: Equinger commentedSubscribing.
Comment #2
Equinger CreditAttribution: Equinger commentedHere's a patch for this integration. Please review it. I also believe there was a problem that I addressed with User Relationship integration. Great module!
Comment #3
psychobyte CreditAttribution: psychobyte commentedSubscribing
Comment #4
Apfel007 CreditAttribution: Apfel007 commentedis this patch working? I didn't have time to test it- yet..
Comment #5
sjeandroz CreditAttribution: sjeandroz commentedI tried it and it seems to works! thanks it's a usefull patch!
Comment #6
darklrd CreditAttribution: darklrd commentedThanks a lot! I will commit it in 6.x-2.x-dev.
@all - Btw, I had a query. Why are you not using 6.x-2.x?
Thanks
Comment #7
thirdender CreditAttribution: thirdender commentedI got this to work against DrupalChat 7.x-1.0-beta10 and Organic Groups 7x-1.5. I had to modify the query to work with the new Organic Groups structure. Seems to work pretty good though. Also, I created the diff against a live module folder (not against git), so please let me know if that works or if I should re-roll the patch.
Also, I pulled most of the new query code from Code Karate: Drupal 7 getting all members of an Organic Group. However, I think I missed the user->status check. That shouldn't be important right? Because only logged in users will be shown…?
Comment #8
edutrul CreditAttribution: edutrul commentedthirdender: I didn't have success to reproduce your patch on tag 7.x-1.0-beta10 and also on current branch 7.x-1.x(tag: 7.x-1.0-beta15)
Greetings
Comment #9
darklrd CreditAttribution: darklrd commentedthirdender, thank you for providing this patch, will review it and try to include it in current branch.
Comment #10
darklrd CreditAttribution: darklrd commentededutrul, please feel free to submit a patch if you are working on this, thanks! :)
Comment #11
candelas CreditAttribution: candelas commentedIs this patch working in the 7.x-1.4? Thanks
Comment #12
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #13
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedAnything for OG 7.2?
When used with OG 7.2:
|Warning: Invalid argument supplied for foreach() in _drupalchat_buddylist() (line 936 of d7/modules/all/drupalchat/drupalchat.module).
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (ogm.etid <> '1')' at line 1: SELECT DISTINCT ogm.etid AS etid#012FROM #012{og_membership} ogm#012WHERE (ogm.entity_type = :db_condition_placeholder_0) AND (ogm.gid IN ()) AND (ogm.etid <> :db_condition_placeholder_1) ; Array#012(#012 [:db_condition_placeholder_0] => user#012 [:db_condition_placeholder_1] => 1#012)#012 in _drupalchat_buddylist() (line 948 of /7/modules/all/drupalchat/drupalchat.module).
it brings the site down
Comment #14
sadashiv CreditAttribution: sadashiv commentedHi,
I tried the patch with og 7.2 and it breaks. I modified few parts to work with og 7.2 and also added some additional features to create og's as chatrooms. Would be great if we all can test this and move this ahead.
Hth,
Sadashiv.
Comment #15
sadashiv CreditAttribution: sadashiv commentedHi,
Previous patch didn't worked for og as chatrooms. Fixed that issue in this patch.
Hth,
Sadashiv.
Comment #16
sadashiv CreditAttribution: sadashiv commentedHi,
Previous patch worked but showed wrong chatroom window heading. Have fixed that, this patch includes all changes.
Hth,
Sadashiv.
Comment #17
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedis there nodejs integration for this?
Comment #18
jukka792 CreditAttribution: jukka792 as a volunteer commentedHi,
applied patch #16 and it seems to work nicely!
But my log file comes full of warnings:
"Warning: Invalid argument supplied for foreach() in function _drupalchat_buddylist() (line 982 drupalchat.module"
related to this:
+ // Create a flat array of user IDs
+ foreach ($results as $member) {
+ $users[] = $member->etid;
Comment #19
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commentedWill you please try this one?
Comment #20
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedThe newest patch in #19 is not applying at all.
I also am using the official version 7.x-1.8 version of the module
Comment #21
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedUpdated patch for 7.x-2.1
Comment #22
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #23
izmeez CreditAttribution: izmeez commentedJust updating issue metadata for drupalchat version.
Comment #24
ledjerdemain CreditAttribution: ledjerdemain commentedHello everyone!
I tried to apply patch #21 and although it beautifully displays chatrooms as buddies in the buddylist, messages that are written in a Group chatbox do not appear to other users.
Note: It also limits the buddylist to those users who are actually group buddies (which is sweet!)
I m using Ajax and a latency of 120 and a refresh rate of 7 seconds. I'd greatly appreciate any light you might shed upon the matter.
Comment #25
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI can confirm #24
Comment #26
daniel.matcau CreditAttribution: daniel.matcau commentedDid someone manage to integrate OG with iflychat option?
PS: #24 works for normal ajax option.
Comment #27
surendramohan CreditAttribution: surendramohan as a volunteer commented@daniel:
In case you are interested in ONLY embed chat format (not the popup one), you need not specify any user role/group while creating a new chat room. Just create a chat room with role as "all users" and then place the chat room into a page which can be accessed by users of only one OG. Similarly you may create a other rooms.
Alternatively, if you wish to use the OG chat in the popup format, you may use their REST API to specify organic group id while creating a chat room instead of user role. Please refer it's documentation here at https://iflychat.com/docs/rest/reference/create-new-chat-room. And then if the user has the specific OG, he/she would be able to access the room (in both popup and embed format). As discussed with the iFlyChat support, I got the knowledge that they are on working on this enhancement and is expected to be live during mid of March for the Enterprise plan accounts.
I hope this information proves to be productive.
Comment #28
Rahulmon JohnsonIs it possible in D8?