Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Syntax Highlighting on Forums with Greasemonkey


Reply


1975 Views

Avatar
dalesaurus

Community Member, 283 Posts

6 November 2009 at 8:02am

Edited: 18/12/2009 9:17am

Not so much a question as a "not sure where else to put it". Do you want to read the forums with real syntax highlighting like so:

Attached you'll find a greasemonkey script that does a fairly decent job of adding some reasonable syntax highlighting on these forums to any of the code blocks.

You'll need Firefox and Greasemonkey:
http://www.getfirefox.com/
https://addons.mozilla.org/en-US/firefox/addon/748

Click to install the latest version: [url=http://www.silverstripe.org/assets/Uploads/silverstripeforumscode0.1.user.js]silverstripe_forums_code_0.1.user.js[/url]
Greasemonkey will install it magically. Sorry for the clutter but deleting attachments doesn't seem to be working at the moment.

Its no 100% effective, but it sure is easier on the eyes. Give it a shot and hit me up with any feedback. Unless your feedback is 'Dalesaurus, your write crappy javascript'...because I know that already :)

PS. The highlighter is google-code-prettify that I attached to a post so it links from the silverstripe.org assets folders: http://www.silverstripe.org/general-questions/show/272687