vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Total Thread Views? (https://vborg.vbsupport.ru/showthread.php?t=95425)

fasteddie 09-01-2005 05:16 AM

Total Thread Views?
 
I've been searching for total thread views for a forum hack, but I can't find it anywhere.

I want what BoxerWorld (www.boxerworld.com/forums) has:

Boxer Board Statistics

Threads: 70,542, Posts: 616,988, Members: 33,720, Thread Views: 17,293,396

I can't find the hack. Help please! THANKS!

Quote:

Originally Posted by fasteddie
I've been searching for total thread views for a forum hack, but I can't find it anywhere.

I want what BoxerWorld (www.boxerworld.com/forums) has:

Boxer Board Statistics

Threads: 70,542, Posts: 616,988, Members: 33,720, Thread Views: 17,293,396

I can't find the hack. Help please! THANKS!

Anyone got any ideas at all? Please? Pretty please? ;)

Quote:

Originally Posted by fasteddie
I've been searching for total thread views for a forum hack, but I can't find it anywhere.

I want what BoxerWorld (www.boxerworld.com/forums) has:

Boxer Board Statistics

Threads: 70,542, Posts: 616,988, Members: 33,720, Thread Views: 17,293,396

I can't find the hack. Help please! THANKS!



Anyone got any ideas at all? Please? Pretty please? ;)

Anyone got any ideas at all? Please? Pretty please? ;)

fasteddie 09-02-2005 06:35 AM

Quote:

Originally Posted by fasteddie
I've been searching for total thread views for a forum hack, but I can't find it anywhere.

I want what BoxerWorld (www.boxerworld.com/forums) has:

Boxer Board Statistics

Threads: 70,542, Posts: 616,988, Members: 33,720, Thread Views: 17,293,396

I can't find the hack. Help please! THANKS!



Anyone got any ideas at all? Please? Pretty please? ;)



Anyone got any ideas at all? Please? Pretty please? ;)

Does anybody know? TIA!

Logician 09-02-2005 09:28 AM

This looks like a hack request so IMO the forum is wrong but nevermind..

(Assuming you use vb 3.0.x)
Edit index.php, find:

PHP Code:

// ### LOGGED IN USERS ################################################# 

before that add:
PHP Code:

// Logician Hack: Calculate Board View Count
$boardviews $DB_site->query_first("SELECT SUM(views) AS threadviews FROM " TABLE_PREFIX "thread");
$totalviews number_format($boardviews[threadviews]);
// Logician Hack: Calculate Board View Count 

Then add $totalviews to somewhere in your forumhome template.

IMPORTANT WARNING: If you have too many threads or too many visitors, this is NOT a performance friendly hack. It puts a burden on your forum home page as it is a pain for MYSQL to compile this stats everytime forum home page is loaded. If you have a small and low traffic forum, you can use it but I dont suggest it installed in a large or high traffic forum.
[/End of Warning]

The performance friendly way of doing it is to index threadviews column in thread table AND tie this code to a vb cron and make it post to the datastore, then read the stats from there but well it requires some work so this is all I can offer. If you want a better version, I'd suggest your request to post it to Hack requests forum.

fasteddie 09-03-2005 01:31 AM

AWESOME. THANK YOU so much. Can I use this in conjunction with the cached stats hack?

arena 01-26-2007 12:24 AM

For 3.6.4 work?


All times are GMT. The time now is 08:38 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.00955 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete