PDA

View Full Version : A few "How Do I" questions...


baderandsonsco
03-08-2012, 03:30 PM
I am trying to display the actual email address on the members list page and I'm looking for the variable to do so. Is there a user variable list that I can't seem to find.
(ie. vb:raw userinfo.email_address or $userinfo['email']) or something similar.

I am trying to display the actual avatar image on the members list page, not the thumbnail.

Thanks for any help!

kh99
03-08-2012, 03:38 PM
Try using {vb:raw userinfo.email}.

For the avatar, the code puts "&type=thumb" on the url (if you don't have them saved in the file system), so you'd have to remove that. You could edit memberlist.php and take it out, or if you want to write a plugin you can use hook memberlist_bit and do a str_replace on $avatarurl.

Lynne
03-08-2012, 03:59 PM
Avatar size is set in memberlist.css
#memberlist td.profilepic img,
#memberlist img.avatar {
max-width:40px;
height:auto;
width:auto !important;
}:

baderandsonsco
03-08-2012, 04:14 PM
Thank you both!

yrb
03-09-2012, 03:44 PM
or if you want to write a plugin you can use hook memberlist_bit and do a str_replace on $avatarurl.

I'd be VERY grateful if you could write this a bit more detailed :)

Tnx in advance!

kh99
03-09-2012, 04:43 PM
I'd be VERY grateful if you could write this a bit more detailed :)

Tnx in advance!


No problem, it should just be:

$avatarurl = str_replace('&type=thumb', '', $avatarurl);


But what Lynne posted above is very important - if you just use this plugin you'll still get small images because the width is being set in the CSS. But if you just change the CSS, you'll get the thumbnail size images stretched to a larger size. (And again, I believe this only applies to avatars saved in the database, not the file system).

yrb
03-09-2012, 05:34 PM
Actualy, it's both your's and Lynne's combined together that works.

First removing &thumb and then editing CSS max-width to the maximum value of my avatars.

Thanks again :)

marlera
03-14-2012, 04:25 PM
Is it possible to do this in member profile too (full size avatar instead of &type=thumb)

It's memberinfo_block_ministats template, the code for avatar display is:

<dl class="stats">
<dt>{vb:rawphrase avatar}</dt>
<dd class="avatar"><img src="{vb:raw prepared.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw prepared.username}}" {vb:raw prepared.avatarsize} id="user_avatar" /></dd>
</dl>

Thank you!