Change in/out to Pageviews in Tab Rows

fmlynet

New Member
I am new here - just came over from Aardvark and apologize 1) for my lack of programming knowledge, and 2) if I have missed it if the answer is already here in these forums (been through them but the old answers I found from 2011 don't seem to work).

In the manual it says:
  • {$average} - Average in/out/pageviews daily/weekly/monthly
  • {$this_period} - In/out/pageviews today/this week/this month
How do you change the parameters as to what {$this_period} shows to make it show pageviews today and {$average} show average page views daily?

Hope it is simple and I am just missing something.

Love the software!
Bob
 

Basti

Administrator
Staff member
These tags are based of your ranking method + period, so change your ranking method to pageviews in admin settings. That would auto update these 2 tags.

If you not want that, so keep ranking method as hits in, then you can change {$this_period} to {$unq_pv_0_daily} ( note you loose your hits in today stats if you change the tag instead of adding a new tag for pageviews

As for average, there is no out of the box method, you need to create a simple plugin http://visiolist.com/community/threads/how-to-create-a-plugin.20/

As for the hook ( file ) you need, it is rankings_compile_stats.php with the following contents
Code:
        $TMPL['average_pv'] = 0;
        for ($i = 0; $i < 10; $i++) {
          $TMPL['average_pv'] = $TMPL['average_pv'] + $TMPL["unq_pv_{$i}_{$ranking_period}"];
        }
        $TMPL['average_pv'] = $TMPL['average_pv'] / 10;
Then you can use {$average_pv} in your template file
 

fmlynet

New Member
These tags are based of your ranking method + period, so change your ranking method to pageviews in admin settings. That would auto update these 2 tags.

If you not want that, so keep ranking method as hits in, then you can change {$this_period} to {$unq_pv_0_daily} ( note you loose your hits in today stats if you change the tag instead of adding a new tag for pageviews

As for average, there is no out of the box method, you need to create a simple plugin http://visiolist.com/community/threads/how-to-create-a-plugin.20/

As for the hook ( file ) you need, it is rankings_compile_stats.php with the following contents
Code:
        $TMPL['average_pv'] = 0;
        for ($i = 0; $i < 10; $i++) {
          $TMPL['average_pv'] = $TMPL['average_pv'] + $TMPL["unq_pv_{$i}_{$ranking_period}"];
        }
        $TMPL['average_pv'] = $TMPL['average_pv'] / 10;
Then you can use {$average_pv} in your template file
 

fmlynet

New Member
Okay - I have ranking method set to Pageviews, but the today field is all "0" s even though the averages have some different values. The rankings do seem to be changing. The old code on the websites from the Aardvark should still be working? I have not activated the API key (I don't really need or want the screen shots) does that make a difference?
 

fmlynet

New Member
I can move this to the post install help page if you like. Apparently the pageviews are not being counted. The error logs are showing the following php error:
[02-Jun-2018 15:47:19 UTC] PHP Notice: Undefined index: buttontype in /home1/topsites/family-topsites.com/button.php on line 147
 

fmlynet

New Member
I appear to be missing an index file for pageviews. If I change to In or Out the numbers show up. I get the index file error on numerous lines in the button.php file. Is there anyway to generate this index file?
I did get a warning when installing the script that the server did not support Fast-CGI, but it said it could cause problems when uploading files, did not indicate a problem with installation of script. My guess is the script never fully finished installing?
 

Basti

Administrator
Staff member
Please unzip the attached file and replace it on your ftp. This should fix all notice errors.

Been away from the script for a long time, so I not remember everything out of my head anymore, sorry for that.
There is another setting for pageviews.
If you look at admin setting -> button settings the line in that tab says 'Would you like to count pageviews on your members sites?', you need to check that also

Once saved, pageview counting will be enabled in the button.php file and your template tags should start to show some data once the members website get a new visitor.

This setting really should auto enable itself if you switch to pageview ranking method, noted that.
 

Attachments

Top