vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Who Am I A Buddy Of? 2.1 (https://vborg.vbsupport.ru/showthread.php?t=111013)

Gamingforce 03-20-2006 10:00 PM

Who Am I A Buddy Of? 2.1
 
[ 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.

[ Screenshot ]

http://www.gamingforce.com/vbmods/whobuddy.gif

Enjoy!

The Chief 03-21-2006 07:47 PM

hey looking good, love your forums :)

projectego 03-21-2006 07:56 PM

Nice hack, I actually used it when you first released it for the 3.0.x series. Cheers for the port. :)

hiiped 03-22-2006 01:59 AM

very useful

thanks

< clicking install >

shadowdancer36 03-22-2006 02:30 PM

Just wondering if I can make a link and have the list to come up as a pop up window?

Alien 03-22-2006 04:44 PM

Awesome port! I'll be using this one...

briansol 04-24-2006 07:17 AM

anychance of adding the + or - to each post under the user name like their post count?

briansol 04-24-2006 08:31 AM

I figured my own post out. :)

open showthread.php

find:
Code:

'editor_jsoptions_size',
add after:
Code:

'whobuddy',
find:
Code:

else
                {
                        $fetchtype = 'post';
                }

add after:

Code:

//******************************************************************************************************
                //------  buddy mod
                //******************************************************************************************************

                $bbuserinfo['userid'] = $vbulletin->userinfo['userid'];
                $bbuserinfo['buddylist'] = $vbulletin->userinfo['buddylist'];

                $buddyarray = explode(" ", $bbuserinfo['buddylist']);

                //$post['whobuddybit']= "";

                foreach($buddyarray as $buddyid)
                {
                        if(strstr(" $buddyid "," $post[userid] "))
                        {
                                //$post['whobuddybit'].= "Buddy ID: ". $buddyid ." matches";
                                $currentpostbuddyid = $buddyid;
                        }
                }

                       

                if ($currentpostbuddyid == $post[userid]) {
                                $mutualbuddybit = "<a href=\"profile.php?$session[sessionurl]do=removelist&amp;userlist=buddy&amp;u=$post[userid]\">[Remove from  Buddy List]</a>";
                               
                } else {
                                $mutualbuddybit = "<a href=\"profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]\">[Add to Buddy List]</a>";
                }
                $post['whobuddybit'] .= $mutualbuddybit;
                //$post['whobuddybit'] .= "bbuserinfo[userid]= " . $bbuserinfo['userid'] ."  bbuserinfo[buddylist]= ". $bbuserinfo['buddylist'];

               
                       

                //******************************************************************************************************
                //------  end buddy mod
                //******************************************************************************************************


find:
Code:

unset($post);
add after:

Code:

unset($whobuddybit);
unset($mutualbuddybit);



TEMPLATES:

go to edit templates, postbit_legacy (this is the one i use... you may use the new postbit, and i don't know exaclty where you want to add this horizontally... i'm sure you can find a spot on your own. it's the same paste code.

find:
Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
add after:
Code:

<if condition="$post['userid']">
  <div>$post[whobuddybit]</div>
</if>

and i think thats it. let me know if anyone has trouble with it.

briansol 04-24-2006 08:32 AM

also note, this DOESNT add an extra query. All info needed is already pulled from the main query for the posts!

Boofo 04-24-2006 08:35 AM

Isn't there a way to do a string replace for the file edit?


All times are GMT. The time now is 02:57 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.01082 seconds
  • Memory Usage 1,737KB
  • 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
  • (8)bbcode_code_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
  • (10)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