Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
headStatz Details »»
headStatz
Version: 1.00, by Coders Shack Coders Shack is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.6.8 Rating:
Released: 10-20-2007 Last Update: 10-20-2007 Installs: 20
Uses Plugins
 
No support by the author.

[hr]value[/hr]
. . . . . . . . Brought to you by

. . . http://www.Scriptasy.com
[hr]value[/hr]

Installation Time: < 5 mins
Product: 1
Files: 1
VB Version: 3.6.X


Description:
I wanted to display the current amount of guests and users online without adding any stressful queries. So basically this mod provides the following variables you can use globally in templates:
$hsz[guests] - shows the current count of guests online
$hsz[gphrase] - is the word guest or guests deturmined by how many guests are online
$hsz[members] - shows the current count of members online
$hsz[mphrase] - is the word member or members deturmined by how many members are online
$hsz[total] - is the total amount of guests and members online
$hsz[totalthreads] - total forum threads
$hsz[totalposts] - total forum posts
$hsz[totalmembers] - total forum members
This does add one query to every page, buts its a harmless query. If you would like to remove the query you can make the following file edit:

FILE: /includes/class_core.php
FIND:
PHP Code:
var $defaultitems = array( 
ADD UNDER:
PHP Code:
        'headstatz'
now the mod will add zero queries.

Installation Instructions:
  1. Install Product
  2. Make your own template edits
If you like then [Mark As Installed]

Show Your Support

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

Comments
  #2  
Old 10-21-2007, 07:26 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

some people may not have a use for this mod but i decided to release it because i needed it.

you can see an example of its use on my forum: http://www.scriptasy.com its under the navbar.

also if you want to use it on a vbadvanced page just allow the following global var in the vbaCP "hsz"
Reply With Quote
  #3  
Old 10-21-2007, 07:29 PM
Shazz's Avatar
Shazz Shazz is offline
 
Join Date: Jun 2006
Location: Utah
Posts: 4,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Small nice feature Coders Shack.
Reply With Quote
  #4  
Old 10-21-2007, 07:30 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yea i didn't want the online count to be recalculated every pageload so i made a datastore entry that stores the $hsz values.
Reply With Quote
  #5  
Old 10-21-2007, 07:31 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like it
Reply With Quote
  #6  
Old 10-21-2007, 09:51 PM
FreshFroot's Avatar
FreshFroot FreshFroot is offline
 
Join Date: Jul 2005
Posts: 770
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still a good hack, some of those variables would be useful. thanks
Reply With Quote
  #7  
Old 10-21-2007, 10:02 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found out that on the "You are required to login" pages the var's don't work.

So you should just do this to prevent bad output:

Code:
<if condition="is_array($hsz)">
YOUR CONTENT AND VARS
</if>
Reply With Quote
  #8  
Old 11-08-2007, 04:07 PM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The datastore update in the cron file, is missing table_prefix.
Reply With Quote
  #9  
Old 11-11-2007, 03:46 PM
FCS-Webmaster FCS-Webmaster is offline
 
Join Date: Aug 2007
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a possibility to read out how many hits in total i`ve had?!
Reply With Quote
  #10  
Old 11-11-2007, 08:56 PM
Coders Shack Coders Shack is offline
 
Join Date: Apr 2007
Location: Culver City, CA
Posts: 807
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FCS-Webmaster View Post
Is there a possibility to read out how many hits in total i`ve had?!
you have the right idea, this would be the mod that you would want to use to have counter. Keep in mind though a hit counter would add one query per page view.
Reply With Quote
Reply

Thread Tools

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:02 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.05086 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (9)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