Closed (fixed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Jun 2009 at 20:08 UTC
Updated:
4 Jul 2009 at 19:50 UTC
Hey Ice,
I'm trying to setup a view (just cloned facebook_status) to display statuses and am trying to display the user picture of the user submitting the status (whether simply user viewing or user being viewed). Unfortunately no matter what I try do I can't figure out how to display it, I usually just get the user picture of the user being viewed. Should I just wait for activity 2 integration to get this?
Comments
Comment #1
icecreamyou commentedUnfortunately, there are some limitations on what you can display related to the poster. You've just run into one of them. It's not really fixable to the best of my knowledge without writing a special handler for it. If you want your view based off of the facebook_status view, I'm assuming you want either this:
...or this:
If that's what you want, I can write a handler for it.
Comment #2
icecreamyou commentedComment #3
pribeh commentedYup, that would be uber-cool Ice. I've accomplished this in activity by using token in the way you've illustrated. [author-picture] [status] ... etc. But I'm not using activity for facebook statuses anymore but fbs' provided views. Considering how important avatars are for most users on social networking sites I'd say this is definitely a worthy handler to add.
Comment #4
icecreamyou commentedI added such a handler locally, will upload to CVS in a bit.
Comment #5
pribeh commentedHey Ice, I can see you'll be unavailable for the next little while. The facebook_status avatar field for views you added works great provided you don't have the user avatar size set too high and/or use imagecache presets in your view-field.tpl.php - which is easy as pie to do. Just wondering if you could make the user avatar, for both poster ([poster-picture]?) and user, available to the activity module as a token. Not an urgent priority but would be uber-useful down the road to a bunch of users I presume. Perhaps this should be filed as a separate issue but I don't see that as necessary.
Comment #6
pribeh commentedHaha, I'm eating my words. I'm trying to use imagecache to resize the user (poster) pictures within a views-view-field--crosspost-users-pics.tpl.php. This ...
<?php print l(theme('imagecache', 'image_thumbnail_small', $facebook_status_pid, $alt, $title, $attributes)); ?>And variations like $row->facebook_status_pid and it only produces this:
<img src="http://mysite/sites/default/files/imagecache/image_thumbnail_small/" alt="" title="" class="imagecache imagecache-user_thumbnail_small" />... but no user picture. Anyone know what I'm doing wrong?
Comment #7
icecreamyou commentedI haven't ever looked into Views theming, and I have no earthly idea what's involved in theming imagecache images, but both of those things are pretty unrelated to FBSS. It's also up to you to figure out where the UID is that you're trying to use, particularly since it may not exist depending on how you set up your view.
As for adding the user picture as an Activity token... I will look into that.
Comment #8
pribeh commentedThanks Ice. Still looking into this. Don't have the code on me since I'm at a cafe but I've tried all sorts of ways of calling the user picture path and have successfully gotten the view-view-field.tpl & view-view-row to print the path to each users picture in the corresponding imagecache preset folder - so files/imagecache/user_thumbnail/3. But that's the problem, it's simply outputting the path and not the user picture from the imagecache folder. I will throw this up in the forums for further help and report back if I find a solution (maybe one we can fit into the module or your views' theming docs) since I know many admins are using imagecache for user pictures and allowing users to upload large user pictures that only get resized via imagecache.
Thanks for looking into the token support. That would be uber-cool.
Comment #9
wxman commentedI tried the same thing, trying to use imagecache, but didn't have any luck. It was much easier just to edit the CSS:
Comment #10
pribeh commentedYa, wxman, I'd use this technique but some of the sizes of the images being uploaded for users is 1600x1400 so that wouldn't work well for page loads. I'm going to start an issue for this and will link it back here.
Comment #11
wxman commentedWow, that's huge!