bSuite 4

bSuite is a set of tools that help surface interesting and relevant posts, help your users navigate your content, and help authors develop and publish content. Take a look:

bSuite stats
cache-friendly stats
bSuite search word highlighting
search word highlighting
bSuite related posts
related posts
bSuite options
easy options



Hey! Here’s a cool thing: the list of pages and their contents up there is automatically generated using the shortcodes in this plugin.

License & Warranty

This software is provided as-is, with no warranty of any kind — use it at your own risk and don’t blame me if it makes your mother complain about your haircut — under the terms of the GNU Public License.

Language Translations


I’m certain there are bugs in here, please report what you find in the comments below.

122 thoughts on “bSuite 4

  1. Thanks for a marvellous suite. – Wasn’t there a way of adding excerpts (configurable number of words) to the related posts list items a few years ago? I can’t remember, but would surely like to have the excerpts…-) – Anyway, great job, Casey!

  2. Hi Casey,

    I have a follow up question above. Regarding the code snippet to include “popular posts” without using the widget, I am getting a small error. From time to time, I get a blank list item. I think it has to do with pages (such as archives or category pages), which don’t have a “title” descriptor. Is there an argument to exclude all pages (archive and category pages) and just include “posts” in the most popular post listing?

  3. Pingback: bSuite 4 nu på dansk — WordPress tips, tricks og plugins

  4. Hi,

    Thank you for a very fine suite of tools. I have localized it for the Danes. You are welcome to download the language files and include them in the distribution zip, if you like. Go to bSuite 4 nu på dansk and choose the link labelled Download.

    Corrections are welcome, of course!


  5. Hi, I’ve just tried installing this on a fresh installation of WordPress 2.7.1 but am getting the following error:
    Warning: array_slice() [function.array-slice]: The first argument should be an array in [removed]/wp-content/plugins/bsuite/bsuite.php on line 2007
    and I go to what should be the WordPress home page it takes me to the page for the first post. Any suggestions?
    Thanks in advance 😉

  6. I tried the plugin on my site as I was interested in the feed option to display a feed with in a post. After I installed the plugin, (downloaded 4.05 I believe) I was greeted with an upgrade notice in the plugins admin of my blog. I clicked the auto upgrade of the three plugins, and noticed the bstat upgrader wouldn’t update. I keep getting an upgrade notice but every time I click the upgrade it still shows as needing an upgrade. The current version is showing 4.04

    The bsuite tag importer won’t upgrade either. In fact when the plugin is activated and I click the upgrade link it deactivates the plugin. I then tried to upgrade before activating the plugin, then when it’s placed in active status it still shows as needing an upgrade, then the whole cycle starts again when I try to upgrade. The version is showing 4.04 with this plugin too. The only one that is 4.05 is the main bsuite plugin.

    I could have lived with that, however, the feed short code caused each feed item to duplicate, one with clickable link to the feed, and one that was not. and every post on the site had a Warning error regarding an array that it was expecting but couldn’t find.

    I had no choice but to deactivate all plugins.

    I’m running WP 2.7.1 on a new installation of WP – the site is less than a week old with only a few posts.

    … Scott

  7. Casey, I still love your bSuite plugin, but I’m running into three problems— only one of which is seems particularly important.

    I just upgraded and got this:
    Warning: array_slice() expects parameter 1 to be array, boolean given in …/bsuite.php on line 2007

    It only showed this in my top post, which seems like it could be weird. As a band-aid I’ve thrown an @ into line 2007

    $posts = @array_slice($this->bsuggestive_bypageviews_getposts( $id ), 0, 5);

    I’m also getting this error in the settings window:
    WordPress database error: [Duplicate key name ‘search’]
    ALTER TABLE taistel_bsuite4_search ADD FULLTEXT KEY search (content, title)

    Finally, bStat Upgrader and bSuite Tag Importer refuse to recognize that I’ve done the right thing and upgraded them. The plugins page still says they are at version 4.0.4 and that they can be upgraded.

  8. i have install 4.0.5 version and i have this following warning in Bstat Report page:

    “Warning: max() [function.max]: Array must contain atleast one element in …/wp-content/plugins/bsuite/ui_stats.php on line 141”

    • I too have theese PHP errors
      * Warning: min() [function.min]: Array must contain at least one element in /…/bsuite/ui_stats.php on line 141
      * Warning: max() [function.min]: Array must contain at least one element in /…/bsuite/ui_stats.php on line 141

      This is due to poor error handling, please fix it.

      In my installation i fixed it by inserting the following code at line 138:

      if (empty($pageloads)) { $pageloads = array(0); }

      …here is a diff, if it helps to locate the right line:

      $ svn diff ui_stats.php
      Index: ui_stats.php
      — ui_stats.php (Revision 84)
      +++ ui_stats.php (working copy)
      @@ -135,6 +135,8 @@
      GROUP BY hit_date DESC
      LIMIT 31
      ) a” );
      +if (empty($pageloads)) { $pageloads = array(0); }
      page loads in last month:

      BTW: [include post_id="145" field="post_content"] <- this is an awesome feature, it really made my day, thx a lot

  9. Pingback: » Slideshare WordPress Embed Shortcode

  10. hello Casey
    when i installed this plug in i had THE SAME problem as jon described so i supposed that must be because u used some theme as my default…
    i really love the suit so i guess there is something that colud be done to fix this! 🙂

    i wanted to ask also can u please tell what Table Of Contents plugin do you use on this very site? its remarkable! thx!

  11. Im also having this error.. how do i fix this?

    Warning: array_slice() expects parameter 1 to be array, boolean given in …/bsuite.php on line 2007

  12. Warning: array_slice() expects parameter 1 to be array, boolean given in …/public_html/wp-content/plugins/bsuite/bsuite.php on line 2007

    what with this error?

  13. Pingback: » Wufoo Forms WordPress Embed Shortcode

  14. well i keep having a dream that some ones drivi ng pass my house shooting at the house next to mine and they see me see them shoot and they start shooting at me and i just dont know what to do im scared to sleep in my room does this dream mens that it’s going to happen

  15. I got this error when I active it:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Call to a member function bstat_insert_term() on a non-object in /home/*******/public_html/wp-content/plugins/bsuite/importer_bstat.php on line 277

    Any one solve it why it happend?

  16. @Chris & @Host & others: The error about importer_bstat.php is because the bStat upgrader is being activated before bSuite. The newly release 4.0.6 version removes the upgrader, so this shouldn’t be a problem in the future (unless you’re trying to upgrade a bSuite 3.x install). Simply delete importer_bstat.php and importer_tags.php and try reactivating.

  17. I’ve fixed the situation that led to warnings about array_slice(). It was sloppy on my part, but you also may want to suppress warnings/error messages in your php install for security reasons.

  18. Hi Casey,

    Bsuite calls an older duplicate version of JQuery from the WordPress installation when I use your plug-in on my site (I already have the most recent version installed for other programs). Is there a way to cancel the JQuery loading option in the head (this should be an options item in the settings configuration)?

  19. I did a little bit of reading on this, but have not figured out how to do it (use “wp_print_scripts,” “custom_add_javascript,” and “wp_enqueue_script” features in the functions.php file). I simply included a call for the script in the head section of the theme: custom and the jquery library. Everything is working, but I think the files are getting a little confused when I switch back and forth between the dashboard and the site itself. Any suggestions would be appreciated.

    • @EL:

      I think you’re on the right track. It’s probably loading different versions of jQuery in dashboard and on the site itself, but that shouldn’t be problematic. Can you say more about what you mean by “the files are getting confused”?

      Your site looks great, btw. It doesn’t look like you have bSuite activated now, so I can’t see for myself the conflicts. I can point you to another theme that uses a lot of JS (and uses the WP functions to avoid conflicts): P2 . Take a look in the functions.php , specifically at these bits:

      if (!is_admin()) add_action( 'wp_print_scripts', 'prologue_javascript' );
      function prologue_javascript() { ...
      wp_enqueue_script( 'p2js', get_bloginfo('template_directory' ).'/inc/p2.js', array( 'jquery' ), '200903301' );

      If you use the wp_register_script() function to register your version of jQuery, it will replace the built-in version. Something like this:

      wp_register_script( 'jquery', get_bloginfo('template_directory' ).'/js/jquery-1.3.2.min.js', array(), '200904221' );

      Then, for completeness, you should register and enqueue the other scripts used in your theme:

      wp_register_script( 'theme_functions', get_bloginfo('template_directory' ).'/js/functions.js', array('jquery', 'theme_domtab'), '200904221' );
      wp_register_script( 'theme_domtab', get_bloginfo('template_directory' ).'/js/domtab.js', array('jquery'), '200904221' );
      wp_register_script( 'theme_featured', get_bloginfo('template_directory' ).'/js/featured.js', array('jquery', 'theme_scrollable', 'theme_functions'), '200904221' );
      wp_register_script( 'theme_scrollable', get_bloginfo('template_directory' ).'/js/scrollable-1.0.2.min.js', array('jquery'), '200904221' );
      wp_enqueue_script( 'theme_featured' );

      (my guess about the dependencies of each script are just guesses and used to illustrate how it works.)

      Once the JavaScript is being loaded via the WP functions, WordPress will automatically manage dependencies and eliminate redundancy. So if you have other plugins that call jQuery, they’ll all use the same jQuery that you registered.

  20. Thanks for the compliments, and for the valiant effort at getting the code right. I tried a few things out, and it broke my javascript. So for now, I think I’m going to leave things as they are. I have the code references in the section of the site, and this seems to be a one solution recommended in the WordPress codex. The documentation for wp_register_script, and wp_enqueue_script is minimal and almost non-existent. Someone needs to write some plain language description and upload it to the codex site.

    Regarding possible conflicts, I have “firebug” running in the background, and I think “it” gets confused, and slows down the site (giving me the appearance of a conflict … just things running really slowly). I never had a bug, although I find all the javascript in the WordPress administration pages to be slow, quirky, and a tad buggy. I read they are working on a major overhall of the “script-loader.php” core file for WordPress 2.8, so I think they know there are some inconsistencies with how this is done. Most people are just running a theme with minimal adjustments, but I’ve been adding and discovering some features that I like with javascript, particularly with the many scripts that run on the jquery library.

    Thanks for the help (as always).

  21. Just upgraded to bsuite v 4.0.6. Until today everything was ok. Now I’m getting a non fatal error:
    WordPress database error: [Duplicate key name ‘search’]
    ALTER TABLE wp_bsuite4_search ADD FULLTEXT KEY search (content, title)

    Any idea?

    • @Franz:
      It’s a bug in WP’s database table creation function, it doesn’t know how to handle fulltext indexes and so keeps trying to create them.

  22. Hi

    I’ve installed this on 4 of my sites and everything is great except the incoming search terms.

    On three of my sites bstat is not recognizing any search terms that are used to find the sites. It still indicates that no search terms have been used to find the site from any search engine even though I know that is not the case as I access the sites through search terms myself.

    Any idea what may be wrong?


  23. Really like this plug but is there anyway to exclude the related posts element from Pages? Love it on the Posts.

  24. How to show the related post just only the single post page, now it show on both home page (bottom of each post) and single post page?


  25. Hi, I just install bsuite and absolutely loving it. I wanted to ask if exact matching of incoming search queries is possible? Currently all phrases are matched and it makes landing page ugly.

    e.g. If search query is “restart x server on jaunty” then on the landing page plugin highlights all words containing x like extra, xmas, index etc. which shouldnt happen. Only word x should be highlighted. Can you please implement this idea?

    Thanks for making great plugin

  26. Hi,

    I added bsuite to my local installation of wordpress, and it works fine.

    When I have uploaded to my online webserver, it did run the stats until the 16th but after that it isn’t.

    It tried clicking the force migration button but still the same. While the one on my system works fine.

    Can you please let me know what might be possibly wrong.

    Also, I cannot see the bstat tables either online or offline generated in the database.

    Can you please let me know if i am missing something here.


  27. “Insert share links at bottom of posts” option is not visible in the admin area, and the template tag doesn’t seem to work! Running WP 2.8

  28. Bsuite and Scriblio are exactly what I’m looking for to catalog my US comic/DVD/CD collections, but I would like to use a larger image for the icon or an image that can be clicked on which then opens with lightbox. I forget which items I own when I go to the shops, so a full catalog with images and descriptions are useful for viewing on my phone.

    Where in the CSS or php is the image size handled? I’ve used firebug to debug the page, but I can’t find the relevant tags in the code.

    Apart from this little niggle, it’s a great plugin combination for wordpress 🙂

  29. Pingback: bSuite für WordPress

  30. Hi,
    I just activated this plugin and the page showed me:
    PHP Warning: shell_exec() []: Cannot execute using backquotes in Safe Mode in D:\webs\chi\news\wp-content\plugins\bsuite\bsuite.php on line 2208 PHP Warning: Invalid argument supplied for foreach() in D:\webs\chi\news\wp-content\plugins\bsuite\widgets\cms.php on line 203 PHP Warning: Invalid argument supplied for foreach() in D:\webs\chi\news\wp-content\plugins\bsuite\widgets\cms.php on line 217
    Can you tell me how can I correct this? Thanks!

  31. hello i’m using WP 2.7.1,
    when active Bsuite 4 in “Manage Plugins” area it shows :

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Class ‘WP_Widget’ not found in /home/xxxxx/public_html/wp-content/plugins/bsuite/widgets/cms.php on line 7

    please help ^^ thanks
    i cannot upgrade to wp 2.8.5 because some code only works on 2.7.1

    thnks 4 grat plugin

  32. watching bstat reports for the longest time suddenly it just stopped collecting data. 0 page loads shown and 0 visitors. Google is also embedded on the page revealing visits all day long but nothing in the bstat reports. Does anyone know what happened?

    • Two places to look: are you getting new hits in the “incoming” table? If so, then the cron may not be working. Otherwise, there’s a problem with the JavaScript collector.

  33. Pingback: Long Tail Keyword SEO and Use it on Wordpress

  34. If we want to change the number of related posts displayed from 5 to 3, do we edit the following numbers in the last two lines from 5 to 3 in the bsuite.php file:

    // bsuggestive related posts
    add_filter(‘save_post’, array(&$this, ‘bsuggestive_delete_cache’));
    if( get_option( ‘bsuite_insert_related’ )){
    add_filter(‘the_content’, array(&$this, ‘bsuggestive_bypageviews_the_content’), 5);
    add_filter(‘the_content’, array(&$this, ‘bsuggestive_the_content’), 5);


  35. Hi-
    thank you for creating this great plug-in.
    I only have one concern/question:
    can we stop the plug in from automatically adding an id to the heading tags?

    this creates invalid code so when I validate the html on pages, I have to turn the plug in off,
    and manually remove all the id’s, then validate etc. I would rather just have the headings be left alone.


  36. Anyone else having issues with bSuite and WP 2.9.2? If I activate bSuite, I can’t view my edit pages/post screens in the admin.

    • This is the new error I get when bSuite is activated: Notice: Trying to get property of non-object in /wp-includes/general-template.php on line 366

  37. The Post Loop feature also seems to be broken using WP 2.9.2 … (incomplete) error message here when attempting to use the Post Loop widget:

    Warning: Invalid argument supplied for foreach() in [serverpath] /public_html/wp-content/plugins/bsuite/widgets/cms.php on line 203

    Unsure as to the root cause of this, not a bsuite expert but I do like the plugin’s features. Seems a shame to have to disable it 🙁

  38. Hello, I’ve seen you create a bSuite Drop Folder Media Uploader plugin but I could not find any information of how it runs on your blog. Any detail ?

    • @Li-An: yeah, I just posted it, but haven’t had time to document it. Short story: you can specify a directory on your host filesystem to watch. When new files are dropped there they get inserted into the blog. If you put the pictures in a named folder, it will create a post with that name and gallery with those pics. If the folder name is numeric, it will add the pics to the post with that ID number.

Leave a Reply

Your email address will not be published. Required fields are marked *