bsuite Bug Fixes (release b2v7)

[innerindex]Work on bsuite3 is progressing well, thanks to help from Zach and Matt, who are collaborating with me on completely rearchitecting how stats are collected and reported. This, however, is not bs3. It’s a transitional release intended to fix some bugs in b2 and make upgrading easier. This upgrade is recommended for all current bsuite users and new users.

bsuite Features

  • Tracks page loads (hits)
  • Tracks search terms used by visitors ariving at your site via search engines
  • Reports top-performing stories via a function that can be included in the sidebar
  • Reports recent comments via a function that can be included in the sidebar
  • Reports top search terms via a function that can be included in the sidebar
  • Outputs a pulse graph of activity on your site or specific stories
  • Lists related posts at the bottom of the current post’s content
  • Suggests posts that closely match the search criteria for visitors who arrive via search engines
  • Integrates bsuite_speedcache
  • Does some stuff with tags

Fixed/Changed/Added

  • As mentioned above, a huge-but-invisible feature here is that this version includes some pieces that will make it easy to transition to the new plugin.
  • MySQL errors while creating the tables should now be fixed. It’s my shame that these have persisted so long.
  • The plugin now “rebuilds the tags table” as soon as you activate it. This is a good thing, but if you’ve got a huge number of posts (or a really short max execution time) it might cause a problem (please leave a comment if it does).
  • The related posts feature now works even if you aren’t tagging your posts. If there are no tags, the post’s title is used as a search string.
  • This list is probably incomplete and in some other way inaccurate. It’s not intentional, I’m just sloppy. Please leave comments with bug reports or corrections, I’ll do what I can to fix them.
  • Finally, I’m now hosting the download on a new server, so it won’t be subject to .Mac’s bandwidth consumption limits.

Installation

  • Download and unzip bsuite.zip
  • Place bsuite.php in you wp-content/plugins directory
  • Place spacer.gif in your wp-content directory
  • Log in to your WordPress admin panel and activate the plugin, then visit the new bsuite submenu of the options tab. This will allow bsuite to create its database tables.
  • Stats collection will start automatically; you can see the results in the new bsuite Reports submenu of your Dashboard
  • Once installed, be sure to enable the options and consider customizing the look by adding the bsuite CSS to your theme’s CSS (sample CSS here).
  • In order to view the stats reports reports on your public pages, you’ll need to add the display functions to your pages.

Upgrading

  • Upgrades from earlier versions of bsuite are easy, just replace the old bsuite.php file with the new one.
  • Don’t forget to visit the bsuite submenu of the options tab so you can setup any new features.

Commands

The bsuite submenu of the options has a few command buttons:

  • Clear bsuite_speedcache

    The cache improves performance, but can sometimes get stale before its time. This command clears it.

  • Rebuild bsuite tag index

    bsuite maintains its tag index with every story edit. Use this command to bring old-content into the index or if you’ve edited the content in way WP doesn’t know about.

Options

The bstat submenu of the options tab has a few configurable settings:

  • Minimum userlevel to view bsuite reports

    The options are restricted to administrators, but you can choose who can view the reports.

  • Output default CSS

    Some of the bsuite functions require CSS styles not found in the average style sheet. This will output default styles.

  • Default pulse graph style

    This sets how values are interpolated in drawing the pulse graph. Experiment with the options to see how they work.

  • This will insert a block of links at the tail of each (tagged) post’s content with links to related posts at your site.

  • Tag input format

    Name your style: square brackets or angle brackets / <tags> or [tags].

  • Highlight search words and offer search help

    The first part of this should be obvious, but the real trick here is using those search words to offer other related content from your site to visitors. It works (and looks) a lot like the option above, but the suggestions only appear when search words are detected.

  • Filter incoming search terms using comment moderation and blacklist words

    Referrer spam is as much of a problem as trackback spam. There are a few tricks in bstat to prevent the problem, but here’s one you can configure. Selecting this option tells bstat to not display search terms that contain words in your moderation list or blacklist.

  • Ignore hits from registered users at or above userlevel

    No author wants to skew their stats just by poking around their own site.

  • Ignore hits from these IP numbers

    Sites with low traffic may find that activity by authors severely skews the stats tracking. Enter an IP address here to ignore it.

