Hello,
Thank you for writing this module.
I was wondering if there is a way to configure people's pictures/avatars to be displayed in the list view?
Thanks,
Andrey.
Hello,
Thank you for writing this module.
I was wondering if there is a way to configure people's pictures/avatars to be displayed in the list view?
Thanks,
Andrey.
Comments
Comment #1
pukku commentedHi! Not with the way things are currently done, at least, not easily. One of the previous issues mentions this, briefly, but I can't find it right now.
I may or may not make this work; I have a few ideas for how to make the module better that should be dealt with first; then it would become easier to make the avatar available.
Comment #2
pukku commentedHi! Could you run the query
SELECT picture FROM usersand give me some sample data on how a user's avatar is stored? You don't need to post all the results, but I need to see a little of how it is stored.Thanks,
Ricky
Comment #3
pukku commentedBTW: if you don't have _too_ many users, you can do this with a template of
You will need to run eval on this template to get it to work.
I will shortly post an easy way to make your own template columns, but until then, in one of the other tickets (about user roles) I posted simple directions for creating your own local module to make this column available.
HTH,
Ricky
Comment #4
deanypop commentedI just want to second/add a vote for avatars in the user list...
A few key additional needs:
1) We need to limit the avatars to the size of the rows, or to otherwise be able to set a max image size for the site user list;
2) Have the images themselves be 'clickable' links to the user's profile.
I did the template fix, but it sizes the pics to their full size, blowing the whole list out of whack. ;)
Comment #5
pukku commentedHi! I just checked in a new version which has support for conditional columns. This should, I think, make avatars possible, so I also added the @picture column to the columns coming from user.module.
If you have avatars, please look at this and see if it works for you.
To fix the size problems, modify the template from
to something like
(or whatever size you want; you could also do this using a
'style'attribute).If you want a link to the user's profile, you would surround it with a link like
<a href="@_base/user/@uid">. Note that this will not work like the user view column and respect the permissions of the user to view profiles; the link will be inserted regardless (they will get access denied if they don't have permission).Please give me feedback on this; if this works, I'm going to make this version 5.x-1.0, and move the other feature requests over into this branch.
Thanks,
Ricky
Comment #6
mr.andrey commentedHi Ricky,
I just checked this post since your initial reply. Sorry didn't get back sooner.
Here are the query results you requested (not sure if it's still useful):
I see that in the new version you have the "User Avatar" field option. This is awesome. I put this into the template option to get it to work:
<a href="/user/@uid"><img src="/@picture" alt="" / width="60"></a>The @_base option was giving me an extra slash in the beginning, so all the img src's were //files/pictures instead of /files/pictures.
This is great,
Thanks!
Andrey.
Comment #7
mr.andrey commentedHey, thought you mind find this interesting.
On my site I'm using imagecache to generate neat square thumbnails for the whole site. This is what I now use for the User Avatar template option:
<a href="/user/@uid"><img src="/files/imagecache/thumb/@picture" alt="" /></a>"thumb" being an imachecache preset.
This way, all the user avatar thumbnails are in a central place and I can do a site-wide change very easily. Imagecache also makes all the thumbnails one size, so there is no inconsistency between the avatars, since users upload photos of all sorts of dimensions.
Enjoy!
Andrey.
Comment #8
pukku commentedFWIW, you could probably just do
@_base@pictureto get the path right, but it looks like you're doing something else anyway...I'm going to mark this as fixed, as I think this now works...
Ricky
Comment #9
(not verified) commented