Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Current Users Online Panel Stopped Working :( Details »»
Current Users Online Panel Stopped Working :(
Version: , by romeshomey romeshomey is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-06-2003 Last Update: Never Installs: 0
 
No support by the author.

Can anyone help me out here.

I added the hack for the Number Of Users Online Today to my forum, and since, my Current Users Online panel has quit working.

I have no clue what the problem is and can only asume its an error in my index file as I have the codes in my forumhome already but it isnt being called up.

Can someone PLEASE take a look at my index file and see if I have something missing, or what might be wrong?

Id really really appreciate it, this is driving me nutz, Iv spent 2 hours today tring to solve this and am now at a standstill.

Code:
  // today online hack begin
  if ((int)$maxusers[0] <= $totalonline) {
    $time = time();
    $maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
    $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    $maxusers[0] = $totalonline;
    $maxusers[1] = $time;
  }

  $todayloggedinusers = "";
  $numbertodayonline = 0;
  $numbertodayonlineinvisible = 0;

  $todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user 
                WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . " 
                ORDER BY username");
  while ($todayuser=$DB_site->fetch_array($todayusers)) {
    $numbertodayonline++;
    $invisibleuser = '';
    $userid = $todayuser['userid'];
    $lastactivetime = vbdate($timeformat, $todayuser[lastactivity]);
    if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
      $numbertodayonlineinvisible++;
      continue;
    }
    if ($todayuser['invisible'] == 1) { // Invisible User but show to Admin
      $invisibleuser = '*';
    }
    if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
      $username = "<b><i>$todayuser[username]</i></b>";
    } else if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
      $username = "<b>$todayuser[username]</b>";
    } else {
      $username = $todayuser['username'];
    }
    if (!$todayloggedinuser) {
      eval("\$todayloggedinuser = \"".gettemplate('forumhome_todayloggedinuser')."\";");
    } else {
      eval("\$todayloggedinuser .= \", ".gettemplate('forumhome_todayloggedinuser')."\";");
    }
  }

  $DB_site->free_result($todayusers);

  if ($bbuserinfo[usergroupid] == 6) {
    $todayonline = $numbertodayonline;
  } else {
    $todayonline = $numbertodayonline - $numbertodayonlineinvisible;
  }
  
  if ((int)$maxusers[2] <= $numbertodayonline) {
    $time = time();
    $maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
    $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    $maxusers[2] = $numbertodayonline;
    $maxusers[3] = $time;
  }
  
  $todayrecordusers = $maxusers[2];
  $todayrecorddate = vbdate($dateformat,$maxusers[3]);
  
  eval("\$todayloggedinusers = \"".gettemplate('forumhome_todayloggedinusers')."\";");
//today online hack end

Show Your Support

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

Comments
  #2  
Old 08-06-2003, 10:49 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't post complete vBulletin files here. It's going to be removed if you don't remove it yourself.
Reply With Quote
  #3  
Old 08-07-2003, 12:19 AM
romeshomey romeshomey is offline
 
Join Date: Oct 2002
Location: Ohio
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There, I edited it so it only shows the hack I installed..
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 05:30 AM.


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.03936 seconds
  • Memory Usage 2,215KB
  • Queries Executed 16 (?)
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)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete