Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Updated Buddy List Code Details »»
Updated Buddy List Code
Version: 1.00, by afterlab afterlab is offline
Developer Last Online: Jul 2022 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-03-2002 Last Update: Never Installs: 13
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-04-2002, 11:08 PM
CeleronXL's Avatar
CeleronXL CeleronXL is offline
 
Join Date: Nov 2001
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uh.... Screenshot?
Reply With Quote
  #3  
Old 05-04-2002, 11:15 PM
afterlab's Avatar
afterlab afterlab is offline
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here.
Reply With Quote
  #4  
Old 06-17-2002, 10:38 AM
Paul Paul is offline
 
Join Date: Jan 2002
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack!

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

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
Reply With Quote
  #5  
Old 06-17-2002, 11:38 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 06-17-2002, 11:48 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #7  
Old 06-17-2002, 12:30 PM
Birdie501's Avatar
Birdie501 Birdie501 is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 06-17-2002, 01:20 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm...

Seems like a serious bug...

I'll take a look, as I havent installed this...

Satan
Reply With Quote
  #9  
Old 06-17-2002, 01:24 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this isn't a bug in this hack, more a bug in vb in general
Reply With Quote
  #10  
Old 06-17-2002, 01:38 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it?

Oh...

Satan
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05007 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete