vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   SHOWGROUPS - Replace Avatar w/ Profile Picture? (https://vborg.vbsupport.ru/showthread.php?t=262125)

FASEOFMARS 04-17-2011 02:57 AM

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>

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

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'] . ")
");

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.


All times are GMT. The time now is 06:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02524 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete