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.
now that chats are nodes, we should add views integration.
Comment | File | Size | Author |
---|---|---|---|
#8 | chatroom-views-integration-609806-8.patch | 8.43 KB | james.williams |
Comments
Comment #1
jamesialford CreditAttribution: jamesialford commentedThis would be nice to have.
Comment #2
tormiYes, views integration would be nice, missing fields are (maybe more):
Chat: First message (time)
Chat: Last message (time)
Chat: Messages (count)
Chat: Archived (time)
Also, consider replacing chatroom content type with a
predefined viewpanel node type + views (just thinking out loud, where to put chatroom's variables then..). Chatroom's current implementation doesn't support pagination, sorting and other goodies..Tormi
Comment #3
superfedya CreditAttribution: superfedya commented+
Chat: Messages Cound
Chat: Users Count
Comment #4
markwk CreditAttribution: markwk commentedComment #5
acouch CreditAttribution: acouch commentedJust an FYI if you use the data module (http://drupal.org/project/data) you can adopt the chatroom tables which creates a view. Also provides a way to edit individual chat entries. I needed to run http://drupal.org/node/1133900#comment-5684852 before I was able to adopt individual tables.
Comment #6
mkesper CreditAttribution: mkesper commentedWow, I will have to look at that!
Comment #7
markwk CreditAttribution: markwk commentedThat's an interesting workaround. Adding views support wouldn't be so hard. Just need to find someone with the time and the strong enough desire to do it :P
Comment #8
james.williams CreditAttribution: james.williams commentedSomeone asked for Views integration? Well, here you go :-)
I haven't added support for the 'format' field in the chatroom table, or any support for the chatroom_role or chatroom_user tables. Someone else will need to add those too, but perhaps it might be best to add those in separate issues, as I would consider the main useful parts of views integration to be included in this patch.
Having said that, there is currently no way to join from the chatroom tables to the tables for the entity/field that the chatroom is 'hosted' on. (e.g. to the node that the chatroom field is on.) I'm not sure how to do that in a good generic way. While that is most likely to be important, views of chatrooms, their messages, and their users & recipients can still be made with this patch. Again, perhaps that specific views integration issue would be best handled in another separate ticket to avoid blocking this simpler views integration from being committed to the module?
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks! in general, assume that i have no idea what i'm doing with field integration for chatroom.
if there are deeper changes that we can make to the chatroom field code to improve this situation, i'm open to making those sorts of changes.