BitDesigns

Latest entries

:)
14 July 2008, 01:06 ·
Time for another change
2 December 2006, 04:22 · Design Personal
Javascript - Objects and Variable Scope
23 September 2006, 23:55 · Geek
Missed the Boat Again
12 September 2006, 02:33 · Design
My tribute to weekday afternoons in the mid-90s
1 September 2006, 17:29 · Geek WTF
A little fun with Friendster and CSS
21 August 2006, 01:59 · Geek Design
The experience of testing on IE
16 August 2006, 16:11 · Geek Design
TxP plugin: bit_counting_article
31 July 2006, 01:17 · Geek
Browse

RSS / Atom

TxP plugin: bit_counting_article

31 July 2006, 01:17 · Geek

(Another TxP plugin! Wee!)

While the jas_popular_articles plugin actually does the basic task of listing the most popular pages, it didn’t seem like the best solution. I looked through the plugin source and apparently, it uses the Textpattern visitor logs to count the visits. Unfortunately, these logs only record the requested URLs within the TxP site and not the actual content that visitors go to. I could enumerate several situations in which this would be less than ideal, but you’re probably smart enough to think of a few.

bit_counting_article uses a custom field to count the visits to the individual article, and provides a tag to replace <txp:article /> to do the hit count incrementing.

Also included is another tag to output an article list of the most (or least) visited articles. It’s built on the code of ort_article_psort by Lucas Gueñol.

For a detailed look at the plugin, visit the forum thread.

Download bit_counting_article.

Comments