Total views of the site from day one

Download and support for PhpBB3 Statistics On Index
Caz
BBCoder II
BBCoder II
Posts: 20
Joined: 03 Dec 2011, 22:08
BBCodes: 20

Total views of the site from day one

Post by Caz »

Hi Stroker,
Is there anyway you can add total views of the site. I had it working without your mod, but your mod I like more than the stock. In three years we had well over one and three-quarters million hits. It was impressive. I know it counts bots also, but it's still a hit.
Thanks
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Total views of the site from day one

Post by Blackwolf »

Yes....would be kinda cool ;)
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Total views of the site from day one

Post by Stoker »

So it should be something like:

Total views 10085 • views per year 2810 • views per day 7.72 • views per topic 6.27 • views per member 3.27
?


EDIT: are we talking about topic views or page views?
Board rules! No PM support
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Total views of the site from day one

Post by Blackwolf »

Sounds perfect.....hmmm.....I'd like page views.....but might not be what Caz wants. :|
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Total views of the site from day one

Post by Stoker »

There is a mod for total page views by spyka.
But it will only start counting when you install it and there is NO WAY you can get page views before because they are not counted anywhere.
Board rules! No PM support
Caz
BBCoder II
BBCoder II
Posts: 20
Joined: 03 Dec 2011, 22:08
BBCodes: 20

Total views of the site from day one

Post by Caz »

Stoker wrote:There is a mod for total page views by spyka.
But it will only start counting when you install it and there is NO WAY you can get page views before because they are not counted anywhere.
Yes. That's the one and I know that it starts after the install, but forgot. I tried to work it with yours and couldn't figure it out. Like this:

Statistics

Total posts 3,600 • Posts per year 1,071 • Posts per day 2.94 • Posts per topic 3.89 • Posts per member 5.47
Total topics 925 • Topics per year 276 • Topics per day 0.76 • Topics per member 1.41
Total files 19 • Attachments per year 6 • Attachments per day 0.02 • Attachments per member 0.03
Total members 658 • Members per year 196 • Members per day 0.54 • Our newest member tisha
We have been online since 03 Aug 2008, 17:45:08 and Total views of entire site 2 Million
PhpBB version 3.0.9

(note: either full digit, or single digit with the place holder (ex) Meg...)

Hope that makes since.
Thanks
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Total views of the site from day one

Post by Stoker »

What is it exactly you cant figure out with spykas mod?
Its 2 file edits. 1 to the php and 1 to the template. Just insert the template edit where you want it.
Board rules! No PM support
Caz
BBCoder II
BBCoder II
Posts: 20
Joined: 03 Dec 2011, 22:08
BBCodes: 20

Total views of the site from day one

Post by Caz »

Maybe it's not spyka's Mod, but tihs is how I had it set up with 3.0.8.

Code: Select all

Well, I can't change anything about it. I'm using the total views of phpBB3's database. If they count Bots, that is phpBB3's problem, not mine. :P

Anyhow, I've already done that once before, although that was for phpBB 3.0.6. Anyhow, it should work with 3.0.7-PL1:




    Here you go:

    Open index.php
    Find:

    Code: Select all
        $total_users   = $config['num_users'];



    After add:

    Code: Select all
        // Get total topic views -- START
        $user->add_lang('mods/stats');
        $sql = 'SELECT SUM(topic_views) AS count
              FROM ' . TOPICS_TABLE . '
              WHERE topic_approved = 1';
        $result = $db->sql_query($sql);
        $total_views = (int) $db->sql_fetchfield('count');
        // Get total topic views -- END



    Find:

    Code: Select all
           'TOTAL_USERS'   => sprintf($user->lang[$l_total_user_s], $total_users),



    After add:

    Code: Select all
           'TOTAL_VIEWS'   => $user->lang['TOTAL_VIEWS'] . ' <strong>' . $total_views . '</strong>',



    Open styles/prosilver/template/index_body.html
    Find:

    Code: Select all
        &bull; {TOTAL_TOPICS}



    After add:

    Code: Select all
        &bull; {TOTAL_VIEWS}

I'll go check spyka's
Thanks
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Total views of the site from day one

Post by Stoker »

No, thats topic views. Not total pageviews.
Board rules! No PM support
Caz
BBCoder II
BBCoder II
Posts: 20
Joined: 03 Dec 2011, 22:08
BBCodes: 20

Total views of the site from day one

Post by Caz »

Stoker wrote:What is it exactly you cant figure out with spykas mod?
Its 2 file edits. 1 to the php and 1 to the template. Just insert the template edit where you want it.
Looking at spykas right now. I'll try to figure it out.
Thanks
Locked