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)
-   -   enhanced buddylist with additional information (https://vborg.vbsupport.ru/showthread.php?t=67626)

MrZeropage 07-24-2004 10:00 PM

enhanced buddylist with additional information
 
I enhanced the buddylist a little, so that beside the name of the buddy you can see when this user had his last activity in the forum, which is most interesting for the offline-contacts.

In addition the administrators can even see what each online-buddy is currently doing in the board, same information as in "who is online", but within the buddylist.


Screenshot of my german version (buddylist) is attached to this posting.


The installation of this cute hack is quite simple:

Open /misc.php

Find:
Code:

$phrasegroups = array('fronthelp');
and REPLACE with
Code:

$phrasegroups = array('fronthelp', 'wol');
Find:
Code:

                while ($buddy = $DB_site->fetch_array($buddys))
and add ABOVE
Code:

                // enhanced buddylist by MrZeropage
                require_once('./includes/functions_user.php');
                $show['currentlocation'] = iif($permissions['wolpermissions'] & CANWHOSONLINE, true, false);
                // end endhanced buddylist

Find
Code:

                $doneuser["$buddy[userid]"] = true;
and add BELOW
Code:

                        // enhanced buddylist by MrZeropage
                        $userinfo = verify_id('user', $buddy[userid], 1, 1, 15);
                        if (!$userinfo['invisible'] OR ($permissions['genericpermissions'] & CANSEEHIDDEN) OR $userinfo['userid'] == $bbuserinfo['userid'])
                        {
                        $show['lastactivity'] = true;
                        $userinfo['lastactivitydate'] = vbdate($vboptions['dateformat'], $userinfo['lastactivity'], true);
                        $userinfo['lastactivitytime'] = vbdate($vboptions['timeformat'], $userinfo['lastactivity'], true);
                        }
                        else
                        {
                        $show['lastactivity'] = false;
                        $userinfo['lastactivitydate'] = '';
                        $userinfo['lastactivitytime'] = '';
                        }
                        // end enhanced buddylist

Save the modified misc.php.


Now open the template buddylistbit and REPLACE its whole content with the following code:
Code:

<tr>
        <td class="alt1"><a href="member.php?$session[sessionurl]u=$buddy[userid]" target="_blank"><img src="$stylevar[imgdir_statusicon]/user_$buddy[statusicon].gif" alt="" title="<phrase 1="$buddy[username]" 2="$buddy[statusicon]">$vbphrase[x_is_y]</phrase>" border="0" /></a></td>

        <td class="alt2"><input type="checkbox" name="userid[]" id="buddy_$buddy[userid]" value="$buddy[userid]" /></td>

        <td class="alt1" width="100%"><label class="smallfont" for="buddy_$buddy[userid]"><if condition="$show['highlightuser']"><span class="highlight"><b>$buddy[username]</b></span><else /><b>$buddy[username]</b></if>

<br>
<if condition="$bbuserinfo['usergroupid']==6">
<if condition="$show['currentlocation']"><div><if condition="$userinfo['action']">$userinfo[action] ($userinfo[where])</if></div></if>
</if>
<if condition="$show['lastactivity']"><div>$vbphrase[last_activity]: $userinfo[lastactivitydate] <span class="time">$userinfo[lastactivitytime]</span>&nbsp;</div></if>

</label></td>
</tr>

Save the template.

If you want everybody to see the information about the current location of each buddy (like in "who is online") instead of showing this information only to the administrators just remove the two colored line in the template-code above.
I did not test this if it works correctly, if the users can see any links to private forums ect. so use this feature at your own risk.



Now edit the template navbar to change the width of the buddylist-popup to 325 pixel:

Code:

<a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a>
Ths code comes up twice in the template, please edit both data to 325 pixel width.





Have fun :cool:

turbidblue 07-25-2004 08:04 PM

worked like a charm!

the code you had as showing up twice in the navbar template, was only in mine once, and it still worked fine ;)

[high]* turbidblue clicks install first!
[/high]

;) thank you

the Sandman 07-25-2004 08:11 PM

Does it add queries?

deathemperor 07-27-2004 06:18 AM

I believe it doens't

Polo 07-27-2004 12:12 PM

nice job ;)

Wayne Luke 07-27-2004 05:25 PM

Quote:

Originally Posted by the Sandman
Does it add queries?

It adds one query for every buddy on your buddy list. The function verify_id() results in a query to see if the ID is valid or not.

MustangLisa 08-09-2005 07:13 PM

Where does this show up? I don't see it anywhere.

MrZeropage 08-09-2005 07:20 PM

After installation you should open the buddylist to see the effect :)

yoyoyoyo 11-26-2005 09:08 PM

any chance this will be ported to 3.5.X sometime?

T3MEDIA 12-09-2005 08:23 PM

could you find sex using this idea? sex of the buddie online?


All times are GMT. The time now is 11:10 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.01256 seconds
  • Memory Usage 1,747KB
  • 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)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
  • (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