Page Hit Counter
Page Hit Counter 2.0
Version 2.0 - Ajax-based single page view
Description
A module that will create the necessary table in the database if it does not yet exist. If the table exists, it will display a list of pages and a count of their visits.The plugin simply puts the document ID and the counter into the table. If the document does not exist, it inserts the ID and the counter 1. If the document does already exist, it just updates the counter by adding 1 to the existing counter value.
Manager user visits will not be counted, nor will visits to any page where the Log Visits box has been cleared.
Instructions
Create a new Module, copy/paste the contents of the PageHitCounter.module.php file.Create a new Plugin, copy/paste the contents of the CountPageHit.plugin.php file. Set the System Event to onWebPagePrerender.
Upload the pagehitcounter folder with its getcount.php file into your assets/modules folder.
Previous Releases
Extras
View Page Hit Counter
This Adittion shows the user counted with Page Hit Counter.
Just add [[ViewCountPageHit]] to your page to show the counted users.
If you want to show the counts of a special ID (for example to use it with Ditto ...) Use this: [[ViewCountPageHit? &id=`[+id+]` &pre=`(` &past=` users have visited)`]]
Example:
(5 users have visited)
* FIXED - If you insert this to a document where no users are counted it will display "1".
If the ModX-Parameter "donthit" is set for this document it will show nothing...
Parameters:
&id = ID of the counted document (default: $modx->documentIdentifier)
&pre = Text before the Counter (default: "")
&past = Text after the counter (default: "")
Submitted: May 7th 2008 | License: Creative Commons | Downloads: 139