PDA

View Full Version : Total Threads Hits At Forum Home


Omranic
11-14-2005, 10:00 PM
This product is no longer supported!



Total Threads Hits At Forum Home

This is a small lovely prodct that displays the total threads hits at forum home (see the attached screen shot)

Install instructions ::
Very Simple only import this product through your admincp [Add/Import Product]

There is one template modification
it is ::
go to ForumHome template & search inside it about the following code:
$vbphrase[members]: $numbermembers

then put after it directly the following code ::
<if condition="$vbulletin->options['threadstothits']">, $vbphrase[phpkd_total_hits]: $totalhits</if>



26/11/2005 This (https://vborg.vbsupport.ru/attachment.php?attachmentid=38329) Fixed
15/1/2006 Updated to version 1.0.1


Changes log:
1.0.0 ==> initial Release
1.0.1 ==>

adding admincp option for switching On/Off
Fixed This (https://vborg.vbsupport.ru/showpost.php?p=872942&postcount=26) ( get commas in high numbers )



Upgrading from version 1.0.0 to version 1.0.1:
go to template ForumHome & search for the following code:
,$vbphrase[phpkd_total_hits]: $totalhits

& replace It with the following code:
<if condition="$vbulletin->options['threadstothits']">, $vbphrase[phpkd_total_hits]: $totalhits</if>

Then import the attached product with Allow Overwrite set to yes


Thats all :)
hope You Like It :rolleyes:

Daniel
11-15-2005, 12:48 AM
Nice.

/me will check it out later

rb290
11-15-2005, 02:50 AM
thanks.
how come my Active Members doesnt show?

this is what the coding looks like:

<div>
$vbphrase[threads]: $totalthreads,
$vbphrase[posts]: $totalposts,
$vbphrase[members]: $numbermembers,
$vbphrase[phpkd_total_hits]: $totalhits
<if condition="$show['activemembers']">,
<span title="<phrase 1="$vboptions[activememberdays]">$vbphrase[within_the_last_x_days]</phrase>">$vbphrase[active_members]: $activemembers</span>
</if>
</div>

Omranic
11-15-2005, 10:14 AM
rb290
you must import the product first then make template modification & you must see it at your forum home

do this & tell me what happened with you

steadicamop
11-15-2005, 10:55 AM
Neat stuff, handy to know exactly how many hits there's been - thanks!

*clicks install

Snake
11-15-2005, 01:26 PM
Installed!

GamerJunk.net
11-16-2005, 03:11 AM
Wouldn't this become quite a large number after time?

Omranic
11-16-2005, 06:18 AM
Wouldn't this become quite a large number after time?

This Depends on your forums activity :)

rb290
11-24-2005, 05:44 AM
rb290
you must import the product first then make template modification & you must see it at your forum home

do this & tell me what happened with you

no i installed this hack perfectly but im saying you have Active Members next to the Total hits, i dont.

Snake
11-24-2005, 05:27 PM
Is it possible to edit the number of total hits? If so how?

Snake
11-24-2005, 05:42 PM
Also I get this error after the installation.

Database error in vBulletin 3.5.1:

Invalid SQL:

SELECT COUNT(*) ,
SUM(views) AS hits
FROM forum_ thread;

MySQL Error : Table 'amath_forum.forum_' doesn't exist
Error Number : 1146
Date : Thursday, November 24th 2005 @ 07:41:07 PM
Script : http://www.metalgearforum.net/index.php
Referrer : http://www.metalgearforum.net/index.php
IP Address : 193.188.105.22
Username : Aftermath
Classname : vb_database

Omranic
11-25-2005, 06:16 PM
rb290 ===> its depend on your vbulletin settings not on my hack

Aftermath ===> this error isn't related to my hack
it related to the existing of thread table or not ( if it exist no error occurs if not error appears) it doesn't need any data base modifications, it only make a very simple mathematical calculation

MioTraGusa
11-26-2005, 06:15 AM
Aftermath ===> this error isn't related to my hack
it related to the existing of thread table or not ( if it exist no error occurs if not error appears) it doesn't need any data base modifications, it only make a very simple mathematical calculation

Sorry but in the pluggin Thread's Total Hits at Forum Home :

// ### SolidSnake@GTI Total Hits Start ###
$totalhits = $vbulletin->db->query_first("
SELECT COUNT(*) ,
SUM(views) AS hits
FROM " . TABLE_PREFIX . " thread");

$totalhits = intval($totalhits['hits']);
// ### SolidSnake@GTI Total Hits End ###

bad construct with one space extra .. change for:

// ### SolidSnake@GTI Total Hits Start ###
$totalhits = $vbulletin->db->query_first("
SELECT COUNT(*) ,
SUM(views) AS hits
FROM " . TABLE_PREFIX . "thread");

$totalhits = intval($totalhits['hits']);
// ### SolidSnake@GTI Total Hits End ###

work fine this :up:

***Installed

Sorry for my english

Omranic
11-26-2005, 08:22 AM
bad construct with one space extra .. change for:


Sorry,
I can't notice that extra space you talk about
can you point it plz

MioTraGusa
11-26-2005, 10:58 AM
yes ..

Snake
11-26-2005, 12:04 PM
Oh he's right. Thanks for the fix.

Omranic
11-26-2005, 01:02 PM
Sorry,
you are right
Fixed ...........

but I say that this error doesn't appear @ all forums coz I installed this on many forums & no errors appeared inspite of presence of this extra space

any way now it is fixed

Snake
11-26-2005, 01:41 PM
Yeah thanks for that.

Solid Snake, ever thought of making a hack for Total Hits & Total Unique Hits? That would be cool, y'know.

funinthesun
11-26-2005, 02:55 PM
*Installed* Thanks :)

Omranic
11-27-2005, 10:01 AM
Yeah thanks for that.

Solid Snake, ever thought of making a hack for Total Hits & Total Unique Hits? That would be cool, y'know.

can you explain ...

Smiry Kin's
12-17-2005, 03:08 AM
Very nice work,

how about unique hits? is it possible mate?

BuRNZau
12-17-2005, 04:23 AM
Installed thanks.

Omranic
01-04-2006, 11:18 AM
Very nice work,

how about unique hits? is it possible mate?

Sorry what do you mean exactly?

Devil Woman
01-05-2006, 08:46 AM
Added and works a treat thanks

Omranic
01-13-2006, 12:07 PM
Added and works a treat thanks

U R W :)

calvinnguyen
01-14-2006, 05:46 AM
Thanks SolidSnake

by the way, if you want to get commas in high numbers:

open the file product-phpkd_total_hits.xml change:
$totalhits = intval($totalhits['hits']);

to

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

Omranic
01-15-2006, 07:38 AM
Updated to 1.0.1 See changes log

cam2 - old
08-15-2006, 11:09 AM
Installed, nice hack. A minor change I made in the display order on the forum home:

Find, don't forget to take out the comma at the end of $totalposts:
$vbphrase[posts]: $totalposts

Add directly after, add comma at the end of </if>:
<if condition="$vbulletin->options['threadstothits']">, $vbphrase[phpkd_total_hits]: $totalhits</if>,

Example text:

Threads: 69, Posts: 102, Total Threads Hits: 315, Members: 7, Active Members: 7
Welcome to our newest member, GreenMnM

cam2
02-08-2007, 07:07 PM
Is this for every page viewed or just the forum home?

MDK-Indy
08-11-2007, 11:14 AM
Works fine on vBulletin 3.6.7 PL1

greeting Indy