The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SHOWGROUPS - Replace Avatar w/ Profile Picture?
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 Code:
<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> |
#2
|
|||
|
|||
anybody have a clue how to switch this with a profilepic?
|
#3
|
|||
|
|||
hmm nobody thought of this yet?
|
#4
|
||||
|
||||
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?
|
#5
|
|||
|
|||
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...
|
#6
|
||||
|
||||
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? |
#7
|
|||
|
|||
hmm yea
Code:
$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'] . ") "); |
#8
|
||||
|
||||
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.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|