Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2002, 12:30 AM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default A Request

Is there a way to make it so make it so the admin can view who's online from within the admin control panel without having to go the the main page? I'd like a feature like this for my admin control panel. Maybe to sit above Freddie's admin cp addition. Thanks!
Reply With Quote
  #2  
Old 09-01-2002, 12:45 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Open admin/index.php

Find:
Code:
makenavselect("Announcements");
Under it add:
Code:
// ***
makenavoption("Who's Online?","../online.php?s=");
makenavselect("Who's Online?");
Reply With Quote
  #3  
Old 09-01-2002, 02:14 AM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, but that's not what I mean. I already have that setup. I want it to display on the main admin cp page along with the other info, not in the menu.
Reply With Quote
  #4  
Old 09-01-2002, 08:29 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then just open up admin/index.php, and find :

Code:
<p><font size='1'>From here, you can control all aspects of your vBulletin forums.
Please select what you need from the links down the left hand side of this page.</font><p>
And add below :

Code:
<br><a href="../online.php?s=">Who's Online</a>
Satan
Reply With Quote
  #5  
Old 09-01-2002, 10:05 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This small trick can work if you are IE user:

PHP Code:
<div align=center><iframe name="cwindow" style="border:0" width=600 height=400 src="../online.php"></iframe
Reply With Quote
  #6  
Old 09-01-2002, 10:19 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yey!

I frames

Satan
Reply With Quote
  #7  
Old 09-01-2002, 06:55 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks everyone, but I'm not looking for links. I'm looking for it to be a part of the display with the default admin cp color scheme.

Logician, I will try yours for now. Thanks!
Reply With Quote
  #8  
Old 09-01-2002, 07:54 PM
joecool joecool is offline
 
Join Date: Mar 2002
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I understand what you want.

Open Admin/index.php and find :

PHP Code:
  <font size='1'>From hereyou can control all aspects of your vBulletin forums.
Please select what you need from the links down the left hand side of this page.</font><p
Add this either before of after it, or maybe replace the above text. With this code ::

PHP Code:
<?php
        
$datecut
=time()-$cookietimeout;
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];


print(
"<align='center'>Guests Online: $headerguests[count]<br>");
print(
"<align='center'>Members Online: $headerusers[count] who are <br>");


?>
                    <?


$usernames = "on"; 
                   
$path = "path/to/admin"; 



$cookievalue = mysql_query("SELECT value FROM setting WHERE varname = 'cookietimeout'") or die("oops1");
$cookietimeout = mysql_result($cookievalue, 0, 0);
$datecut = time()-$cookietimeout;

$invisibleregmember = "0";

if ($usernames == "on") {
    $regmembers = mysql_query("SELECT DISTINCT username,invisible FROM user,session WHERE session.userid=user.userid AND session.lastactivity>$datecut AND invisible='0' ORDER BY username ASC") or die("oops2");
    while($regmember = mysql_fetch_array($regmembers)):
        ++$regmembercomma;
        if ($regmember[invisible] == 0) {
            $regmemberson .= $regmember[username];
        } else {
            ++$regmembercomma;
        }
        if ($regmembercomma < mysql_num_rows($regmembers)):
            $regmemberson .= ", ";
        endif;
    endwhile;
} else {
    $regmembers = mysql_query("SELECT DISTINCT COUNT(userid) AS membersonline FROM session WHERE userid>0 AND session.lastactivity>$datecut") or die("oops2");
    while($members = mysql_fetch_array($regmembers)) {
        $regmemberson = number_format($members[membersonline]);
    }
}

$guests = mysql_query("SELECT COUNT(userid) AS guestsonline FROM session WHERE userid=0 AND session.lastactivity>$datecut") or die("oops3");
while($guest = mysql_fetch_array($guests)):
    $guestson = number_format($guest[guestsonline]);
endwhile;

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
echo("<a href=\"../member.php?s=$session[sessionhash]&action=getinfo&userid=$bbuserinfo[userid]\"><b>$regmemberson</b></a><br>

}else{
echo("No members on-line");
}

?>

Save upload and Wow, this will allow you to see who is online and click them to see profile.. Also it will show how many guests online

Let me know if its okay. been tested on my 2.26vb)
Reply With Quote
  #9  
Old 09-01-2002, 08:14 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I will test it now.
Reply With Quote
  #10  
Old 09-01-2002, 08:20 PM
joecool joecool is offline
 
Join Date: Mar 2002
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, the first step, is optional, i mean you can put it whereever you want but nicely at the top looks noce for my, cos i have no other mods on their.
Reply With Quote
Reply


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 06:54 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.08803 seconds
  • Memory Usage 2,270KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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