Authentic Photoblog Flavour

RollNStats v1.0.1

Download (11.9 KB)

Developer Description

This admin addon tracks information about visitors to your site and how many times each image has been viewed. You can display view totals for each image using the <IMAGE_TOTAL_VIEWS> tag.

NOTE: Roll-N-Stats lets you import existing data from the Image Statistics addon. Both can co-exist with no problems while you evaluate Roll-N-Stats.

Detail Description

Roll-N-Stats Addon records the following information about each visit to the site when an image is viewed:

  • Date and Time of the visit.
  • Image that was viewed.
  • The user agent (software) used to view the image.
  • The IP address of the visitor.
  • The referring URL (if present).

Each visit to the site is stored in a table for 30 days. During this time you can view statistics about these visits from the Roll-N-Stats Admin menu (as detailed below). Any visits older then 30 days are remove from the logs. However, a running total of the visits is still maintained. Purging of old data is done automatically once a day with no maintenance required from the site administrator.

The following statistics can be viewed in the Roll-n-Stats page in the Admin panel:

  • Overview - Displays general information about the number of visits, views per visitors and percentage of bot/crawler visits, as well as a "views per day" table.
  • Images - Displays statistics about recent and most viewed images.
  • Visitors - Displays statistics about recent and most frequent visitors.
  • Referrers - Displays statistics about recent and most common referrals to the site.
  • User Agents - Displays statistics about recent and most common user agents used by visitors.
  • Search Terms - Displays recent search term referrals to the site.
  • Long Term Stats - Displays monthly visit totals prior to the last 30 days.

The tag <IMAGE_TOTAL_VIEWS> can be used to display the total view count for the current image. This tag is enabled by default. It can be disabled from the addon's configuration settings.

In the Roll-N-Stats Addon section you can configure certain aspects of the addon:

  • Set the number of items to display per page.
  • Set a bot/crawler keyword list used to filter out non-human visitors via the User Agent information.
  • Enable/disable the tag.
  • The option to force a purge of the logs. This forces removal of data that is older than 30 days.
  • The ability to remove all Roll-N-Stats data from the server and disable tracking. NOTE: All collected statistics to date will be lost when this action is performed.


Copy admin_rollnstats.php to the addon directory. Then go to the admin "Addons" page and turn on "Roll-N-Stats".

Now go to the the Roll-N-Stats entry in the Addons page and click the "Start Tracking Stats" button.

NOTE: You may have the option to read in stats from existing sources, such as the visitors table or the Image Statistics addon. If so then choose which one you wish to read from. The default is to start with no existing data.

If everything goes well you should be returned to the Roll-N-Stats addon page and get a message saying everything is set up to go.

Now Roll-N-Stats will record visits to the site which you can see displayed in the Roll-N-Stats Menu in the Admin panel. Note that the Roll-N-Stats menu is not visible from the Addon page.


Simply replace the old admin_rollnstats.php in the addon folder with the latest version.

Apologies for the sparse documentation. As time goes on I hope to provide better information.

Special Thanks to Karin for her inspirational Image Statistics Addon from which this one is based off.

Hope you find this addon useful,


Change Log

V1.0.1 - Minor Update - 09/3/10

  • Better pagination
  • Smarter culling of self referrals
  • Added missing default args

V1.0.0 - Stable - 09/2/26

  • New Overview layout and extended stats
  • Added view IP with Whois.
  • Fixed typos

V0.1.1 - Bug fix - 09/2/15

  • Renaming typo bug caused referer information to be lost.

V0.1.0 - Initial Release - 09/2/13

Older Versions

Write A Review

  1. Perfect 5
    Unknown 10 Years Ago Report as Spam

    thank you for this fine addon. after changing the dns lookup it works perfectly for my wishes :-)