ScrewTurn Wiki 4 Releases and News
Screwturn Compatible Hosting – Click Here for 3 Months Free!
G+ Twitter          Search: »
Amanuens
ScrewTurn Wiki
Image
Image
Version1.1.0
Rating
DeveloperChristian Heger
UpdatedSeptember 30, 2010
HomepageYet another syntax highlighter
for ScrewTurn Wiki
Works withScrewTurn Wiki v3.0.x
LicenseLGPL v3

More about this Plugin

Formats source code in wiki articles in a nicer and more readable way: different syntactical elements like comments, keywords, and string laterals are colour-coded; alternating line backgrounds makes following long lines easier; line numbers are displayed. Supports 23 dfferent programming languages.

Usage: Use standard wiki markup for code blocks. Optionally, specify the language as the first word of the code block.

@@ csharp
// Comment
public string Greeting="Hi";
@@

The plugin offers configuration options for a default programming language, colour theme, and location of script files. It uses the client-side SyntaxHighlighter engine by Alex Gorbatchev; if you like it, please donate to him.



Discuss

Better documentationMon, 07 Feb 2011 04:37 by Forest Products Commission
Documentation for this plugin needs to be improved to assist those who are using it for the first time.

Would suggest including the following content:

Post-installation instructions

Due to the nature of the Screwturn plugin system, syntax highlighting for the various languages isn't packed within the plugin. The following post installation steps are necessary to ensure you receive maximum value from this plugin.

Script highlighting

Once you have installed and activated the plugin via the Administration panel, you will need Download the latest version of SyntaxHighlighter, and extract the zip file to a relevant location within your Screwturn installation. This will enable you to use the various script highlighting functions.

Provider configuration

Once you have downloaded and extracted SyntaxHighlighter to a directory within your Screwturn installation, you will then need to configure the provider to access the relevant path and highlight themes.

From the Administration screen, select Providers > Formatter Providers, then select GreenIcicle Syntax Highlighter. In the configuration dialogue that now appears, add the following;

ScriptUrl=/path/to/syntaxHighlighter/;
Theme=Default;
DefaultLang=html;

Your SyntaxHighlighter will now have full access to the various highlighting options for different languages.

Using

To wrap and display a block of code using SyntaxHighlighter, simply place two at (@@) symbols before and after the block of code.

@@
<html> <head> <title>Text</title> </head> <body> Text </body> </html>
@@

This will produce:
<html>
  <head>
  <title>Text</title>
  </head>
  <body>
  Text
  </body>
</html>

Language specific highlighting

The plugin also provides the ability to specify the enclosed language using a keyword, and an appropriate highlighting model will be applied to it.

For example; we will tell SyntaxHighlighter that the following block of code is HTML. This is done by placing the word html after the two @@ symbols.

@@ html
<html> <head> <title>Text</title> </head> <body> Text </body> </html>
@@

This will produce:

<html>
  <head>
  <title>Text</title>
  </head>
  <body>
  Text
  </body>
</html>

Available languages

The following languages specifiers can be used with the SyntaxHighlighter:

Langage Keyword
ActionScript3 as3, actionscript3
Bash/shell bash, shell
ColdFusion cf, coldfusion
C# c-sharp, csharp
C++ cpp, c
CSS css
Delphi delphi, pas, pascal
Diff diff, patch
Erlang erl, erlang
Groovy groovy
JavaScript js, jscript, javascript
Java java
JavaFX jfx, javafx
Perl perl, pl
PHP php
Plain Text plain, text
PowerShell ps, powershell
Python py, python
Ruby rails, ror, ruby
Scala scala
SQL sql
Visual Basic vb, vbnet
XML xml, xhtml, xslt, html, xhtml

  Name Size
- Plugin.png 8.28 KB

Side Projects

  • RESX Synchronizer allows to synchronize multi-language .resx files (used for the development of ScrewTurn Wiki).
  • Pixel Picker enables to pick the color of pixels on your screen — very handy for day-to-day graphics-related activities.

About

  • See our Privacy Policy.
  • Powered by ScrewTurn Wiki 3.0.5.613.
  • This namespace contains 45 pages.