BbPress Post Toolbar Wordpress Plugin - Rating, Reviews, Demo & Download

 Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

Post toolbar for bbPress 2.0.

  • Toolbar is automatically shown, though it can be set to manual insertion.
  • Enables embedding of images in a bbPress post (turn it on in the settings).
  • Users can upload images directly to the site (Valums’ Ajax Upload script)
  • Allows <span style=””> in a bbPress posts.
  • Embeds online videos from multiple providers (Dailymotion, LiveLeak, Megavideo, Metacafe, Vimeo, YouTube,) using http://…
  • Also provides a shortcode.
  • Embeds online pastebins from multiple providers (GitHub’s Gist, Pastebin.com) using [paste]http://…[/paste]
  • Toolbar items all pluggable, defaults can be turned off and replaced by custom ones.
  • Default item set is formatting, smilies, and videos.
  • Custom CSS styling of the bar.
  • Custom button ordering.

An example of the toolbar is on the forum on my website.

I would prefer it if support and feedback is placed on my forum because I’ll check my website more often than WordPress’ plugin forums.
I have a GitHub repository for this project here.
Bug reports, feature requests and other issues can be reported through the GitHub Issues system.
Any donations will be gratefully accepted. 😉

To Do

  • Go to sleep.
  • Clean some things.
  • Other things that I can’t figure out yet.
  • Relax and have a cup of hot chocolate.

Custom Buttons

The following is about standard push buttons, not panel opening buttons. To see how a panel opening button works just view the bbpress-post-toolbar.php source.

Adding custom buttons to the toolbar is done using by making a plugin and adding a filter to hook into the button.
My example below is how I added the Spoiler button to the toolbar, which is my modification of the Tiny Spoiler plugin.

Note: This isn’t my only modification to Tiny Spoiler. I had to also build a function to parse the [spoiler] shortcode inside a bbPress post.

function bbp_5o1_spoiler_add_to_toolbar($items) {
    $javascript = <<<JS
function(){ insert_shortcode('spoiler') }
JS;
    $items[] = array( 'action' => 'api_item',
        'inside_anchor' => '<img src="'. site_url() . '/wp-content/plugins/tiny-spoiler/spoiler_btn.png" title="Spoiler" alt="Spoiler" />',
        'data' => $javascript);
    return $items;
}
add_filter( 'bbp_5o1_toolbar_add_items' , 'bbp_5o1_spoiler_add_to_toolbar' );

Available JavaScript Functions

Really, just look inside toolbar.js

  • Insert an HTML tag: insert_data('tag')
  • (returns , potentially wrapped around text)
  • Insert a shortcode tag: insert_shortcode('tag')
  • (returns [tag][/tag], potentially wrapped around text)
  • Insert a smiley: insert_smiley(':)')
  • Insert a color: insert_color('red')
  • Insert a size: insert_size('5pt')
  • testText(tag_s, tag_e) can be used to try to wrap a start- and end-tag around selected text. If there is text selected then the tag will be applied at the end of the post content wrapped around a single space.

Available Action/Filter hookers

These are filters or actions that I have made to make buttons populate the bar:

  • apply_filters( ‘bbp_5o1_toolbar_add_items’, array() );
  • do_action( ‘bbp_5o1_toolbar_css’ );

Screenshots

  1. Code box showing an example of how to post the code box.

    Code box showing an example of how to post the code box.

  2. Online Video panel opened.

    Online Video panel opened.

  3. Toolbar options showing the Drag 'n Drop button ordering.

    Toolbar options showing the Drag ‘n Drop button ordering.


Reviews & Comments