View Full Version : SHOWGROUPS - Replace Avatar w/ Profile Picture?
FASEOFMARS
04-17-2011, 02:57 AM
well im using my showgroups for a v.i.p page, and part of being a v.i.p you get a profile pic.. so it would be cool if i could get their profile picture on the v.i.p page...
here is the code for the avatar in showgroups
<a href="{vb:link member, {vb:raw user}}" class="avatarlink"><img src="{vb:raw user.avatarurl}"<vb:if condition="$user['avatarwidth']"> width="{vb:raw user.avatarwidth}"</vb:if><vb:if condition="$member['avatarheight']"> height="{vb:raw member.avatarheight}"</vb:if> class="userlist_avatar_{vb:raw user.userid}" alt="{vb:rawphrase avatar, {vb:raw user.username}}" border="0" />
</a>
perhaps someone who understands the language abit better could assist me..
FASEOFMARS
04-21-2011, 02:53 PM
anybody have a clue how to switch this with a profilepic?
FASEOFMARS
04-24-2011, 02:50 PM
hmm nobody thought of this yet?
Lynne
04-24-2011, 04:09 PM
My thought is... you are going to need to look at the code for the page and probably edit it directly, not through a plugin. Right now, the query grabs the avatar information and you are going to have to modify it to grab the profile picture information instead. Have you looked at that at all?
FASEOFMARS
04-24-2011, 08:25 PM
you mean the template? that is the code for the avatar above in showgroups_usergroupbit, you remove it and you remove the avatar.. so i figure their is certain aspects of that code that need changed to grab the profile pic, is that correct? if so i really dont have a clue, im trying things but i really dont know what values to input...
Lynne
04-24-2011, 09:13 PM
The template takes the information from the query about the avatar and spits it out onto the page. There is no infomation in the query about the profile picture, so you can't just spit out the information. You need to change the query to get the inforamtion about the profile picture instead of the avatar before you can spit out the information in the template.
Did you go look at the php page yet and find the query?
FASEOFMARS
04-25-2011, 05:34 AM
hmm yea
$users = $db->query_read_slave("
SELECT user.*,
usergroup.usergroupid, usergroup.title,
user.options, usertextfield.buddylist,
" . ($show['locationfield'] ? 'userfield.field2,' : '') . "
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid
" . ($vbulletin->options['avatarenabled'] ? ",avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight, customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb, filedata_thumb, NOT ISNULL(customavatar.userid) AS hascustom" : "") . "
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON(usergroup.usergroupid = user.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
" . ($vbulletin->options['avatarenabled'] ? "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)" : "") . "
WHERE (usergroup.genericoptions & " . $vbulletin->bf_ugp_genericoptions['showgroup'] . ")
");
now im really confused lol
Lynne
04-25-2011, 05:00 PM
OK, and you want to change to use the profile picture. The query is going to have to use the customprofilepic table instead of the customavatar table. You'll need to look at the table and see the structure - it may use the same fields. I don't think you will need anything regarding the avatar table at all.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.