View Full Version : Updated Buddy List Code
afterlab
05-03-2002, 10:00 PM
<font size="3">Updated Buddy List Code</font>
Because we always don't need to "Add A New Buddy"
============================================
This hack will update the Buddy List coding in getinfo. The old code was displayed always as "Add Buddy". This new code will replace that with either "Currently On Buddy List" or "Add Buddy" depending on whether or not you've added that member to your buddy list.
Compatibility: This hack will work with vB 2.0.3 and higher. This hack will also work with many getinfo (Profile) modifications, so regardless of what you've done it should work.
Install Time: 1-2 Minutes
Download: Instructions are in attachment.
CeleronXL
05-04-2002, 11:08 PM
Uh.... Screenshot?
afterlab
05-04-2002, 11:15 PM
Here.
Excellent hack! :D
Of course, if you're going to do that for the buddy list, you might as well do it for the ignore list ;D
Here's how:
1. In member.php, after (added as part of afterlab's hack):
$buddy_list = "-$bbuserinfo[buddylist]";
if (strpos($buddy_list, $userinfo[userid])) {
eval("\$isbuddy = \"".gettemplate("getinfo_isbuddy")."\";");
} else {
eval("\$isbuddy = \"".gettemplate("getinfo_addbuddy")."\";");
}
add the following:
// ignore emblem hack
$ignore_list = "-$bbuserinfo[ignorelist]";
if (strpos($ignore_list, $userinfo[userid])) {
eval("\$isignore = \"".gettemplate("getinfo_isignore")."\";");
} else {
eval("\$isignore = \"".gettemplate("getinfo_addignore")."\";");
}
// end ignore emblem hack
2. Create two new templates:
Template 1: getinfo_isignore:
<font color="{ linkcolor }">$userinfo[username] is currently on your Ignore List
[<a href="member2.php?s=$session[sessionhash]&action=removelist&userlist=ignore&userid=$userinfo[userid]">remove</a>]</font>
Template 2: getinfo_addignore:
<a href="member2.php?s=$session[sessionhash]&action=addlist&userlist=ignore&userid=$userinfo[userid]">
<font color="{ linkcolor }">Add $userinfo[username] to your Ignore List</font></a>
3. Edit the getinfo template:
Find the following:
<a href="member2.php?s=$session[sessionhash]&action=addlist&userlist=ignore&userid=$userinfo[userid]">
<font color="{ linkcolor }">Add $userinfo[username] to Your Ignore List</font></a>
Replace with:
$isignore
4. Save, upload, and you're done :D
Thanks for the hack, afterlab!
Edit: Oops. I forgot I had to add spaces in between the brackets in { linkcolor } (make sure to take those out if you should use this ;)
X-Fan
06-17-2002, 11:38 AM
In the above ignore list addition, be sure to change...
<font color="#EEEEFF">
to...
<font color="{ linkcolor }">
(minus the extra spaces) so that the links show up in the color you've selected for your forums.
X-Fan
06-17-2002, 11:48 AM
Just a few cosmetic tweaks to make the links look a little better for the updated Buddy List code.
In the getinfo_addbuddy template, I put...
<a href="member2.php?s=$session[sessionhash]&action=addlist&userlist=buddy&userid=$userinfo[userid]"><font color="{ linkcolor }">Add $userinfo[username] to your Buddy List</font></a>
(without the extra spaces in the linkcolor replacement tag)
And in the getinfo_isbuddy template, a modification of LoveShack's isignore:
<font color="{ linkcolor }">$userinfo[username] is currently on your Buddy List
[<a href="member2.php?s=$session[sessionhash]&action=removelist&userlist=buddy&userid=$userinfo[userid]">remove</a>]</font>
(again without the extra spaces in the linkcolor replacement tag)
And the two then line-up much better!
Thanks for a cool hack, afterlab!
Birdie501
06-17-2002, 12:30 PM
Thanks Loveshack,
but there is a bug :
if you put one user to ignore list and then add him to buddy list!
He is on both lists! Doesn't make sense, right?
Chris M
06-17-2002, 01:20 PM
Umm...
Seems like a serious bug...
I'll take a look, as I havent installed this...
Satan
Xenon
06-17-2002, 01:24 PM
this isn't a bug in this hack, more a bug in vb in general ;)
Chris M
06-17-2002, 01:38 PM
Is it?
Oh...
Satan
Xenon
06-17-2002, 02:36 PM
yeap, just test it here, you can add a user to your buddy and ignorelist :)
Birdie501
06-17-2002, 02:42 PM
I think this should be corrected in vb 3.0! :)
but there is a bug :
if you put one user to ignore list and then add him to buddy list!
He is on both lists! Doesn't make sense, right?
I don't think it's a bug, per se.
Most IM clients will allow you to keep users on your "buddy list" while having them on "ignore", or something similar. There may be instances when a person would want to temporarily ignore someone for a period of time for whatever reason.
I don't think it's safe to say that it shouldn't let you add someone to both lists. There are many instances where that would be cumbersome to the user.
Paul
Birdie501
06-17-2002, 03:39 PM
Well, i still think it make no sense! If i want to ignore somebody why shouldn't i add him to ignore list? After a period of time if i want to add him to buddy list, i can do that! But to have a user on both will confuse newbies!!!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.