Closed (fixed)
Project:
Activity
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
26 Sep 2009 at 23:37 UTC
Updated:
24 Jan 2012 at 06:57 UTC
Would it be possible to add small avatars to main activity page like on Facebook ?
Comments
Comment #1
sirkitree commentedAll display is through Views, so yes. Just takes a bit of theming know-how
Comment #2
Scott Reynolds commentedI would suggest actually Imagecache Profiles. This module now has Views formatters so you can pick an imagecache for the user picture
http://drupal.org/project/imagecache_profiles
Comment #3
DrakeRemory commentedIf your view has a relationship with the user table (the default one already does) you can just add the user picture as a field.
Comment #4
Scott Reynolds commentedRight the the key is making the picture small. The default drupal setup will put a large picture there if they uploaded a large picture or a small picture if they uploaded a small picture. D6 user picture handling is virtually non-existant as it doesn't, out of the box resize and reshape.
Sirkitree mentioned that you can theme the specific View field and that will solve it. And I sugguested using that imagecache profiles as it will allow you to select from your imagecache sizes the size you want for your picture.
Thankfully, imagecache has been folded into core for Drupal 7.
Comment #5
drupallogic commentedthanks guys.
does any one know when activity 2 beta will be released ? it has been under dev. for months.
Comment #6
Scott Reynolds commentedIt will be ready when its ready :-D
this issue still needs to be addressed
#391670: Create an upgrade path
Comment #7
drupallogic commentedI don't think there needs to be an upgrade from 1 to 2. activities are not things like pics or videos :) so we can never mind.
the dev version doesn't come with pre-defined tokens phrases, will it be on the stable version ?
Comment #8
sirkitree commentedit will not ship with default phrases.
the upgrade path is proly not going to happen, especially since there is functionality to generate activity records on an existing site.
but this is completely OT
Comment #9
blasthaus commentedi wonder does anyone have a simple solution to pull in the social avatar as the main user $picture and image cache it? i'd like to do this automatically upon user login, and ideally prompt the user that this pic will be used (box pre-checked, continue). if user un-checks box, then they can either upload a pic or else a default pic will become $picture. i'm using gigya socialize btw and really green on drupal so any guidance here would be greatly appreciated.
cheers -wil
Comment #10
Scott Reynolds commentedWAYYYYY off topic. Please this issue is closed and Your question has nothing to do with the issue
but i help you out anyways. http://drupal.org/project/avatar_selection
Comment #11
adam_c commentedI have image_cache and when I try to add an image field to the default view, the images do not appear.
You mentioned in an earlier post that if the user table relationship exists (which it does) then this should work. With respect to this, when I configure the image field in views, at the top where you have the relationship drop down, only 'node' is available. Could this be the problem?
I also have the problem of the UR_api not being available to the view, this maybe relevant to this problem, but perhaps not so I will start a new thread or find a similar one for that.
Comment #12
Scott Reynolds commentedimage_cache != image_cache profiles. You can't use image_cache for profile pictures, or you are using nodes for profiles (like content_profile module). The field you most likely want to use is User > Picture.
This is most definitely doable so this issue is closed, and not a place for general Views help. If you are still having a serious issue and have in good faith tried hard to create the View following the instructions listed in this thread, please open a new issue and export your View to share with us.
Comment #13
adam_c commentedI appologise, I should have mentioned that I am using content profile and therefore user > picture is not adequate.
My avatars are an image content belonging to a content profile node.
Comment #14
rjbrown99 commentedI have this working fine on my end with content profile.
You have a relationship Activity: User already assuming you are using the existing view as a starting point. Add a second relationship to Node: Content Profile with a relationship to Activity: User. Check require this relationship, and pick your content type. Then head down to Fields, pick your picture field, and make sure you use a reference back to the Content Profile.
In short, my "Relationships" looks like this:
Activity: Node
Activity: User
(Activity - User) Node: Content Profile
My field looks like:
(Content Profile) Content: Picture MyImageCachePreset
Comment #15
sirkitree commentedTurning this into a task so that I remember to update the Views documentation for 2.x - Thank you.
Comment #16
Scott Reynolds commentedBump. You wanted to document something sirkitree ??
Comment #17
sirkitree commentedWhen I get some downtime, yes, definitely.
Comment #18
dalad commentedI managed to have user avatar pictures in activity entries.
Note that:
1) the substitution is performed at execution time, so the avatars in messages are synchronized with the actual ones from the users.
2) the following method has the advantage of creating an avatar for EVERY username in the activity, even for the ones like "%requestee is now friend of %requester"
3) the substitution is performed on the assumption that username links have the form "mysite.com/profile/username", as seen in the regex of _render_user_avatars(). if you don't use clean urls, you might substitute "profile" with "user" in that expression and then load users by their matched id instead of their matched name by changing "name" to "uid" in the subsequent user_load.
4) Avatars dimension can be simply changed with CSS.
1) create a view field handler for the message field
2) Register the handler
3) Hook in to the api, set to use the new handler
4) Rebuild cache and go
Go to admin/settings/performance and clear cache, then give it a go.
Comment #19
Scott Reynolds commentedUsing the User relationship makes this way easier.
Comment #20
sirkitree commentedThanks dalad - I turned this into a documentation page.
http://drupal.org/node/908916
Comment #21
glitz commentedThis is EXACTLY what I need, but using imagecache profile thumbnails.
I appreciate the supplied code, but Is there a way to elaborate on the steps I need to take?
In other words, Could you explain or point me to where/how I can perform the following steps?
1.create a view field handler for the message field
2.Register the handler
3.Hook in to the api, set to use the new handler
Thanks!
Chris
Comment #22
glitz commentedIll also try using the User relationship method.
----
In addition to user avatars, Is there a way to add in cck imagefields into activity?
For instance if a cck type has a image field and a user uploads an image there, could I somehow reference that imagefield (maybe as a token)?
Thanks again,
Chris
Comment #23
glitz commentedi was able to get this to show as i wanted to but the query time is very slow. almost took 5 minutes for the view preview, and "Save" or "Preview" to occur
Comment #24
JohnnyW commentedCould you explain these steps in more detail? Like what files to manipulate, etc.
1.create a view field handler for the message field
2.Register the handler
3.Hook in to the api, set to use the new handler
THANKS!