Page visits

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
Post Reply
User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6429
Joined: 13 Jan 2014, 21:45

Page visits

Post by dmzx »

Extension Name: Page visits
Author: dmzx

Special thanks to: martin

Extension Description:
This extension adds page visits in footer.



Screenshot:
Image

Extension Download:
Download-link
Page visits v1.0.0
Installation:
  1. Download the latest release.
  2. Unzip the downloaded release, and change the name of the folder to `pagevisits`.
  3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
  4. Copy the `pagevisits` folder to `/ext/dmzx/` if done correctly, you'll have the main extension class at
    (your forum root)/ext/dmzx/pagevisits/composer.json
  5. Navigate in the ACP to `Customise -> Manage extensions`
  6. Look for `Page visits in footer` under the Disabled Extensions list, and click its `Enable` link.

User avatar

cov182004
Users
Users
Posts: 66
Joined: 06 Aug 2015, 20:19

Re: Page visits

Post by cov182004 »

works perfectly - thanks

User avatar

Anuj Dhawan
Users
Users
Posts: 109
Joined: 31 Aug 2015, 10:32

Re: Page visits

Post by Anuj Dhawan »

Thanks! You inspire me to learn more of php and phpBB, well done!

By the way with with we_universal, it aligns to left. Please see, www.zmainframes.com - I think because it's how we universal sets anything in the footer. If we need to make it center aligned just for we_universal, what is the way to do it? Please advise.

User avatar

Scanialady
Users
Users
Posts: 310
Joined: 06 Apr 2015, 18:04

Re: Page visits

Post by Scanialady »

A fine idea - very fine :)

I have installed this extension. Is it possible that counting does not work correctly if you change the style (Stylechanger, chatbox?)?
May be it counts more than one visit than (2-6). Or may be, my little site is overrunned and I don't know it... :rolling:
48 visits after 3 minutes... I can not believe :rolling:

Will check this with one of my test boards another day.

Thank you for this extension
-
If you want to get German translations for extensions: ask me.

User avatar

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12

Re: Page visits

Post by martin »

This detects the index so what ever hits the index also will show on other pages its not unique to all pages just the index.
Image

User avatar

Anuj Dhawan
Users
Users
Posts: 109
Joined: 31 Aug 2015, 10:32

Re: Page visits

Post by Anuj Dhawan »

martin wrote: 21 Jun 2016, 12:31 This detects the index so what ever hits the index also will show on other pages its not unique to all pages just the index.
So if add the "other page's count" as well, will not that be a true count of "visits"?

User avatar

Scanialady
Users
Users
Posts: 310
Joined: 06 Apr 2015, 18:04

Re: Page visits

Post by Scanialady »

martin wrote: 21 Jun 2016, 12:31 This detects the index so what ever hits the index also will show on other pages its not unique to all pages just the index.
and what do you think about chatbox - actualizes every 10 seconds?
-
If you want to get German translations for extensions: ask me.

User avatar

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12

Re: Page visits

Post by martin »

strange mine only goes up 1 number after a page refresh mchat has no effect on it.

Code: Select all

public function page_footer($event)
	{
		$pagevisits = (isset($this->config['pageviews'])) ? ($this->config['pageviews'] + 1) : 1;
		$this->config->set('pageviews', $pagevisits, 1);
		$pagevisits = number_format($pagevisits, 0, '.', ',');
		
		$this->template->assign_vars(array(
			'PAGEVISITS'		=> $pagevisits,
		));
	}
Image

User avatar

Scanialady
Users
Users
Posts: 310
Joined: 06 Apr 2015, 18:04

Re: Page visits

Post by Scanialady »

I don't use mChat, but JV Footerchat and JV Chat. 2-7 calls one refresh of index page counted :whistl:

From yesterday in the evening to now: 9565 visits...

That is not correct, never :rolling:

May be we need restrictions - one person/guest/bot = one visit for x hours/minutes
-
If you want to get German translations for extensions: ask me.

User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6429
Joined: 13 Jan 2014, 21:45

Re: Page visits

Post by dmzx »

:lol: will take a look at it.

User avatar

moose5
Users
Users
Posts: 17
Joined: 01 Mar 2016, 03:13

Re: Page visits

Post by moose5 »

Scanialady wrote: 21 Jun 2016, 16:19 I don't use mChat, but JV Footerchat and JV Chat. 2-7 calls one refresh of index page counted :whistl:

From yesterday in the evening to now: 9565 visits...

That is not correct, never :rolling:

May be we need restrictions - one person/guest/bot = one visit for x hours/minutes
Are you using tapatalk as well? Did 7 visits for every topic call I had on my forum.

User avatar

Scanialady
Users
Users
Posts: 310
Joined: 06 Apr 2015, 18:04

Re: Page visits

Post by Scanialady »

no, I never have used tapatalk.
-
If you want to get German translations for extensions: ask me.

User avatar

Anuj Dhawan
Users
Users
Posts: 109
Joined: 31 Aug 2015, 10:32

Re: Page visits

Post by Anuj Dhawan »

martin wrote: 21 Jun 2016, 14:03 strange mine only goes up 1 number after a page refresh mchat has no effect on it.
I also observe the same behavior as yours - a page refresh and count goes up by 1. I don't have mChat installed though.

As the "Windows Support representative" would say - close all the windows and restart... may be reinstall or Install on a test board without any other extension and observe the behavior.

User avatar

Scanialady
Users
Users
Posts: 310
Joined: 06 Apr 2015, 18:04

Re: Page visits

Post by Scanialady »

Anuj Dhawan wrote: 22 Jun 2016, 08:32 ... may be reinstall or Install on a test board without any other extension and observe the behavior.
to install it on a test board without other extension may give the expected behaviour (because there is nobody else, too), but it is useless for me. :lol:
-
If you want to get German translations for extensions: ask me.

User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6429
Joined: 13 Jan 2014, 21:45

Re: Page visits

Post by dmzx »

Scanialady wrote: 22 Jun 2016, 23:24
Anuj Dhawan wrote: 22 Jun 2016, 08:32 ... may be reinstall or Install on a test board without any other extension and observe the behavior.
to install it on a test board without other extension may give the expected behaviour (because there is nobody else, too), but it is useless for me. :lol:
Did a quick look but the JV Chat does a POST every few seconds that will trigger the count.
Will check for a fix.

Post Reply