Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Quick Hack: Enable SyntaxHighlighter Evolved on Group Forums

I have markitup running in the textarea
http://etivite.com/groups/buddypress/forum/topic/quick-tip-adding-markitup-to-group-forum-textareas/#topic

Make sure you have 1.2.4.1 (due to this: https://trac.buddypress.org/ticket/2287)

A few things changed since my first post above, I don’t know if this will work but here is what I have in syntaxhighlighter code (v2.3.8)

add_filter( ‘bp_get_the_topic_post_content’, array(&$this, ‘parse_shortcodes’), 7 );
add_filter( ‘group_forum_post_text_before_save’, array(&$this, ‘encode_shortcode_contents_slashed’), 1 );
add_filter( ‘group_forum_topic_text_before_save’, array(&$this, ‘encode_shortcode_contents_slashed’), 1 );

add_filter( ‘bp_get_the_topic_text’, array(&$this, ‘decode_shortcode_contents’), 1 );
add_filter( ‘bp_get_the_topic_post_edit_text’, array(&$this, ‘decode_shortcode_contents’), 1 );

I have all the the_content, comment and widget hooks filtered out. (since i only care about syntax within the forums)

Which reminds me – I want to enable this on activity stream content as well. :P

Skip to toolbar