2019-08-21 02:51 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004992Siteforumpublic2016-06-13 12:55
Reportergajop 
Assigned Toabma 
PriorityhighSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Versionspringrts.com 
Target VersionFixed in Version 
Summary0004992: Add Geshi-based syntax highlighting?
DescriptionWe 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.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0015327

gajop (developer)

I've removed the obscure formats and created a better order for Spring:
http://i.imgur.com/LtxG525.png
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)

~0016431

abma (administrator)

https://github.com/spring/spring-website/commit/792f6e22f17df51ac01c2ccde62e5b2c55d90e10
+Notes

-Issue History
Date Modified Username Field Change
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
+Issue History