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)
-   -   Who Am I A Buddy Of - Version 2.0 (https://vborg.vbsupport.ru/showthread.php?t=67392)

Gamingforce 07-19-2004 10:00 PM

Who Am I A Buddy Of - Version 2.0
 
[ 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!

[high]* turbidblue clicks install :)[/high]

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 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;
PHP Code:

$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

Quote:

Originally Posted by nexialys
i thought that we had enough with vBFriends - View your social network 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

Quote:

Originally Posted by Gamingforce
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:

Code:


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

Quote:

Originally Posted by Gamingforce
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

[high]* 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[/high]

ecarabin 12-17-2004 01:33 AM

/me clicks install too !!! so easy to install, thanks !

Nordinho 12-30-2004 02:27 PM

Quote:

Originally Posted by nautiqeman
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!

vau7 01-26-2005 02:26 PM

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

Quote:

Originally Posted by Nordinho
Same problem here...

Same here.. nobody on the list, though that is not true. Using 3.0.8.


All times are GMT. The time now is 04:43 PM.

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.01267 seconds
  • Memory Usage 1,818KB
  • 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
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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