syntaxhighlighter icon indicating copy to clipboard operation
syntaxhighlighter copied to clipboard

BuddyPress / bbPress Support

Open Japh opened this issue 13 years ago • 6 comments

Hi Alex,

Would it be possible to please add support for BuddyPress and bbPress (default forums for BuddyPress)?

Forum discussions can often involve pasting code snippets, and being able to use SyntaxHighlighter Evolved makes sense.

Thanks!

Japh avatar Sep 12 '12 02:09 Japh

Support was added long, long ago. Are you sure it's not working? I haven't tested recently but it should work. The plugin uses the proper hooks, at least it did when the code was added.

Viper007Bond avatar Sep 12 '12 05:09 Viper007Bond

Hmmm... that's strange then. I tested using BuddyPress 1.6.1 with bbPress 2.1.2 on WordPress 3.4.2.

I used: [sourcecode language="php"] [/sourcecode]

And also: [php] [/php]

But the shortcodes just render to the page instead of doing what they're supposed to.

I know it's not that I'm using some sort of visual editor, because HTML tags work correctly.

Japh avatar Sep 12 '12 05:09 Japh

i have similar problem, in php the are rendered <?php ?>

Mte90 avatar Sep 26 '12 20:09 Mte90

Hi there, some days ago i have asked on Viper007Bond's blog a similar question. SyntaxHighlighter Evolved has some problems with forums on bbPress but, as I said some days ago, i have made a little change to the syntaxhighlighter.php file and now it works on bbPress too. If interested in these changes, please ask.

Now the problem we are experiencing at Geek Class (http://www.geekclass.it) is about symbols like " and < and > which are not correctly represented after publishing topics or replies (they are changed up with codes like &quote). The strange thing is that it runs perfectly on blogposts and comments, and with buddypress-docs too, but the symbols issue is still appearing on forums in bbPress and in Buddypress. Could it be, in some way, due to the different type of text editor used in these section?

ghost avatar Sep 26 '12 21:09 ghost

We have found a solution (on Geek Class) for the symbols issue in my last reply. Now we have another issue. Writing PHP code, like using [PHP]...[/PHP], and putting somewhere "$this" an error appear. Any ideas about that?

ghost avatar Oct 05 '12 20:10 ghost

It lacks bbPress support. I gave a pull request https://github.com/Viper007Bond/syntaxhighlighter/pull/11 that adds bbPress support nicely.

tareq1988 avatar Mar 27 '13 12:03 tareq1988