Closed (fixed)
Project:
Statuses (Social Microblog)
Version:
7.x-1.0-beta1
Component:
Code (Features)
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2012 at 17:54 UTC
Updated:
30 May 2013 at 04:46 UTC
Comments
Comment #1
icecreamyou commentedThe relationship you added doesn't do what you think it does. Take a look at the SQL query it generates (you can see it while editing the view -- might need to enable a setting on the Tools page). You're probably JOINing on the comment author UID, which would reduce the results to only those with comments, and display one copy of a status for each comment it has.
I am not sure which photo you are trying to get to display. If what you are trying to do is display users' photos next to the comments they write on status updates, there is actually a setting for that (
Show user pictures on comments). If you are trying to show a picture related to the status author, you may want to look at the Statuses: Users relationship if it's not already added.Comment #2
-Mania- commentedThanks for the quick response.
I've added a custom image field in the user account settings.
This only works if one uses the core 'user pictures'.
These are the relationships available in views:
I think you are referring to the "Statuses Comments: Users" relationship which as explained previously brings up all my custom fields to use but creates duplicates and doesn't really work. This is easy to test: have the default views and just add this one relationship and save.
Comment #3
icecreamyou commentedI still don't really get what you are trying to do. I am really not trying to be insultingly simplistic, but:
Conceptually, there is a view.
The view shows statuses.
Completely separately from this concept, when a status is displayed, comments are displayed with it. The comments are not part of the view; they are completely unrelated. You cannot change how the comments display by changing the view.
Now, each status has a sender and a recipient, which are sometimes the same user. Additionally, each comment has an author. Next to each status you can display the sender's or recipient's picture. Additionally, next to each comment, you can display the comment author's picture.
If you want to display information about the status sender or recipient other than their avatar, such as a Profile module field you added to the user account, you can do so by adding a User field to the view.
If you want to display information about the authors of comments on statuses next to the comments they authored, such as a Profile module field you added to the user account, the only way to do so is by overriding the theme function(s) that are used to render status comment threads.
Comment #4
-Mania- commentedSimply put I want to display other fields than what the default statuses_stream view provides me. E.g. a user photo, age, city or whatever custom fields I might have.
You mean a user relationship? You keep saying this but it doesn't work as mentioned a couple of times now.
In any case as I'd like to have a consistent look for both the statuses and comments using my custom fields it looks like the only way is to do a module/theme override. If you could point me to the specific function(s) to use with perhaps a simple example I'd appreciate it.
Comment #5
icecreamyou commentedI don't know how to explain this more clearly. You cannot change how status comments look by changing the view. Changing the view can only affect how the status itself looks.
I already gave you the links you need in #3: documentation on overriding theme functions and the function you probably want to override is theme_fbss_comments_item().
Comment #6
-Mania- commentedYea, well you can't even change the status itself if using custom fields. Views is supposed to enable you to make your own queries yet there's very little you can do with this view.
Okay thanks, I'll see what I can come up with.
Comment #7
icecreamyou commentedYou can change anything you want about the status itself by changing the View. It's not any different than any other view except that the fields are arranged using the last field ("Global: Custom text") to provide some structural markup. But you should just be careful what you're doing with Relationships if you don't actually understand how they are changing the underlying query.
Comment #9
jaimealsilva commentedHello.
I'm reopening this bug because I'm having the same issue.
I can see in the query that the users table is joined but I can not add any custom user profile field to the view, I only can access the properties or columns from the users table. The fields added by the Field API are not available.
I'm suspecting somethins is wrong on the hook_views_data().
Comment #10
icecreamyou commentedDifferent question, please open a separate issue