Tag Support

Until WordPress adopts a standardized way to manage tags, we’ll have to deal with things like this.

bsuite recognizes tags in three forms:

  • Any link with a rel=“tag” attribute
  • Any number of single tags like this: <tag>tag name</tag>
  • A block of comma-delimited tags like this: <tags>WordPress, WordPress Plugin</tags>

This appears to make it compatible with a number of existing tag management strategies now in use — including those used by Ecto and SimpleTags.

Tags are mapped to Technorati, but a future version will include an option to set other tag resolvers.

Using bsuite Functions

Function usage is unchanged from the last version. Among the things at the top of the list for bs3: widgets.

Known Bugs

None yet, but I’m sure I’m forgetting something. Report what you find in the comments below.

Money Grubbing

bsuite is GPL-licensed free software, but after some urging by friends, I’m opening the tip jar. If you use it and like it, let me know. And if you feel moved, leave a tip in the jar.

beta, blog pulse, bstat, bstats, bsuggestive, bsuite, bug, bug fix, bug fixes, bugs, fix, fixes, graph, plugin, pulse, recommendation system, recommendations, recommender, recommending, referrer, related content, search engine highlighting, search term, search term highlighting, sehl, stable, statistics, stats, stats tracking, tag, tag management, tag relationships, tags, usage, wordpress, wordpress plugin

