Displaying bbClone Stats with Textpattern
Anyone who runs a website and uses bbClone or any other application that tracks the hits received on your site knows that watching the data roll in can be somewhat addictive. But for the most part, these statistics aren’t something that people make public. However, some of these stats can provide useful information to visitors of your site.
The rss_bbclone_popular plugin allows you to build lists of the most popular pages on your site according to hits recorded by bbClone. You have the ability to filter the pages displayed and to display the actual hit count along with the page names.
I’ve made a few modifications to the poe_bbclone plugin to allow me to label page hits by section. This allows me to use the plugin to display the “Most Popular Posts” lists thats found in the journal section and the “Most Popular Downloads” list thats found in the textpattern plugins section. The plugin can also attempt to lookup articles by title to build a permlink as shown in the “Most Popular Posts” listing.
rss_bbclone_popular plugin page
In order to add the section name to my page hits, I made these changes. First, I moved the global line up to the top and added the global section:
GLOBAL $sitename, $s;
Then I get the section name and make it look a little nicer if its the default.
$sect = ($s == "default") ? "wilshire | one Home" : $s;
Then I prepend the page title with the section name:
$bbcprefix = $sect.": ";
I also use the ob1_title plugin for my page titles although I don’t know that it matters. This is an example of what I get:
article: TXP Plugin | rss_suparchive
article: TXP Plugin | rss_thumbpop
Comments
Add a comment
You may use textile in your comment. Gravatars are enabled. Your email will not be displayed and will remain private. I reserve the right to edit or delete comments.
