vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Show all buddies in viewing public profile (https://vborg.vbsupport.ru/showthread.php?t=68860)

deathemperor 08-29-2004 10:00 PM

Show all buddies in viewing public profile
 
Well this is likely to be my first hack (glad to hear that ^^)

the funny thing is that I am answering for my own requests (2 here and 1 at vb.com)
but forget it, here is what this hack does:

it simply let you show all buddies when viewing profile.

In member.php find:

PHP Code:

$userinfo verify_id('user'$userid1115); 

add under it:

PHP Code:

$whichlist "buddylist";
    
// (Dis)Likes
    
$outuserids = array();
    
$outuserids explode(' 'trim($userinfo[$whichlist]));
    if (
trim($userinfo[$whichlist]) != "") {
        
$outusers $DB_site->query("SELECT ".TABLE_PREFIX."user.username,".TABLE_PREFIX."user.userid,".TABLE_PREFIX."usertextfield.".$whichlist." FROM
        "
.TABLE_PREFIX."user,".TABLE_PREFIX."usertextfield WHERE
        "
.TABLE_PREFIX."user.userid = ".TABLE_PREFIX."usertextfield.userid AND
        "
.TABLE_PREFIX."user.userid IN (".implode(',',$outuserids).")
        ORDER BY username"
);
         while (
$outuser $DB_site->fetch_array($outusers)) {
         if (
$outuser[avatarurl]!= ""){$outuser[avatarurl]="clear.gif";}
         else {
$outuser[avatarurl] = fetch_avatar_url($outuser['userid']);}
         
$buddyavatar    .= "<img src=\"$vboptions[bburl]/$outuser[avatarurl]\">";
         
         
$outuserlist     .= "<a class=\"smallfont\" href=\"$vboptions[bburl]/member.php?u=$outuser[userid]\"/>$outuser[username]</a>";

        }
    } 



in MEMBERINFO templates:

add $buddyavatar for buddy(s) avatar

add $outuserlist for buddy(s) username

and you are done


how bad is this very minor script add 5 queries, if any veteran coder know how to solve this, please have a post, tnx.


don't blame me, this is my first hack you know. ;P

platnum 08-30-2004 03:50 AM

Is there a screen shot or a live demo or something?

deathemperor 08-30-2004 03:54 AM

I thought a screen shot is needless, but well I'll post it later

mikepmm 10-12-2004 11:27 PM

very nice :cool:

Ghostsuit 02-12-2005 02:30 PM

Nice idea needs a little work though.

Benj 03-31-2005 04:35 PM

2 questions

could i config it so it shows profile pictures.

is there limit on it, because i have a feeling some people might add hundreds of buddies, like a pop up or something :D

akanevsky 07-11-2005 01:17 AM

Does it show anyone's buddies or only my own?

PennylessZ28 11-08-2005 01:17 AM

Just to update anyone, it don't work with 3.5 I tried. The line though is now

Code:

$userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1, 15);

Snoop-It 11-08-2005 07:29 AM

yo hello.. boss..

this don't work with 3.5.1... i get some fatal error on member.php when trying to view ones profile.

Could the author please update this mod for 3.5.1 version or 3.5.x

Thanks!


All times are GMT. The time now is 01:13 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.01008 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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