vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Show all hits on Forumhome (https://vborg.vbsupport.ru/showthread.php?t=65139)

PcFreak 05-14-2004 10:00 PM

Show all hits on Forumhome
 
First,

I am Geman. My English is not very well and this is my first little hack.

If there a other kind of this hack, sorry.

What's it do?
This hack shows the sum of all hits in the Forum Statistics.

Files to edit.

index.php
Template: FORUMHOME
Add one new Phrase

PcFreak

Chris|vB 05-15-2004 03:59 AM

great hack :)

Gio Takahashi 05-15-2004 09:29 AM

Just a question what you mean by HIt you mean Thread View count? I'm just a little confused.

hitmanuk2k 05-15-2004 09:46 AM

is it possible to insert comma's in the number?

2,134,114 instead of 2134114

PcFreak 05-15-2004 11:02 AM

Quote:

Originally Posted by Gio Takahashi
Just a question what you mean by HIt you mean Thread View count? I'm just a little confused.

That is what I mean.
One "View" is one "Hit". (In Geman we call it Hit)

@hitmanuk2k
Sorry, i?m shure that is possible. But I don?t know how.

PcFreak

assassingod 05-15-2004 11:06 AM

Use this code to get commas in high numbers:
PHP Code:

$totalhits number_format($totalhits['hits']); 


insanctus 05-15-2004 11:27 AM

Quote:

Originally Posted by PcFreak
That is what I mean.
One "View" is one "Hit". (In Geman we call it Hit)

@hitmanuk2k
Sorry, i?m shure that is possible. But I don?t know how.

PcFreak

Then mine must be off :( 297930 I know been more then that lmao.

Boofo 05-15-2004 12:07 PM

Quote:

Originally Posted by assassingod
Use this code to get commas in high numbers:
PHP Code:

$totalhits number_format($totalhits['hits']); 


For vB3, that should be:

PHP Code:

$totalhits vb_number_format($totalhits['hits']); 

;)

BoNfiRe 05-15-2004 12:35 PM

clicks install thx for the hack, and thx for the mod Boofo

Synicide 05-15-2004 08:25 PM

this is awesome! thanks!

Ted S 05-15-2004 10:37 PM

Quote:

Originally Posted by Gio Takahashi
Just a question what you mean by HIt you mean Thread View count? I'm just a little confused.

Looking at the code the actual value isn't page views or server hits but rather thread views so requests to search pages, arcade pages, tell a friend, profiles, etc... won't impact this data.

jons5150 05-16-2004 03:58 AM

I used the Vb3 "comma code", but no commas? Any help Boofo???

Thanks...

Boofo 05-16-2004 07:14 AM

You need to add that code right under this line:

PHP Code:

$totalhits intval($totalhits['hits']); 


Synicide 05-16-2004 01:01 PM

Quote:

Originally Posted by Boofo
You need to add that code right under this line:

PHP Code:

$totalhits intval($totalhits['hits']); 


Actually Boofo, it didn't work for me unless I replaced your line with that line. Because I'm guessing those functions try to clash with each other to display the talley. Just my observation.

jons5150 05-16-2004 01:43 PM

Didn't work for me either boofo...made it worse. I think I'll just stick with no commas...

Thanks for trying....

Boofo 05-16-2004 04:07 PM

I've been all wrong on this guys. Dohh!!! Here is the code you need for the commas. ;)

PHP Code:

$totalhits vb_number_format($totalhits); 


jons5150 05-16-2004 04:49 PM

As a replacement or an addition???

Boofo 05-16-2004 10:23 PM

Quote:

Originally Posted by jons5150
As a replacement or an addition???

As an addition right below the other piece of code.

Synicide 05-17-2004 12:06 PM

Quote:

Originally Posted by Boofo
As an addition right below the other piece of code.

I replaced it and it worked fine for me too. o_O

ChuanSE 06-09-2004 01:06 AM

Doesn't seem to work for me :/

Kalipo 06-14-2004 10:33 PM

Thanks Boofo :) and addon makerer thingy guy (Y)

Installed :)

xscape2me 07-22-2004 03:56 PM

I'm getting an sql error.

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT COUNT(*) ,
SUM(views) AS hits
FROM 600rr_ thread
mysql error: Table database.600rr_' doesn't exist

mysql error number: 1146

