vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBFriends - View your social network and surf to others in vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=101470)

vwturbo 01-04-2006 01:26 PM

Is it possible to display the profile pictures instead of the avatar's in the buddy list?

Antivirus 01-04-2006 02:45 PM

yeah, you should be able to do it by replacing all instances of $userinfo[avatarurl] with $userinfo[profilepicurl] within the XML file.

iizeusii 01-05-2006 10:16 AM

Quote:

Originally Posted by Antivirus
yeah, you should be able to do it by replacing all instances of $userinfo[avatarurl] with $userinfo[profilepicurl] within the XML file.

I need the opposite : /

How can I get the friends.php to show User Avatar instead of Profile Image?
(not buddies, but the User)

vwturbo 01-05-2006 11:36 AM

Quote:

Originally Posted by iizeusii
I need the opposite : /

How can I get the friends.php to show User Avatar instead of Profile Image?
(not buddies, but the User)

My default install of vBFriends used the avatar.

vwturbo 01-05-2006 01:29 PM

Quote:

Originally Posted by Antivirus
yeah, you should be able to do it by replacing all instances of $userinfo[avatarurl] with $userinfo[profilepicurl] within the XML file.

That doesn't work. All that does is replace the profile pic with the avatar pic.

Antivirus 01-05-2006 01:36 PM

iizeusii,
i think it has to do with the following l conditional in the code:

Code:

if (empty($userinfo[profilepicdateline])) {
$HTML .= "<img width=\"64\" height=\"64\" src=\"$userinfo[avatarurl]\"><br>";
}
else {
$HTML .= "<img src=\"".$vbulletin->options['bburl']."/image.php?u=$userinfo[userid]&amp;type=profile&amp;dateline=$userinfo[profilepicdateline]\"><br>";
        }

The code was written (quite brilliantly) to show the user's profile picture, UNLESS that user has none, then it will show the user's avatar. If you want it to always show the avatar, regardless of whether or not the user has a profile pic, then find the code above within friends.php and replace it with the following which is simply commenting out the conditional and leaving only what you want:

Code:

// if (empty($userinfo[profilepicdateline])) {
$HTML .= "<img width=\"64\" height=\"64\" src=\"$userinfo[avatarurl]\"><br>";
// }
// else {
// $HTML .= "<img src=\"".$vbulletin->options['bburl']."/image.php?u=$userinfo[userid]&amp;type=profile&amp;dateline=$userinfo[profilepicdateline]\"><br>";
        // }


Antivirus 01-05-2006 01:39 PM

wwturbo,

Quote:

How can I get the friends.php to show User Avatar instead of Profile Image?
isn't that what you asked for?

vwturbo 01-05-2006 02:04 PM

I asked for the buddy list to display the Profile picture. When I installed vbfriends by default it shows the avatar. I replaced avatarurl with profilepicurl and that didn't work at all.

docvader 01-05-2006 04:08 PM

I'm getting this error, using the original friends.xml file
Quote:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 212
Otherwise, it's working. I think.

http://russbo.org/vb/member.php?u=1&styleid=41

Any ideas?

Thanks!
rich

jj 01-05-2006 06:28 PM

Here we go with a little enhancement. I added a setup part into the code, so you don't need to search the text in the hard coded html. I also removed the foe part because I don't think someone wants to show these in his profile. You can choose if you want to use avatares or profilepics for the friends part (see attached images). The plugin still only shows friends. If you want to have the buddies only you have to edit it again to your needs.

Maybe I should start a new thread for this in the vB 3.5 plugin forum if I get permission from you, Cloud-Warrior, since it's basically your code a bit optimized :)

Heres the setup part of it
Code:

// Setup
///////////////////////////////////////////////////////////

$FFsetup = Array(

// these are the texts which are displayed

'friends' => "Freunde",
'has_these_users_on_his_list' => "Buddy-Liste",
'is_on_these_buddy_lists' => $userinfo['username']." ist auf den Buddy-Listen von",

// set these to TRUE or FALSE
// if you set fetch_avatar true you will get avatar picture, else you get profile picture if present

'show_counts' => false,
'fetch_avatar' => true

);

// End of setup
///////////////////////////////////////////////////////////

You see i commented a bit.

I hope it works for you, as it works for me. I'm using 3.5.3

EDIT: For those who haven't used it before I need to mention it again: Place
Code:

$FRIENDSFOES
in the MEMBERINFO template wherever you want to display this.

Current XML file -> post #85

cheers
Jens


All times are GMT. The time now is 08:16 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.01269 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete