[ABD] TUT Forum Page Hits 0.1.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

[ABD] TUT Forum Page Hits 0.1.0

Post by TheUniqueTiger »

MOD Name : TUT Forum Page Hits
MOD Description : This MOD will keep track of the total forum page hits, as well as the individual pages data... (excluding the redirection and confirmation pages).
MOD Author : TheUniqueTiger
MOD Version : 0.1.0 (beta 1)
Compatible with : 3.0.0
Supported styles : Prosilver, Subsilver2

Features :
  • Keep track of the total page hits, as well as individual pages (excluding of course, the redirection and confirmation pages).
  • Keep track of the page hits by guests, members and bots.
  • Also keep track of daily page hits for individual pages.
  • Total page hits displayed in statistics on index page.
  • Detailed individual page hits viewable in ACP.
  • All the pagehits data for the current day is cached and written to the db only if date changes or if the cache was purged.
Additional notes:
***
You can add additional pages to be tracked too... For example if you install a MOD that adds a basic page to phpBB3 in the root folder, then you can add it to be tracked too... Just requires one line edit.
***
As phpBB3 doesn't have pagehits tracking by default, your pagehits before the date you install the MOD will all be zero... so be sure to change a variable...
***
For the above two edits, I can give you the edit in a subsequent post.
***
Don't worry about the number of update queries since it executes only two queries only on the first page after midnight... If the cache was purged, then a few more queries one-time.
***
The detailed pagehits in the ACP was a bit challenging... I'll welcome anyone to point out any improvements in terms of speed and memory efficiency in includes/acp/acp_pagehits.php file.
***
This MOD creates a db table to store all the data in addition to adding a config variable for total pagehits.

Screenshots:
1. Total page hits on index page
Image

Demo: Not required... Please look at the above screenshot.

MOD Download: Download link
(Please download this new file if you had downloaded 0.1.0 file before 30-Dec-07 0730 UTC.)

Awaiting your feedback about the MOD and suggestions for any more features... 8-)
Check back this topic for updates as the development continues...!
Last edited by TheUniqueTiger on Sun Dec 30, 2007 7:33 am, edited 4 times in total.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] TUT Forum Page Hits

Post by TheUniqueTiger »

Isn't anyone interested in this MOD? Doesn't anyone want to keep track of the page hits that your forum gets, that too categorised into guests and members and the various pages?
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [DEV] TUT Forum Page Hits

Post by RedTrinity »

I'm interested :D
User avatar
simple12
Registered User
Posts: 84
Joined: Fri Jun 01, 2007 7:39 am
Location: Varanasi, India

Re: [DEV] TUT Forum Page Hits

Post by simple12 »

Me interested too. Seems like another great mod is being prepared to launch.
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [DEV] TUT Forum Page Hits

Post by saaiberke »

Me too I'm interested :)

Nic
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] TUT Forum Page Hits

Post by TheUniqueTiger »

Just completed doing all the coding for general pages (ACP is modifications are yet to be coded)...

Some details about the working of this MOD...
There are 11 basic pages in phpBB3 like index.php, viewtopic.php ... etc... Each page will take 13 bytes per day for db storage... so thats max just 4433 bytes (4.4 KB) per month.

Everything in this MOD is cached... so you need not worry about the db queries...
When a day changes, like one accesses the first forum page after midnight or after purging cache, it will do two queries if cache was purged (to get existing data, and write the new values) or one query (for writing the values for the past day using multi-insert). If the forum has no visitors for an entire day, no data will be recorded for that day.

Later tomorrow or after that, I'll be working on the ACP module to show the page hits.

(Once this is completed, my next version of Statistics MOD will contain addon based on this too showing just the total pagehits and today's total pagehits on the basic stats page!)

@saaiberke, did you implement the FTRT MOD for each viewed page? How is it going? I hope its working fine.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [DEV] TUT Forum Page Hits

Post by saaiberke »

TheUniqueTiger wrote:@saaiberke, did you implement the FTRT MOD for each viewed page? How is it going? I hope its working fine.
Yes I tried but it gave me MSQL errors:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [1064]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
And when I am at the login page I see the word "cron" in the left bottom corner. So I reversed to the original file changes and it works, I can live with it the way it is now ;)

Grtz,

Nic
User avatar
simple12
Registered User
Posts: 84
Joined: Fri Jun 01, 2007 7:39 am
Location: Varanasi, India

Re: [DEV] TUT Forum Page Hits

Post by simple12 »

I have a feature request for this mod.

Overall hits to the forum can be shown on the index page and the hits number used should use beautiful gifs. And this should be configurable in ACP.

Thanks
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] TUT Forum Page Hits

Post by TheUniqueTiger »

simple12 wrote:I have a feature request for this mod.

Overall hits to the forum can be shown on the index page and the hits number used should use beautiful gifs. And this should be configurable in ACP.

Thanks
I couldn't understand... Please explain.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
simple12
Registered User
Posts: 84
Joined: Fri Jun 01, 2007 7:39 am
Location: Varanasi, India

Re: [DEV] TUT Forum Page Hits

Post by simple12 »

i want this on the index page.

Visitor Number: xxxxxx
Or
Page Hits: xxxxxx

These xxxxxx are the number of hits or unique visit to the forum.


For the latest post mod.
Please visit this url and fix a typo for the latest post.
http://www.phpbb-seo.com/boards/phpbb3- ... t1936.html
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] TUT Forum Page Hits

Post by TheUniqueTiger »

Yes I see, thanks for pointing out the typo.

This MOD doesn't store the number of visitors. It only keeps count of the pagehits to the various pages in phpBB3. Yes, it surely shows the total pagehits in the statistics section of the index page (like this...)

Code: Select all

Statistics
Total posts 40, Total topics 20, Total members 5, Our newest member ABC, Total page hits 12345
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
simple12
Registered User
Posts: 84
Joined: Fri Jun 01, 2007 7:39 am
Location: Varanasi, India

Re: [DEV] TUT Forum Page Hits

Post by simple12 »

Ok, It was a request to add this feature.

Is it possible to Get these no. In good gif images?
Total page hits 12345
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] TUT Forum Page Hits

Post by TheUniqueTiger »

simple12 wrote:Ok, It was a request to add this feature.

Is it possible to Get these no. In good gif images?
Total page hits 12345
Do you want gif images for the numbers? I won't agree for this since it wouldn't look uniform with the other stats (like total posts, total topics, total users etc) next to it.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [DEV] TUT Forum Page Hits

Post by TheUniqueTiger »

Well it was a real brain teaser coding the ACP module for showing the pagehits for various pages... (You'll know when you'll see the code for that page!)

The entire coding for the first version is complete... The 1st beta will be released on Sunday...

@simple12,
if you were asking for using gifs instead of numbers, then I disagree at this moment.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
simple12
Registered User
Posts: 84
Joined: Fri Jun 01, 2007 7:39 am
Location: Varanasi, India

Re: [DEV] TUT Forum Page Hits

Post by simple12 »

TheUniqueTiger wrote:@simple12,if you were asking for using gifs instead of numbers, then I disagree at this moment.
Well No problem. I can live without that images also. :)
Locked

Return to “[3.0.x] Abandoned MODs”