View Revisions: Issue #4992
[ Back to Issue ]
Summary | 0004992: Add Geshi-based syntax highlighting? | ||
---|---|---|---|
Revision | 2015-11-09 02:50 by gajop | ||
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 collapse 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. |
||
Revision | 2015-11-09 04:40 by gajop | ||
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. |