I would like to have a view where I can see the content from all of my buddies, who belong to a specified buddy group.
For example I could create such a view that the URL content_by_buddy_group/11 would show all the content belonging to buddy group 11.
I saw this is not implemented yet, so I started to work on it, but as somebody said, "I don't have the ninja power" to completely understand the Views API (at least yet).
It's not working yet. I would need buddylist_buddy_group to be join-ed with users, but apparently it's not. I don't know what's wrong. When I go to a similar URL as given above it says:
user warning: Unknown column 'buddylist_buddy_group.label_id' in 'where clause' query: SELECT count( DISTINCT(node.nid)) FROM node node INNER JOIN users users ON node.uid = users.uid LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid WHERE (node.status = '1') AND (buddylist_buddy_group.label_id = 17) in
\includes\database.mysqli.inc on line 151.
PLEASE HELP !!!
The patch also contains a fix (lines of 'list-type' => 'select'). When I created this fix I gave it the explanation of "value of the filter left empty if the only possible item is not selected from the list when creating the view)".
Hope the patch is working, this is my first patch created by diff -up as read in http://drupal.org/patch/create.
Comment | File | Size | Author |
---|---|---|---|
#2 | buddylist_views.inc__0.patch | 8.91 KB | attila75 |
buddylist_views.inc_.patch | 9.2 KB | attila75 |
Comments
Comment #1
attila75 CreditAttribution: attila75 commentedApparently I left some unnecessary copy-pasted code, and did not include any fields in the table definitions. Investigating...
Comment #2
attila75 CreditAttribution: attila75 commentedI still don't know what's wrong, I need a Views guru.
I attached the latest state of the patch, still not working (same error).
Any insights on how to make it work would be highly appreciated!
Have a good weekend.
Comment #3
attila75 CreditAttribution: attila75 commentedSorry for the spam. I thought that I mention that the name and help text of fields as well as the name of the argument handler and maybe other stuff may need correction. Changing them to some sensible values would be appreciated as well.
Comment #4
attila75 CreditAttribution: attila75 commentedI've got it working. Here you are. I hope it doesn't have any bugs. Enjoy.
Comment #5
attila75 CreditAttribution: attila75 commentedChanging status.
Comment #6
dldege CreditAttribution: dldege commentedThis sounds like a good idea - can you please submit this as a patch file.
http://drupal.org/patch/create
Comment #7
gagarine CreditAttribution: gagarine commentedtrack