50 thoughts on “bsuite Bug Fixes (release b2v7)

  1. Im trying to use bsuite b2v7 with 2.13 and I’m getting mysql errors about movers.

    CREATE TEMPORARY TABLE movers SELECT post_id, bstat_id, AVG(hits_reads) AS average, hits_reads AS today FROM wp_bstat_hits WHERE bstat_date >= DATE_SUB(CURDATE(),INTERVAL 30 DAY) GROUP BY post_id ORDER BY post_id ASC;

    UPDATE movers a, wp_bstat_hits b SET a.today = (b.hits_reads * (86400/TIME_TO_SEC(NOW()))), a.bstat_id = b.bstat_id WHERE a.post_id = b.post_id AND b.bstat_date = CURDATE();

    SELECT a.post_id AS post_id, CASE WHEN b.post_title IS NULL THEN ‘Anvil Tree’ ELSE LEFT(b.post_title, 60) END AS title, CONCAT(‘Avg: ‘,FORMAT(a.average, 0), ‘, Today: ‘, FORMAT(a.today, 0), ‘, Change: ‘, FORMAT(today – average, 0)) AS note, (today – average) AS sort_order FROM movers a LEFT JOIN wp_posts b ON (a.post_id = b.ID) ORDER BY sort_order DESC LIMIT 5

    [tags]This Line Left Intentionally Blank (or not)[/tags]

  2. @Geoff:

    Is the error something about “can’t create temporary table” ?

    It’s likely that the MySQL username doesn’t have permission to create temporary tables.

    strange behavior, temp tables

  3. I shipped off a new query to Casey that will eliminate the need for creating temp tables. If all goes well, he’ll update b2v7 for everyone soon :)

    *wink wink nudge nudge*

  4. @Matt

    Thank you. The new query (with a subquery inside a subquery) is in the code now. It’s version b2v7 Apr 17, downloadable at the main download URL above.

  5. I got the following unformatted text page after activating the plugin:

    ——————
    ../wp-admin/plugins.php?action=activate&plugin=bsuite.php&_wpnonce=[Number]

    Rebuilding bsuite tag index.

    Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in …/wp-content/plugins/bsuite.php on line 1173
    updated post 2
    updated post 3
    updated post 4
    updated post 5
    updated post 6
    updated post 7
    updated post 8
    updated post 9
    updated post 10
    updated post 11
    updated post 13

    bsuite tag index rebuilt.

    The bsuite plugin is now initialized. The bsuite tables have been created. If you choose to deactivate the plugin you must delete the bsuite tables manually.

    Warning: Cannot modify header information – headers already sent by (output started at ../wp-content/plugins/bsuite.php:1638) in ../wp-includes/pluggable.php on line 275
    ——————

    Hope that this is helpfull in some way.

    Thanks

  6. @Walter:

    The plugin is working, but it looks like I need to make it accommodate safe mode a little better.

    I’ll see what I can do for the next release.

  7. Is the plugin working if I got this text below right after plugin activation?

    Rebuilding bsuite tag index.
    updated post 2
    updated post 3
    updated post 5

    bsuite tag index rebuilt.

    The bsuite plugin is now initialized. The bsuite tables have been created. If you choose to deactivate the plugin you must delete the bsuite tables manually.

    Warning: Cannot modify header information – headers already sent by (output started at /home/bozgcom/public_html/wpsample/wp-content/plugins/bsuite.php:1638) in /home/bozgcom/public_html/wpsample/wp-includes/pluggable.php on line 275

  8. Nice plugin, took me ages to find one that did what I needed! However one small glitch. When I go to the reports page and set it to show X number of posts views etc. I now have this below the heading Top Stories

    Top Stories

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT a.post_id, a.bstat_id, a.average , (b.hits_reads *]
    SELECT a.*, CASE WHEN p.post_title IS NULL THEN ‘Stuff by Sarah’ ELSE LEFT(p.post_title, 60) END AS title, CONCAT(‘Avg: ‘,FORMAT(a.average, 0), ‘, Today: ‘, FORMAT(a.today, 0), ‘, Change: ‘, FORMAT( a.today – a.average, 0)) AS note, (a.today – a.average) AS sort_order FROM ( SELECT a.post_id, a.bstat_id, a.average , (b.hits_reads * (86400/TIME_TO_SEC(NOW()))) as today FROM wp_bstat_hits b,( SELECT post_id, bstat_id, AVG(hits_reads) AS average, hits_reads AS today FROM wp_bstat_hits WHERE bstat_date >= DATE_SUB(CURDATE(),INTERVAL 30 DAY) GROUP BY post_id ORDER BY post_id ASC ) a WHERE a.post_id = b.post_id AND b.bstat_date = CURDATE() ) a LEFT JOIN wp_posts p ON ( a.post_id = p.ID) ORDER BY sort_order DESC LIMIT 5

    Did I miss something out or is it just a glitch? The rest seems to work fine :)

  9. I was wondering why bsuites hits are more than sitemeter.

    It is showing that I get more hits with bsuite by almost 2:1.

    Which is more accurate? Im running sitemeter in a widget w/ java script.

  10. @Dave:

    JavaScript-based stats trackers only track hits from clients that execute the script, so web crawlers, text-only browsers, and the like don’t get counted. bsuite tracks every page served by WordPress, including those requested by web crawlers &c.

  11. using v2.7 in ‘Top Referrers’ section I get the following error:

    WordPress database error: [Illegal mix of collations for operation 'concat']
    SELECT a.ref AS url, LEFT(a.ref, 60) AS title, SUM(a.hits) AS sort_order, CASE WHEN b.post_title IS NULL THEN CONCAT(”, FORMAT(SUM(a.hits), 0), ‘ hits to JTPRATT’) ELSE CONCAT(”, FORMAT(SUM(a.hits), 0), ‘ hits to ‘, LEFT(b.post_title, 70)) END AS note, ‘Go To…’ AS tooltip FROM wp_bstat_refs a LEFT JOIN wp_posts b ON (a.post_id = b.ID) WHERE issearchengine = 0 AND bstat_date > ‘2007-05-30′ GROUP BY a.post_id, a.ref ORDER BY sort_order DESC LIMIT 15

  12. Pingback: 30+ WordPress Plugins for Statistics

  13. Pingback:   ?statistik için 30+ WordPress Plugin by # YaMTaR

  14. Pingback: Plugins de estadísticas para Wordpress » BlogMundi

  15. For those of you who were getting error messages like the following:

    Illegal mix of collations for operation ‘concat’

    Chances are you could be using MySQL 5 or something. I fixed it on my shared host by calling CAST on the output generated by the FORMAT command like so:

    CONCAT(”, CAST(FORMAT(SUM(a.hits), 0) AS BINARY) …

    Hope this helps some of you

  16. Pingback: WORDPRESS GOD:300+ Tools for Running Your WordPress Blog

  17. Pingback: All about Wordpress - Themes - Plugins » 30+ WordPress Plugins for Statistics

  18. Pingback: Kristjan in Tallinn™ » Blog Archive » Pluginad WordPressi statistika halduseks

  19. Casey, first of all thanks for updating my favorite WP plugin of all time. I am thinking about adding the tags for each post to my single.php page’s title tag. Is there a quick function that will allow me to do that in the page header? Thanks.

    Jason

  20. I am getting the same error in the bSuite Dashboard under the top stories section:

    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT a.post_id, a.bstat_id, a.average , (b.hits_reads *]

    Funny thing is that the top stories include is working fine on the public side. Running mysql 4.0.27

  21. Pingback: 300+ Popular Plugins for Running Your WordPress Blog

  22. Pingback: Wordpress god300 tools for running your wordpress blog by mashabale.com · Cyber Space in One Hand

  23. Pingback: » WordPress Plugin: piccola raccolta di plugin per le statistiche del vostro blog » FreeTemplate Blog

  24. I tried to update b2v6 to b2v7 on a WP2.2 Blog but its broken.

    in no longer giving any output. And the report page holds no data other than the pulse.

    My previous comment might not be as a result of WP2.3 upgrade then as i have been upgrading b2v6 to b2v7 at the same time.

  25. Got this error upon activating: ”
    Fatal error: Cannot redeclare bsuite_speedcache_fetch() (previously declared in /home/web/sites/big6/go/wp-content/plugins/bsuite.php:54) in /home/web/sites/big6/go/wp-content/plugins/bsuite.php on line 84″

    but I ignored it.

    The bsuite reports tab is present, and the plugin is reported to be active in the Plugins tab…

    How do I show the setup screen to look at the CSS? Where did the little ‘documentation’ window go?

  26. Pingback: » bSuite

  27. Pingback: ARHI » Blog Archive » Pluginuri de baza pentru un blogger

  28. Pingback: ???30??Wordpress????

  29. Pingback: dyohanan.com » Great Tools To Use With Your Wordpress Blog

  30. Pingback: ??? » Blog Archive » 30??WordPress????

  31. Pingback: Top 30 WordPress Plugins for Statistics | Top 100 Directory List

  32. Pingback: Oh God: more than 300 tools move to yours WORDPRESS | ??O-Town

  33. Pingback: one and more wordpress plugin and tools party on wordpress | ??O-Town

  34. Pingback: Wordpress????? | ???

  35. Pingback: Wordpress????? | ???

  36. Pingback: The Ultimate WordPress Plugin Library : Get More Reviews

  37. Pingback: New1’s trip » WP????(5)?Wordpress????

  38. Pingback: Los 30 mejores plugins de Wordpress para Estadisticas en tu Blog | Link Endeavour | Ideas de Marketing para tu Blog

  39. Pingback: WordPress Plugins For Site Monitoring | Real Geek

  40. Pingback: Wordpress Plugin For Blog Stat | PositiveBlog.info

  41. Pingback: 300+ Tools for Running Your Wordpress Blog « Castalie’s Blog

  42. Pingback: Plugins de estadísticas para Wordpress -- Mundo Inteligente

  43. Pingback: Ultimate List of Tools for Your WordPress Part 2 « Professional Free Wordpress Skins

Comments are closed.