SupportArea

BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing makes it ideal for creating complex, interactive, web applications fast...


PLUGINS

SKINS

LANGUAGES

Page Counter

Extensions > Plugins > Page Counter

Using BoltWire's built in info function, you can create a handy page counter function quite easily. Just put in your skin, footer or some zone:


Page viewed [(info counter field={p} page=info.pagecount)] times...

It stores all your data in one page: info.pagecount, using the page name as a key, and the "counter" info command simply increments that info value by one each time the page is viewed. This gives you a lot of real nice capabilities.

For example:

{info.pagecount::{p}}
Gives current page count. Change {p} to view count of another page...
[(info count group=forum* page=info.pagecount)]
Give total number of pages viewed in forum group
[(info sum page=info.pagecount count=20)]
Combined page views of 20 most popular pages.
[(search query=info.pagecount sort={+value} fmt=title order=reverse count=20)]
A report of 20 most popular pages


You can also create counters for specific groups of pages. Suppose you have a blog and only want to track how many page views those pages get. Simply add the following to the footer of your blog group:


<(info counter page=blog.counter field={p} output=false)>

This will create a blog.counter page with a count for how many times each page is viewed. The output=false, means the current count will not be displayed on the page, allowing the function to keep track of page views invisibly, to be displayed elsewhere--perhaps in a blog admin page.