Page 1 of 2

Total views of the site from day one

Posted: 09 Dec 2011, 23:09
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

Total views of the site from day one

Posted: 10 Dec 2011, 07:29
by Blackwolf
Yes....would be kinda cool ;)

Total views of the site from day one

Posted: 10 Dec 2011, 08:39
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?

Total views of the site from day one

Posted: 10 Dec 2011, 09:59
by Blackwolf
Sounds perfect.....hmmm.....I'd like page views.....but might not be what Caz wants. :|

Total views of the site from day one

Posted: 10 Dec 2011, 10:10
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.

Total views of the site from day one

Posted: 10 Dec 2011, 17:27
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

Total views of the site from day one

Posted: 10 Dec 2011, 17:57
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.

Total views of the site from day one

Posted: 10 Dec 2011, 18:12
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

Total views of the site from day one

Posted: 10 Dec 2011, 18:31
by Stoker
No, thats topic views. Not total pageviews.

Total views of the site from day one

Posted: 10 Dec 2011, 18:36
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