vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Total Threads Hits At Forum Home (https://vborg.vbsupport.ru/showthread.php?t=100829)

Omranic 11-14-2005 10:00 PM

Total Threads Hits At Forum Home
 
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:
HTML Code:

$vbphrase[members]: $numbermembers
then put after it directly the following code ::
HTML Code:

<if condition="$vbulletin->options['threadstothits']">, $vbphrase[phpkd_total_hits]: $totalhits</if>


26/11/2005 This 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 ( 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:
HTML Code:

,$vbphrase[phpkd_total_hits]: $totalhits
& replace It with the following code:
HTML 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:

PHP Code:

            <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

Quote:

Originally Posted by RasMasta
Wouldn't this become quite a large number after time?

This Depends on your forums activity :)

rb290 11-24-2005 05:44 AM

Quote:

Originally Posted by SolidSnake@GTI
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.

Quote:

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

Quote:

Originally Posted by SolidSnake@GTI
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 :

PHP Code:

// ### 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:

PHP Code:

// ### 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

Quote:

Originally Posted by MioTraGusa
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

Quote:

Originally Posted by Aftermath
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

Quote:

Originally Posted by Smiry Kin's
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

Quote:

Originally Posted by Devil Woman
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:
PHP Code:

$vbphrase[posts]: $totalposts 

Add directly after, add comma at the end of </if>:
PHP Code:

<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


All times are GMT. The time now is 10:05 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.01475 seconds
  • Memory Usage 1,796KB
  • 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
  • (4)bbcode_html_printable
  • (5)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)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