WordPress “SyntaxHighlighter” Plugin Additional Languages

While polishing my blog, I edited these scripts and made a simple plugin out of them for wordpress blog system. This plugin will register Processing, MEL, Maya API, Mathematica and RhinoScript languages with “SyntaxHighlighter Evolved” plugin by Viper007Bond

Download Here…

Installation Guide:
First, Install the SyntcaxHighlighter Plugin…
then, extract all files from the ZIP file, making sure to keep the file/folder structure intact, and then upload it to /wp-content/plugins/

Modify SyntaxHighlighter Theme:
Now, add these line to the end of shThemeDefault.css (if you use default theme) in SyntaxHighlighter/Styles folder…

.syntaxhighlighter .color4,
.syntaxhighlighter .color4 a
{
 color: #006699 !important;
}

.syntaxhighlighter .color5,
.syntaxhighlighter .color5 a
{
 color: #CC6600 !important;
}

.syntaxhighlighter .color6,
.syntaxhighlighter .color6 a
{
 color: #B40D0D !important;
 font-weight: bold !important;
}

.syntaxhighlighter .color7,
.syntaxhighlighter .color7 a
{
 color: #8F4CCB !important;
 font-weight: bold !important;
}

Plugin Activation:
Go to the admin area of your WordPress install and click on the “Plugins” menu. Click on “Activate” for the “SyntaxHighlighter Evolved: Additional Brushes” plugin.

Plugin Usage:
Just wrap your code in [language] your code [/language]

Samples RhinoScript:

Sub Main
	Dim doRender : doRender=1
	Dim num : num=100
	Dim pt, curve(100)

	Call rhino.enableRedraw(False)
	Rhino.Print "--------------------------"

	' delete any existing objects
	Dim oldScene:oldScene=Rhino.AllObjects()
	If isArray(oldScene) Then
		Rhino.DeleteObjects Rhino.AllObjects()
		Rhino.DeleteObjects Rhino.LightObjects()
	End If

	' Set up scene
	Dim light
	light=Rhino.AddPointLight (Array(0,-200,0))
	light=Rhino.AddPointLight (Array(-100,-100,0))

	Rhino.RenderColor 1, RGB(50,50,50)
	Rhino.RenderResolution Array(1200,900)
	Rhino.RenderAntialias 2

	' Create random curves
	Dim cp(3),mult, i
	For i=0 To num
		mult=random(0.75,1.25)
		cp(0)=Array(0,0,0)
		If Rnd>0.5 Then
			cp(1)=Array(0,random(30,50),0)
		Else
			cp(1)=Array(0,random(-30,20),0)
		End If
		If Rnd>0.5 Then
			cp(2)=Array(random(-50,50)*mult,random(30,50),random(-50,50)*mult)
		Else
			cp(2)=Array(random(-50,50)*mult,random(-30,20),random(-50,50)*mult)
		End If
		cp(3)=Array(random(-50,50)*mult,random(-50,50),random(-50,50)*mult)
		curve(i)=Rhino.AddCurve(cp)
		'		Rhino.AddSphere cp(2), dblRadius
	Next
End Sub

How to add a brush to SyntaxHighlighter Plugin Tutorial

Discuss - No Comments

No comments yet. Why not add one below?

Add a Comment

Your email address will not be published. Note marked required (*) fields.

*