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)
-   -   Visitor Totals Last 24hrs (https://vborg.vbsupport.ru/showthread.php?t=100671)

bspiller82 11-14-2005 05:45 AM

How do I fix mine?

Code:

$vbulletin->db->query_write("
        DELETE FROM " . TABLE_PREFIX . "cpsession
        WHERE dateline < " . intval(TIMENOW - 3600) . "
        ### Delete stale cpsessions ###

Is giving me this error
Code:

Parse error: parse error, unexpected ']' in /home/a247xtre/public_html/forums/includes/cron/cleanup.php on line 26

Paul M 11-14-2005 09:31 AM

Quote:

Originally Posted by caliman
Is this mod compatible with 'who has visited today?'

https://vborg.vbsupport.ru/showthread.php?t=82769

I can't see any reason that this would intefere with my hack. :)

caliman 11-14-2005 12:42 PM

Thanks Paul.

caliman 11-14-2005 12:48 PM

Hey, mine doesn't seem to work right... if you stay on the site for a while it keeps recounting you as a member and it doesn't seem to go over 1 hour (it's been on past midnight now):

Total users last 1hrs : 13 (10 members and 3 guests)

Any ideas?

lexx27 11-14-2005 12:58 PM

I have the same problem.

TTG 11-14-2005 02:06 PM

Quote:

Originally Posted by caliman
Hey, mine doesn't seem to work right... if you stay on the site for a while it keeps recounting you as a member and it doesn't seem to go over 1 hour (it's been on past midnight now):

Total users last 1hrs : 13 (10 members and 3 guests)

Any ideas?

Same problem on mine !?

mclark2112 11-14-2005 06:50 PM

Still a problem in IE in the Dark Blue style...Map is all over the place.

tcs 11-14-2005 08:05 PM

Code:

$vbulletin->db->query_write("
        DELETE FROM " . TABLE_PREFIX . "session
        WHERE lastactivity < " . intval((TIMENOW - 86400]) . "
        ### Delete stale sessions ###

Is the code to use in cleanup.php only. Do not change what is in cleanup2.php.

I run "who was online today" and have had no issues or conflicts with them working together.

I just installed this on 3 other boards in an attempt to duplicate this problem. So far they are working fine.

Check your cleanup2.php and make sure you did not change the original code. This is the only hack I know that changes the cleanup.php you can re upload a new copy and try again to see if that fixes it.

amykhar 11-14-2005 08:33 PM

Typo in the install file.

Code:

$vbulletin->db->query_write("
        DELETE FROM " . TABLE_PREFIX . "session
        WHERE lastactivity < " . intval((TIMENOW - 86400]) . "
        ### Delete stale sessions ###

Should be
Code:

$vbulletin->db->query_write("
        DELETE FROM " . TABLE_PREFIX . "session
        WHERE lastactivity < " . intval((TIMENOW - 86400)) . "
        ### Delete stale sessions ###


amykhar 11-14-2005 08:47 PM

I have NOT been able to test this fully. Or even more than making sure it has no parse errors and the numbers add up. But, here is the plugin code for this mod for those of you using my spider's on the forumhome page.

The forumhome template code needs to change as well. My target audience will know how to do that ;)

Code:

    $datecut24 = TIMENOW - 86400;
        $numberregistered24 = 0;
        $numberguest24 = 0;
        $numberspiders24 = 0;

        $forumusers24 = $vbulletin->db->query("
                SELECT userid, lastactivity, useragent FROM " . TABLE_PREFIX . "session
                WHERE lastactivity > $datecut24
        ");

        $time24 = TIMENOW ;
        while ($loggedin24 = $vbulletin->db->fetch_array($forumusers24))
        {
                $userid24 = $loggedin24['userid'];
                if (!$userid24)
                {        // Guest or spider
                  if (!empty($vbulletin->wol_spiders))
            {
                      if (preg_match('#(' . $vbulletin->wol_spiders['spiderstring'] . ')#si', $loggedin24['useragent'], $agent))
                      {
                        $numberspiders24++;
                      }
                      else
                      {
                              $numberguest24++;
                          }
                        }
                }
                else
                {
                        $numberregistered24++;
                }
                if ($loggedin24['lastactivity'] < $time24)
                {
                        $time24 = $loggedin24['lastactivity'];
                }
        }
        $time24 = TIMENOW - $time24;
        $time24 = floor($time24 / 3600) + (($time24 % 3600) ? 1 : 0);

        $numbertotal24 = $numberregistered24 + $numberguest24 +$numberspiders24;

        unset($loggedin24);
        $vbulletin->db->free_result($forumusers24);



All times are GMT. The time now is 05:59 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.01091 seconds
  • Memory Usage 1,749KB
  • 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
  • (6)bbcode_code_printable
  • (2)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