vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Statistics Modifications - Display Online Users Count Everywhere (vB 4) (https://vborg.vbsupport.ru/showthread.php?t=239363)

Sean James 09-21-2010 05:03 PM

A version with threads and posts would be great.

Tamara-Jasmin 04-09-2011 05:57 PM

Also ich bastel jetzt schon mehrere Tage an dem Teil und bekomme es NICHT nach ganz oben geschoben. Vielleicht hat ja einer eine Info für mich wie das geht.
Ausserdem bekomme ich auf der Startseite NIE die Useranzahl angezeigt und manchmal auch falsche Werte (so werde ich z.B. manchmal gar nicht angezeigt).
Irgendwie ist das Teil nicht wirklich ausgereift - die Idee finde ich aber schon mal gut.

Liebe Grüsse:
Tammy

Ps. Hoffe hier können auch einige Deutsch lesen - Englisch kann ich nämlich kein Wort. Also Sorry.

Attila85 10-19-2011 06:23 PM

I did all the modification needed, and I changed the Hook to be global_start since I put it in the header, but It does not get the counters. You can see an example on www.thesims3.it on the top header.
Any idea?

Attila85 10-20-2011 03:03 PM

Yes I did but still no results.
Here is the code I added in the header template:

Code:

<!-- Display Online Users Count -->
<b>{vb:raw msxtotal}</b> utenti online ({vb:rawphrase x_members_and_y_guests, {vb:raw msxmembers}, {vb:raw msxguests}})
<!-- / Display Online Users Count -->

Here the code of the plugin:

Code:

// get online users
$datecut = TIMENOW - $vbulletin->options['cookietimeout'];
$guestsarry = $db->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut");
$membersarry = $db->query_read("SELECT DISTINCT userid FROM " . TABLE_PREFIX . "session WHERE userid <> 0 AND lastactivity > $datecut");
$msxguests = intval($guestsarry['sessions']);
$msxmembers = intval($db->num_rows($membersarry));
$msxtotal = $msxmembers + $msxguests;
vB_Template::preRegister('header',array('msxtotal' => $msxtotal, 'msxmembers' => $msxmembers, 'msxguests' => $msxguests));
// get online users

Position: Global_start
Execution order: 5
Plugin is active.

But still no results, as you can see... any hint?

Attila85 10-20-2011 03:06 PM

Well.. it seems working now... but I did not edit anything... wtf? :P

kh99 10-20-2011 03:09 PM

Great. :) That happens to me sometimes - either I was looking at the wrong style, or I forgot to enable the plugin, or something.

Attila85 10-22-2011 01:15 PM

I donnow why now it works everywhere but in the home page (Http://www.thesims3.it) .. any idea?

Attila85 11-13-2011 01:45 PM

Up, anybody has an idea? It's so strange that it works everywhere but the home...

Brandon Sheley 11-13-2011 02:32 PM

nice mod, I'd add this to my forum if I was running vb right now
I'll keep it in mind for clients :)

Thanks for sharing!

Seba123 11-17-2011 08:13 PM

Two queries, bad.


All times are GMT. The time now is 01:49 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.04287 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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