View Full Version : Who Am I A Buddy Of - Version 2.0
Gamingforce
07-19-2004, 10:00 PM
[ Feature Description ]
This feature allows users to easily see who they are buddies of along with an easy way to add/remove buddies right from the page! This modification is a big upgrade from the one I made for vBulletin 2. It has proved to be a very useful tool for my members. As of this version, there are noother known performance optimization techniques, nobugs and no security problems.
[ Version 2.0 Fix Log ]
2.00 -> 2.01 - July 20, 2004
Updated a non code related error in the installation instructions. (Bug finder: Dennis B)
Fixed a bug for people using tables with prefixes. (Bug finder: the Sandman)
2.00 -> 2.01 - July 20, 2004
Fixed a small warning that was displayed if zero people had you on their buddy list. (Bug finder: Zelda King)
Templates are now cached. (Bug finder: Zelda King)
[ Updates From Version 1.0 ]
Uses only one query to get all the information needed for this! (This took me a while to figure out but I got it all into one query using regular expressions and left joins).
User CP navigation link and proper displaying added.
Better formatting.
Easy add/remove buddies from the list with a "- buddy" if a user is already a buddy and a "+ buddy" if the user is not a buddy.
Percentage of users that are mutual buddies (both of you have each other on buddy lists).
Updated a security bug.
Huge performance increase.
Fixed the big bug that didn't display results if your userid was at the beginning or end of the buddylist.
[ Screenshots ]
http://www.gamingforce.com/chocobo/whobuddies-cp.gif
http://www.gamingforce.com/chocobo/whobuddies.gif
Enjoy! :)
turbidblue
07-20-2004, 01:18 AM
am i first? awesome!
super easy install and very very cool!
thanks so much!
* turbidblue clicks install :)
JagFan
07-20-2004, 01:58 AM
Thank you for this! Great hack!! (yes, very easy install!!)
Koutaru
07-20-2004, 02:47 AM
Excellent hack I must say and coded well! :) Thanks!
KTBleeding
07-20-2004, 03:39 AM
Awesome! I'll be installing this sometime shortly.
Bryan Ex
07-20-2004, 05:33 AM
Wonderful addition! It took me all of two minutes to install and works perfectly. Nicely done.
Zelda-King
07-20-2004, 10:12 AM
Thanks for the release. I was waiting for you to port this one.
nexialys
07-20-2004, 10:19 AM
i thought that we had enough with vBFriends - View your social network (https://vborg.vbsupport.ru/showthread.php?t=66449) is working well, easy to manage, one file script, very attractive look too...
Zelda-King
07-20-2004, 10:25 AM
Just a note: the following templates are uncached in whobuddies.php;
USERCP_SHELL (1)
usercp_nav_folderbit (3)
whobuddy (1)
EDIT: Here, I fixed it. :)
EDIT 2: If you have no buddies you get this error: Warning: Division by zero in /domain/url/whobuddies.php on line 50 (note line 50 is counting my template caching [in my attached file]. The default file would be about line 45 or something;
$mutualpercent = round((($mutualcount / $buddycount) * 100),2);).
Also noted: This hack adds a page so a Who's Online location needs adding. I'd post the code but I just used that Custom Add Online Locations hack. :D
No really, I always liked this hack. vBulletin should really be shipped with such a feature, I reckon.
Gamingforce
07-20-2004, 01:32 PM
Thank you Zelda-King for spotting these!
2.00 -> 2.01 - July 20, 2004
-Fixed a small warning that was displayed if zero people had you on their buddy list. (Bug finder: Zelda King)
-Templates are now cached. (Bug finder: Zelda King)
To upgrade, all you need to do is download the new attachment in post #1 and upload the new whobuddies.php to your server.
Gamingforce
07-20-2004, 01:37 PM
i thought that we had enough with vBFriends - View your social network (https://vborg.vbsupport.ru/showthread.php?t=66449) is working well, easy to manage, one file script, very attractive look too...True, but not everyone wants to make their buddy lists public and I feel like this is more straight-forward. This feature efficiently lists who you are a buddy of and your relationship to that buddy. You can easily add anyone (or remove anyone) from that list with just two clicks. Also, unlike friends.php, this only uses ONE database query whereas the other one can use many depending on how many buddies you have.
Zelda-King
07-20-2004, 02:15 PM
Gamingforce: Very prompt fix job. Well done!
(Working perfectly now - v3.0.1.)
Bro_Joey_Gowdy
07-20-2004, 02:20 PM
clciks install
FleaBag
07-20-2004, 03:00 PM
Been waiting for this, cheers. :D
Dennis B
07-21-2004, 04:32 PM
Gamingforce,
Nice job, will install tonite.
Just a remark: in the installation instructions you say:
[OPEN FILE includes/functions_user.php]
==================================================
(...)
==================================================
[CLOSE FILE includes/functions_newpost.php]
Bryan Ex
07-21-2004, 04:43 PM
True, but not everyone wants to make their buddy lists public.
That was exactly the concern raised by my members in the past so this suits my board perfectly. Thanks again!
the Sandman
07-21-2004, 04:53 PM
The install didn't work for me:
Invalid SQL:
SELECT usertextfield.userid, user.username
FROM vb3_usertextfield
LEFT JOIN vb3_user
USING (userid)
WHERE usertextfield.buddylist REGEXP '[ ]3[ ]'
OR usertextfield.buddylist REGEXP '^3[ ]'
OR usertextfield.buddylist REGEXP '[ ]3$'
ORDER BY user.username ASC
mysql error: Unknown table 'usertextfield' in field list
mysql error number: 1109
Did I mess something up?
Oblivion Knight
07-21-2004, 05:06 PM
Very nice, thanks for sharing your work with us Gamingforce.. :)
Gamingforce
07-21-2004, 11:30 PM
2.01 -> 2.02 - July 21, 2004
-Updated a non code related error in the installation instructions. (Bug finder: Dennis B)
-Fixed a bug for people using tables with prefixes. (Bug finder: the Sandman)
To upgrade, all you need to do is download the new attachment in post #1 and upload the new whobuddies.php to your server. You do not need to upgrade unless you are using database table prefixes.
the Sandman
07-21-2004, 11:40 PM
2.01 -> 2.02 - July 21, 2004
Fixed a bug for people using tables with prefixes. (Bug finder: the Sandman)
That's much better! Thanks!
Dennis B
07-22-2004, 12:23 AM
Installed. :)
Great hack, thanks!
sabredog
07-24-2004, 09:08 AM
Hahah, a hack from a board I already go to. Good hack; I originally saw it on a vB2 and was wondering where I could find it. Thanks.
YogiTW
07-31-2004, 11:53 PM
An interesting twist on this would be instead of comparing buddy lists, compare ignore lists :)
y2krazy
08-30-2004, 03:11 AM
/me clicks install!
Megareus Rex
09-10-2004, 10:47 AM
Excellent hack! Maybe this'll revive the lost art of the vb3 Buddy list :p:p
*installs*
Shadow Blaze
10-09-2004, 04:41 AM
very nice... kinda depressing to be the owner/admin and not be on one users list :-p ^_^
nautiqeman
10-26-2004, 12:50 PM
for some reason I don't have anyone in my list even tho I know that I do. I'm using 3.0.3 -- the other person that I know has me, has my name in his list, but I don't have his in mine -- does it have something to do with having multiple people? Because I look at the buddylist and each id is separated by a space. For some reason I think it's only reading the first id and not any others. Anyone else have this problem?
Borgs8472
10-26-2004, 08:08 PM
<installs>
DrkFusion
10-26-2004, 08:16 PM
I didn't think of this at all. I have a forum where people form networks, largely powered by external scripts, but same database, and the method I use now is tedious, this is much easier.
shawno
11-23-2004, 06:03 AM
Gaming force,
Great hack.
One question for you - If User A sees that User B has added them to their buddy list (because unlike MSN messenger you don't have to 'accept' that a user wants to be added to their list) and if User A doesn't want to be a part of User B's buddy list does your hack allow User A to remove themselves from User B's buddy list?
Hope that makes sense.
Shawno
Dark Aura
12-10-2004, 10:33 PM
Love this hack, just installed it (Y)
Lord Brar
12-16-2004, 02:21 PM
* Lord Brar clicks install :D thanks, just what I was looking for... ;) Seems like now I can fully turn my site into a social networking site :P
ecarabin
12-17-2004, 01:33 AM
/me clicks install too !!! so easy to install, thanks !
Nordinho
12-30-2004, 02:27 PM
for some reason I don't have anyone in my list even tho I know that I do. I'm using 3.0.3 -- the other person that I know has me, has my name in his list, but I don't have his in mine -- does it have something to do with having multiple people? Because I look at the buddylist and each id is separated by a space. For some reason I think it's only reading the first id and not any others. Anyone else have this problem?
Same problem here...
MikaK
01-05-2005, 01:07 PM
*install* Works like a charm.
=M=
DavidNTD
01-10-2005, 03:52 PM
In and out.
How easy!
There is an opposite Hack like "who ignores me?, isnt it?
Im sure there has been one, but i cant find it. Does someone knows it?
wb-legends
02-16-2005, 05:29 AM
i had my friend add me back to see if the hack worked and while he can see me on the list, i can't see him. is there any way to fix that?
Julie
03-26-2005, 11:25 PM
Very cool! Was kinda shocked myself that so many had me on their list :P Hehe... Thanks!
*clicks install*
yoyoyoyo
08-22-2005, 12:54 AM
Same problem here...Same here.. nobody on the list, though that is not true. Using 3.0.8.
dolbex
09-22-2005, 08:30 AM
Same here.. nobody on the list, though that is not true. Using 3.0.8.
Exact same problem. Also, I wonder if anyone could break down the SQL statement that he is using to query...
Same here.. nobody on the list, though that is not true. Using 3.0.8.
Same here, using 3.0.7
uninstalling.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.