The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Ive been sitting here for an hour banging my head against the desk trying to figure out how to write a SQL statement that will return an array of users that are buddies on a specific user. I can pass the function the userid fine and I know that they reside in the vb3_usertextfield.buddylist field, I just don't know how to handle the contents so that I can then query the usernames without looping through an impload and querying for every single userid.
Any SQL junkies out there? ![]() |
#2
|
|||
|
|||
![]()
Why not just take vbulletin's code in profile.php? That's what I did ^_^
|
#3
|
||||
|
||||
![]()
I duno if there is a vb function, but try something like this (did it real quick, may contain errors):
PHP Code:
|
#4
|
|||
|
|||
![]()
Thanks much SirAdrian works perfect. Had to modify it a little to play nicely with my db and functions but other than that it seems you were spot on. The only other request that I am getting is that it display which buddies are mutual. For instance. If I add you as a buddy and you add me as a buddy we are then mutual.
I have installed the "Who Am I a Buddy Of" Hack for the forum itself, but I can't seem to get the query to apply to my page. Basically I just want to display weather or not the buddy is mutual next to each buddy with a "(mutual)" output. LOL. Seems like its not a big deal but I am having a heck of a time trying to pull it off. Thanks for all the help so far! |
#5
|
|||
|
|||
![]()
I still have had no luck with figuring out an efficient way to figure out mutual buddies... anyone have a clue?
HTML Code:
SELECT userid FROM vb3_usertextfield WHERE FIND_IN_SET('".$uid."', REPLACE(buddylist, ' ', ',')) > 0 Dolbex |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|