bbPress Topic Thumbnails
Regular expression not working for GD bbPress Attachments with recent versions? (2 posts)

  1. petrockblog
    Posted 3 years ago #

    I tested this plugin for the site at http://blog.petrockblock.com/forums/forum/retropie-project-forum/splashscreens/. It seems as if this plugin does not show thumbnails for the recent versions of bbPress and GD bbPress Attachments. Could it be that the regular expression used by the plug-in does not match the one of bbPress Attachments?


  2. jeffacubed
    Posted 3 years ago #

    Hi petrockblog,

    If you ever happen to figure this out, in terms of making this 'topic Thumbnails' work w/ GD bbPress attachments I'd be curious to hear you solution. I keep meaning to dig into the 'topic thumbnails' code deeper, but from what I can decipher:

    /*Function that retrieves the first image associated with the topic*/
    function bee_catch_image() {
      global $post, $posts;
      $first_img = '';
      $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
      $first_img = $matches [1] [0];
      return $first_img;

    Topic Thumbnails looking for the first 'inline' image (which GD Attachments does not produce...) so the plugin fails to find an image. In bbPress 2.3, you can manually add an inline image (& the thumbnails plugin then picks it up) but the sol'n is kinda awkward to explain to bbPress forum users.

    If you have any suggestions/idea let me know, as otherwise this thumbnails plugin is rather slick for bbPress topics/forums/etc.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • bbPress Topic Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.