Date: Thursday 22nd of July 2004 12:52:54 PM
Script: http://www.miami600rr.com/forums/?

royals 07-24-2004 06:12 AM

Quote:

Originally Posted by Boofo
I've been all wrong on this guys. Dohh!!! Here is the code you need for the commas. ;)

PHP Code:

$totalhits vb_number_format($totalhits); 



I get this on my page:

Total Hits: 250726 = vb_number_format(250726);



Otherwise this works like a charm - thanks!

royals 07-24-2004 06:16 AM

Nevermind!! I was adding in the template, not my index.php

Thanks Boofo - works!

royals 07-24-2004 06:24 AM

Qusetion - is this hits or visits? Daily? I have that many hits a day so I'm curious.

Thanks! (jeez I'm about to flood this thread)

Hotte@gun 08-10-2004 07:07 PM

Quote:

Originally Posted by xscape2me
I'm getting an sql error.

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT COUNT(*) ,
SUM(views) AS hits
FROM 600rr_ thread
mysql error: Table database.600rr_' doesn't exist

mysql error number: 1146

Date: Thursday 22nd of July 2004 12:52:54 PM
Script: http://www.miami600rr.com/forums/?

There is an whitespace which schouldnt be there use the following code
Code:

// ### Anzeige aller Hits START ###
$totalhits = $DB_site->query_first("
                SELECT COUNT(*) ,
                SUM(views) AS hits
                FROM " . TABLE_PREFIX . "thread
                        ");

        $totalhits = vb_number_format($totalhits['hits']);
// ### Anzeige aller Hits ENDE ###

This includes Numberformating an the wrong set space after FROM " . TABLE_PREFIX . "

italks 09-10-2004 11:48 AM

how the phrase is added.

_______________
Add a new phrase
_______________

totalhits = Totalhits

italks 09-10-2004 11:50 AM

lolz i got it done....i almost forgotten it before.thanks for the hack its great.

fiber1 09-11-2004 10:45 AM

Anyone know how to fix this to work in 3.0.3?

Hotte@gun 09-11-2004 01:49 PM

Quote:

Originally Posted by fiber1
Anyone know how to fix this to work in 3.0.3?

ehm... fix what ?

fiber1 09-12-2004 01:49 AM

Quote:

Originally Posted by Hotte@gun
ehm... fix what ?

I am not geting any hits showing up for this, and yes there are people hitting the board/threads/etc. Everything shows up except for the hit count.

txbigguy 09-14-2004 05:19 PM

I am getting the same thing.

Kyoshiro 01-06-2005 03:01 AM

well, i got the hit counts to show up, but apparently, it won't update. it just stays frozen as 58,199 hits. i tried refreshing my page, but nope, still 58,199 -_-

Erwin 01-06-2005 03:56 AM

From reading this thread and without looking at the code, I surmise that this totals up all the threadviews, not site hits.

As such, if you've set threadviews in your Admin CP to NOT update in real-time to conserve server load, this number will not update until your threadviews update.

This is just a guess anyway. :)

Jolten 01-06-2005 04:58 AM

From looking at the query it is indeed thread views not site hits, as Erwin posted.

passionboss 01-06-2005 10:50 PM

So is there any way to have the hits based on site hits since midnight on a daily basis???

No that would make this hake awsum :)

PcFreak 01-06-2005 11:52 PM

Quote:

Originally Posted by passionboss
So is there any way to have the hits based on site hits since midnight on a daily basis???

Good idea, but i think it?s not possible without changed the database.
This kind of mod needs special counter (more querys) and a new field in the thread tabel.
May a crownjob to deleted the old entries.
That would be my solution.

PcFreak

zendiz 01-16-2005 10:54 PM

I have 3.05 and it does give a db error. cannot find vb3_ jabbedabi
Allthough it seems a great hack I pass, I got my index page down 3 times, which is not good

EscortCossie 01-30-2005 01:26 PM

Quote:

Originally Posted by italks
how the phrase is added.

_______________
Add a new phrase
_______________


totalhits = Totalhits

I don't get this... how is the phrase added?

Sorry for my noob question.. :rolleyes:

EDIT: I found it.. sorry guys :o

jamesyfx 02-01-2005 11:13 PM

Worked great for me, although the number seems a little high.. nearly 2,000,000.


All times are GMT. The time now is 08:50 AM.

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.01403 seconds
  • Memory Usage 1,808KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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