bbPress

Simple, fast, elegant

bbPress Plugin Browser »

Comment Quicktags for bbPress (1.1)

Download

Version: 1.1

Other Versions

Last Updated: 2007-1-9

Requires bbPress Version: 0.74 or higher

Compatible up to: 0.74

Author Homepage »

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(9)

Your Rating

Author: Stefano Aglietti


  1. JoergHH

    Member

    Aaah, now it works! - Thx for the tip, _ck_ !

    But the plugin author should edit the readme.txt urgently :-/

    Posted: 1 year ago #
  2. Thanks, I repleaced my-plugins to bb-plugins in the file, and it works like a charm! :-)

    Posted: 1 year ago #
  3. _ck_

    Moderator

    You should not put plugins into bb-plugins but into my-plugins.

    If you do not have a my-plugins directory, you need to make one.

    Posted: 1 year ago #
  4. FYI, works fine in 1.0alpha2

    I commented out the 'close all tags' button just cause I'm like that. Awesome code :) Just what I wanted!

    Posted: 1 year ago #
  5. Awesome. just awesome...i haven't any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.i found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me.Really the blogging is spreading its wings rapidly. Your write up is fine example of it.

    Posted: 10 months ago #
  6. Its not working in bbpress 1.0

    Please help me with the work around. I badly need this plugin in my forum..

    Posted: 8 months ago #
  7. Is it possible to add these buttons to the BBPM form as well?

    Posted: 5 months ago #
  8. bartekk

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    If you want to have this plugin working from a directory and with tips suggested by _ck_, here's what you need:

    • Create a folder quicktags-4-bbpress in your my-plugins dir.
    • Put comment_QT_4_bbpress.php and js_quicktags.js into your newly created folder quicktags-4-bbpress
    • Open comment_QT_4_bbpress.php in a text editor, wipe out everything between */ and ?>, and put there this little piece:
      function comment_quicktags($unused) {
      		if (bb_get_current_user() && (isset($_GET['new']) || in_array(bb_get_location(),array('topic-page','tag-page','forum-page')))) {
      			$scripturl =  bb_get_option ('uri') . 'my-plugins/quicktags-4-bbpress/js_quicktags.js';
      			echo '<script src="' . $scripturl . '" type="text/javascript"></script>' . "\n";
      			ob_start('comment_quicktags_ob');
      		}
      	}
      	function comment_quicktags_ob($content) {
      		$toolbar = '<script type="text/javascript">edToolbar();</script>';
      		$activate = '<script type="text/javascript">var edCanvas = document.getElementById(\'\\2\');</script>';
      		$content = preg_replace('/<textarea(.*?)id="([^"]*)"(.*?)>(.*?)<\/textarea>/s', $toolbar . '<textarea\\1id="\\2"\\3>\\4</textarea>'.$activate, $content, PREG_OFFSET_CAPTURE);
      		return $content;
      	}
      	add_action('bb_head', 'comment_quicktags');
    • Open js_quicktags.js in a text editor, and adjust tag names, sequence or labels (this may be especially handy if you want to put there something else than English names). Sample content of customized bold tag:
      edButtons.push(
      	new edButton(
      		'ed_bold'
      		,'Pogrubienie'
      		,'<strong>'
      		,'</strong>'
      		,'b'
      	)
      );

    Cheers,
    Bartek.

    Posted: 2 months ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.