What syntaxhighlighter do you use with buddypress 1.6.1 ?
I need a functionnally syntaxhighlighter.
I used syntaxhighlighter evolved in the past, but today with BP 1.6.1, the code is unreadable because of to many filter i guess.
SH 3.1.3 exemple here: http://bp-fr.net/groupes/comment-faire-pour/forum/topic/test-code-6/?#post-5445
If someone could point me to the right way, it would be nice.
Which editor do you use?
I use notepad++ in which you can over-ride the php highlighting with a user-defined one.
edit: sorry, I misread the op entirely.
I’m on a BP install and i want to use syntax highlighting in the forum post.
I already know and use Notepad++
And as explained previous i use syntaxhighlighter evolved witch output you can see if you go to link above.
@chouf1 I use Syntax HIghlighter Evolved as well and it’s working well in my BP 1.6.1 installation. I think it is a plugin conflict with other BuddyPress-component-dependent plugins which I see are in your installation but not in my install – e.g. the group documents plugin and the buddy-bbpress support topic plugin – which you should deactivate to see if issue is corrected.
Thank you @mercime, but i already tested your advice with only BP and SH activated. I also deactivated my functions.php and i have the same problem.
Can you give me a link to an example on your site, to see how it looks on your config.
Perhaps it has to do with some server config.
@chouf1 site is private, but I took a screenshot of the group forum topic I made for you as well as the screenshot of the config settings. I post code usually e.g.
[ sourcecode lang=”css” ] the code [ /sourcecode ]
or [ php ] the code [ /php ]
P.S. had to put the spacings between brackets or else it won’t show up here.
@mercime Thank you for the screenshots. But I still use the same settings and shorcodes.
I observe that your example is on a bbPress page. My forums are on BP integrated bbPress skills (default install).
In the past mounth with other html outputs on forum posts, i still observed that bbPress filters and BP filters conflict sometimes.
I tested also the plugin on another BP 1.6.1 site and got the same wrong output of HTML
Surprisingly, after inserting mixed code (html+php) with the plugin activated, all html is filterd and gives >, < and so on. After deactivating the plugin, the whole code shows correctly, without the plugin styles effect, but all is appearing and correctly.
As soon as i edit the post and register it again, all html is stripped and only the php parts remain.
So i guess that bbPress (as standalone plugin) filters HTML correctly before and after DB insertion, but not BP.
– I am using a child theme of bp-default theme, a port of apeatling’s design of BP 1.0 BuddyPress theme https://buddypress.trac.wordpress.org/browser/tags/1.0/bp-themes/bphome/screenshot.png
– Also that IS screenshot of the BuddyPress Group Forums new topic page. You can see the Group Name and Group Admins above the forum topic
But going back to the syntax highlighter, I do see the issue now if I post HTML/PHP code just like yours instead of CSS which I posted above and used lately. I was able to find a work-around by using `[ sourcecode lang=”title” ] the code [ /sourcecode ]` (just remove the spaces before ahd after the brackets) Result: https://mercime.files.wordpress.com/2012/08/bp161-shevolved-php.png
Some progress in debuging…
When i insert
[ sourcecode language=” php ” ][ /sourcecode ]
and open the post for editing, i get [ sourcecode language=”””” ][ /sourcecode ]
The word php disappeared and the place is double quoted !
Then i save these changes and the code cames up, but without colored synthax.
This is a first step on the right way. Colors are missing but code is showing correctly at 90%
Single quotes became curly for ex.
Probably backpress kses filtering.
I tried to deactivate BP’s filters bp_get_the_topic_post_content wptexturize and bp_get_the_topic_post_content bp_forums_filter_kses, but this changed nothing.
I posted on the support forum, but it seems still for a long time ago.
@mercime, it seems that the word «php» is censored somehow
Tag [ code language= ” php ” ] bla bla [ / code ]
Word php is stripped. In the DB i see this [ code language=” ” ” ” ]
@chouf1 thank you for following up with this.
The language «html» is not working for me now as well. I just checked an old post. And when I click on Edit Topic link, I get [ sourcecode language=””html”” ] … double quotation marks.
When i edit the post i have
@chouf1 will you do the honors of creating the ticket for this issue?
- The topic ‘What syntaxhighlighter do you use with buddypress 1.6.1 ?’ is closed to new replies.