vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Whos online in Admincp (https://vborg.vbsupport.ru/showthread.php?t=93868)

Logikos 08-09-2005 12:24 AM

I meant i'm trying to get that effect, where the blank box is. ;)

Boofo 08-09-2005 12:58 AM

Quote:

Originally Posted by Live Wire
I meant i'm trying to get that effect, where the blank box is. ;)

Oh, ok, I see now. Kirby's doesn't have a blank box.

Andreas 08-09-2005 07:46 PM

Quote:

Originally Posted by Live Wire
I can't seem to get it like Kirbys attachment without hacking the file. I'm trying to get this effect. http://www.mistakes.us/gear/kirby.gif. Thats a Photoshop edit.

That's easy (assuming you want that blank box shown in the image).

Hook: admin_index_main
PHP Code:

print_table_break();
print_table_header('');
print_label_row(' ',' ');
fetch_row_bgclass();
print_label_row(' ',' ');
print_table_break(); 


Boofo 08-09-2005 07:48 PM

Why would you want a blank table there?

Oh, wait, we're talking about LW. Never mind. ;)

Logikos 08-10-2005 12:01 AM

Quote:

Originally Posted by Boofo
Why would you want a blank table there?

Oh, wait, we're talking about LW. Never mind. ;)

Haha, your too old to understand a young mans mind :p

To get a seperate box for the users, replace all the code in the hook: admin_index_mail with this:
PHP Code:

        require_once(DIR '/includes/functions_bigthree.php');

        
$datecut TIMENOW $vbulletin->options['cookietimeout'];
        
$numbervisible 0;
        
$numberregistered 0;
        
$numberguest 0;

        
$forumusers $db->query_read("
                SELECT
                        user.username, (user.options & " 
$vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid,
                        session.userid, session.inforum, session.lastactivity,
                        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                FROM " 
TABLE_PREFIX "session AS session
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = session.userid)
                WHERE session.lastactivity > 
$datecut
                " 
iif($vbulletin->options['displayloggedin'] == 1"ORDER BY username ASC") . "
        "
);

        if (
$vbulletin->userinfo['userid'])
        {
                
// fakes the user being online for an initial page view of index.php
                
$vbulletin->userinfo['joingroupid'] = iif($vbulletin->userinfo['displaygroupid'], $vbulletin->userinfo['displaygroupid'], $vbulletin->userinfo['usergroupid']);
                
$userinfos = array
                (
                        
$vbulletin->userinfo['userid'] => array
                        (
                                
'userid' => $vbulletin->userinfo['userid'],
                                
'username' => $vbulletin->userinfo['username'],
                                
'invisible' => $vbulletin->userinfo['invisible'],
                                
'inforum' => 0,
                                
'lastactivity' => TIMENOW,
                                
'usergroupid' => $vbulletin->userinfo['usergroupid'],
                                
'displaygroupid' => $vbulletin->userinfo['displaygroupid'],
                        )
                );
        }
        else
        {
                
$userinfos = array();
        }
        
$inforum = array();

        while (
$loggedin $db->fetch_array($forumusers))
        {
                
$userid $loggedin['userid'];
                if (!
$userid)
                {        
// Guest
                        
$numberguest++;
                        
$inforum["$loggedin[inforum]"]++;
                }
                else if (empty(
$userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        
$userinfos["$userid"] = $loggedin;
                }
        }

        if (!
$vbulletin->userinfo['userid'] AND $numberguest == 0)
        {
                
$numberguest++;
        }

        foreach (
$userinfos AS $userid => $loggedin)
        {
                
$numberregistered++;
                if (
$userid != $vbulletin->userinfo['userid'])
                {
                        
$inforum["$loggedin[inforum]"]++;
                }
                
$loggedin['username'] = fetch_musername($loggedin);


                if (
fetch_online_status($loggedin))
                {
                        
$numbervisible++;
                        
$activeusers .= ", <a href=\"user.php?$session[sessionurl]do=edit&u=$loggedin[userid]\">$loggedin[username]</a>$loggedin[invisiblemark]$loggedin[buddymark]";
                }
        }

        
// memory saving
        
unset($userinfos$loggedin);
        
$activeusers substr($activeusers2);

        
print_table_break();
        
print_table_header($vbphrase['users_online']);
        
print_label_row($activeusers);
        
print_table_break(); 


Boofo 08-10-2005 12:50 AM

Looks good! ;)

If you takje the second instance of this (from the bottom up) out, you get it evenly spaced on the top and botton of the boix. ;)

PHP Code:

         print_table_break(); 


Andreas 08-10-2005 04:09 AM

The 2nd Instance is necessary.

Xplorer4x4 08-19-2005 06:59 AM

Is there any way you could change the name of the table where it says: Users Online

With the link form the forum index that says: Currently Active Users

I think it would make it that much more functional. BTW I am using your edit from post 25 if you didn;t already realize that. ;)

Logikos 08-19-2005 04:22 PM

There are new hook locations in RC3. When its released, i'll beable to fix this hack to have a seperate box.

Xplorer4x4 08-23-2005 09:24 AM

Quote:

Originally Posted by Live Wire
There are new hook locations in RC3. When its released, i'll beable to fix this hack to have a seperate box.

Isn;t that the point of post 25 above? What about the link to currently active users? Either way it is a much appreciated feature.


All times are GMT. The time now is 05:48 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.01130 seconds
  • Memory Usage 1,786KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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