I know this is similar to this issue (http://drupal.org/node/482364) but I believe that it is distinct enough to warrant a new thread.
I'm using a view (attached) to display user related (contextualized) content and content posted by other users who have been flagged by the current user. I'm using the "user picture" field to display the picture of the user who's submitted a status, node, or comment. The problem occurs when:
- user a submits a status on user b's profile/user-page
- user a's status will appear but with user b's picture
I would use the FBSS' picture fields and then just theme them so they only appear on statuses but they don't seem to work well within an activity view of this sort.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | screenshot_userpicture_activity.png | 72.91 KB | pribeh |
| user_and_user_follow_view.txt | 8.48 KB | pribeh |
Comments
Comment #1
icecreamyou commentedSo your situation is Joe looks at your view at
example.com/activity/all. He sees a list of Sally's statuses:[Sally's pic] Sally is happy. Dec 11, 2009
[Roger's pic] Sally >> Roger Hello, what's up? Dec 10, 2009
On the back end, the Activity module records this:
Sally is happy. Dec 11, 2009
Sally >> Roger Hello, what's up? Dec 10, 2009
And Views adds the picture. Am I with you so far?
Well, the User ID that Activity records is the poster's ID, so the User relationship should link to the poster and you should see the poster's picture.
That's about all I really understand of what you asked. I mean, what are you asking for? Do you want a token with the poster's picture? I don't have the slightest idea what you may have (mis)configured in your view.
Also, you're probably the most prolific poster in the FBSS queue, and I complain about this all the time -- you should know by now that a statement like
doesn't help either of us. Version numbers or exact development build dates? This is useful. Screenshots of configurations? This is also useful. Ambiguous statements of not-workingness? This is not useful.
Comment #2
pribeh commentedSorry for being confusing and posting so much Ice.
What I'm looking for is when Sally looks at her own views she should see:
[Sally's pic] Sally is happy. Dec 11, 2009
[Sally's pic] Sally >> Roger Hello, what's up? Dec 10, 2009
OR if Roger looks at his own view he should see:
[Rogers's pic] Roger is mad. Dec 12, 2009
[Sally's pic] Sally >> Roger Hello, what's up? Dec 10, 2009
So the user pic should correspond to the poster. Using activity 2.x and FBSS from Dec 10th. I see the following with the view I've attached:
[Sally's pic] Sally is happy. Dec 11, 2009
[Rogers's pic] Sally >> Roger Hello, what's up? Dec 10, 2009
OR on Rogers view/user-page:
[Rogers's pic] Roger is mad. Dec 12, 2009
[Rogers's pic] Sally >> Roger Hello, what's up? Dec 10, 2009
As for using the poster picture field provided by FBSS for views: it seems to create a number of duplicate statuses using views 2.8 and the site's default user picture (not the poster's picture).
I've tried different configurations of this view and always get the undesired results. Sorry if there's something I've configured wrong that I just can't see. Each time I test with a fresh copy of my site with the latest versions of FBSS 1.x, Flag 2.x and Activity 2.x (and all previous versions uninstalled first, caches reset and cron run).
Thanks for your time.
Comment #3
icecreamyou commentedOkay, I understand the problem you're experiencing now. (I didn't mean to complain about the number of issues you've opened... I mean, that's how open-source software gets better!)
However, I don't know what the cause of the problem is. I will investigate when I get some time after next week.
Comment #4
ocamp commentedIs there any progress on this?
I thought this is why there is the facebook poster picture field. user picture field only has the options to look for user/node arguments. i.e the node author, as statuses arent nodes using user picture field you'll only be able to get pictures of the logged in user, or the user being viewed. But I get the same errors when I user poster pictures, duplicate statuses. Maybe the issue should be changed from user picture to poster picture.
Comment #5
pribeh commentedHi ocamp,
Unfortunately, the 'FBSS poster: picture' field does not seem to work in an Activity 2.x-dev view (as of all the builds past the intro of the Activity Access Control). As of previous Activity 2.x-dev versions the "user: picture" field worked for statuses in an Activity view (in that it provided the desired result as described above).
I've also noticed from a user perspective that the "Facebook_status: facebook_status_poster" can no longer be switched on under Activity 2.x Access Control (see http://drupal.org/node/606070). I'm not sure if there's anything causal between the two but I noticed both issues at the same time.
Until Activity 2.x comes out of development we probably won't see any progress on this issue. See #46 here: http://drupal.org/node/606070
Comment #6
icecreamyou commentedFBSS fields are only designed for use in an FBSS view. The fact that they're currently available in almost all views is an unfortunate consequence of a mistake made by the person who wrote the original Views integration (not me) that I didn't realize until I started working on the Facebook-style Statuses Comments module. I will fix that probably when I work on #690344: Performance and extra Views-related queries.
In the mean time, you may want to open another issue to request a poster picture token so that it can be integrated directly into the activity message. (Patches rock. Feature requests with no patches are likely to languish for awhile until I clean up some of the older issues, unless I decide on a whim that I would particularly like that new feature. This would be only a three-line patch though, so it is an easy one for anyone who wants to dip their toes in the waters of patching. Token integration is clearly marked near the end of facebook_status.module.)
Comment #7
pribeh commentedHey Ice,
I actually don't think a token would work well for my purposes unfortunately. Since Activity 2.x's system doesn't update the display of tokens then if a user were to say update their profile picture the Activity view would not change to visibly reflect that. I've got around this limitation by using Activity "messages" (with tokens) for the non-changeable parts of a view's display. For virtually every other aspects (fields, user pictures) I let views do the pulling for display. This makes for some pretty heavy views but, alas, I don't know how to develop a module such as Activity nor do I know of an alternative that works well for my purposes.
So I would prefer, if it is possible, to use the "user: picture" field available to views to correctly display the picture of the poster of the status. That way you could also use one field to display the user picture for the author of both nodes and the posters of statuses (see attached image). This is what I'm currently doing.
That said, I know this issue isn't a big priority right now, but just so that I'm aware: do you think this requires the attention of the Activity maintainers to get resolved or is this something another skilled programmer (other than yourself) could resolve without too much of a headache? I might be able to get some help to resolve this issue.
Best,
Thomas
Comment #8
icecreamyou commentedI am 98% sure that can't be done without writing a field specifically for use in Activity views, which would also create a lot of overhead as it would require 2 slow queries per rendered row. That's not something I'm interested in doing, although if you hire someone else and they write a patch I will commit it.
I know there are valid reasons for making Activity views historical records, but they don't outweigh the benefits of just using caching instead IMHO. *sigh*... but we're left dealing with that design decision unfortunately. One of these days I'm going to get so fed up with Activity I'm going to have to actually spend the time to submit patches to it myself. ;-)
So basically, no need for the Activity maintainers to be involved. Solving this would involve adding a new field for Activity views that hinges on the EID (otherwise known as OID for some reason I think? but maybe that was in earlier versions) and uses it to query the {facebook_status} table to retrieve the PID (poster UID). Then the poster UID would have to be used to retrieve the relevant $account object (the second query), which would then be passed to theme('user_picture, $account).
I guess that makes this a feature request. I'll leave it open for awhile in case someone wants to pick it up.
Comment #9
Scott Reynolds commented#725146: Fix Activity Integration
Not nearly that complicated....