vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Updated Buddy List Code (https://vborg.vbsupport.ru/showthread.php?t=38238)

afterlab 05-03-2002 10:00 PM

Updated Buddy List Code
 
<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.

Paul 06-17-2002 10:38 AM

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):

PHP Code:

  $buddy_list "-$bbuserinfo[buddylist]";

    if (
strpos($buddy_list$userinfo[userid])) {
      eval(
"\$isbuddy = \"".gettemplate("getinfo_isbuddy")."\";");
    } else {
      eval(
"\$isbuddy = \"".gettemplate("getinfo_addbuddy")."\";");
    } 

add the following:

PHP Code:

  // 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:
Code:

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

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

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

$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...

PHP Code:

<font color="#EEEEFF"

to...

PHP Code:

<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...

PHP Code:

<a href="member2.php?s=$session[sessionhash]&action=addlist&userlist=buddy&userid=$userinfo[userid]"><font color="{ linkcolor }">Add $userinfo[usernameto 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:

PHP Code:

<font color="{ linkcolor }">$userinfo[usernameis 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! :)

Paul 06-17-2002 03:29 PM

Quote:

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!!!!


All times are GMT. The time now is 03:07 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.01110 seconds
  • Memory Usage 1,764KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)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