|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004992||Site||forum||public||2015-11-09 02:50||2016-06-13 12:55|
|Priority||high||Severity||feature||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0004992: Add Geshi-based syntax highlighting?|
|Description||We could use syntax highlighting for the forums.|
It should support Lua and C++ at the minimum, and ideally Python, Java, Perl, C# and similar languages often used in the Spring community.
I did some research and found CodeBox Plus to provide satisfactory results. It has wide language support and seems to work fine. The phpbb extension can be found here: https://www.phpbb.com/customise/db/mod/codebox_plus/ with the Github repository available at https://github.com/o0johntam0o/phpBB-Extension-Codebox-Plus (the Github version should be used for 3.1.x support).
I've added two screenshots demonstrating its use (both as bbcode and output):
http://i.imgur.com/tOFTmrz.png , http://i.imgur.com/PslHjrD.png
I have 4 annoyances with the current version that I'm working on. I've solved one: the fact that code wouldn't expand by default, but I'm still working on the other 3:
- It supports too many languages that we don't need: https://github.com/o0johntam0o/phpBB-Extension-Codebox-Plus/blob/master/ext/o0johntam0o/codeboxplus/styles/subsilver2/template/event/posting_editor_buttons_after.html . It should be possible to comment out/remove them easily though.
- The bbcode uses codebox instead of code. This might be slightly more difficult to work around. It used to work with code but they changed it (probably as to not conflict with default phpbb or other mods? not sure, i'll inquire). I think it would be a bit confusing for the end user to both have the "Code" and "Select code" UI elements.
- The default codebox bbcode includes the option to specify file names for code snippets, which should be an optional feature. Less is more I think, but this isn't a huge deal.
|Tags||No tags attached.|
I've removed the obscure formats and created a better order for Spring:
The other formats should still work, but you'd have to know the format acronym and type it by hand (it's really unlikely anyone would ever use them so it's a fair trade-off imo)
|2015-11-09 02:50||gajop||New Issue|
|2015-11-09 04:40||gajop||Summary||Add Gehi-based syntax highlighting? => Add Geshi-based syntax highlighting?|
|2015-11-09 04:40||gajop||Description Updated||View Revisions|
|2015-11-10 06:15||gajop||Note Added: 0015327|
|2016-06-13 12:55||abma||Note Added: 0016431|
|2016-06-13 12:55||abma||Status||new => resolved|
|2016-06-13 12:55||abma||Resolution||open => fixed|
|2016-06-13 12:55||abma||Assigned To||=> abma|