The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
SyntaxHighlighter vB 4.X Details »» | |||||||||||||||||||||||||||
Demo:
http://users.on.net/~mjneish/syntax/test.html or http://alexgorbatchev.com/SyntaxHighlighter/about.html Download the latest version of SyntaxHighlighter attached to the topic. and upload the "scripts" and "styles" to your root folder in forum. Create a new BB Code like that: (AdminCP->Add New BB Code) Title: XCODE BB Code Tag Name: xcode Replacement: Code:
<script src="/scripts/shCore.js" type="text/javascript"></script> <script src="/scripts/shAutoloader.js" type="text/javascript"></script> <link type="text/css" rel="stylesheet" href="styles/shCoreDefault.css"/> <pre class="brush: {option}; toolbar: false;">{param}</pre> <script type="text/javascript"> function path() { var args = arguments, result = [] ; for(var i = 0; i < args.length; i++) result.push(args[i].replace('@', '/scripts/')); return result }; SyntaxHighlighter.autoloader.apply(null, path( 'applescript @shBrushAppleScript.js', 'actionscript3 as3 @shBrushAS3.js', 'ahk autohotkey @shBrushAhk.js', 'asm x86 @shBrushAsm.js', 'bash shell @shBrushBash.js', 'coldfusion cf @shBrushColdFusion.js', 'cpp c @shBrushCpp.js', 'c# c-sharp csharp @shBrushCSharp.js', 'css @shBrushCss.js', 'delphi pascal @shBrushDelphi.js', 'diff patch pas @shBrushDiff.js', 'erl erlang @shBrushErlang.js', 'groovy @shBrushGroovy.js', 'java @shBrushJava.js', 'jfx javafx @shBrushJavaFX.js', 'js jscript javascript @shBrushJScript.js', 'perl pl @shBrushPerl.js', 'php @shBrushPhp.js', 'text plain @shBrushPlain.js', 'py python @shBrushPython.js', 'ruby rails ror rb @shBrushRuby.js', 'sass scss @shBrushSass.js', 'scala @shBrushScala.js', 'sql @shBrushSql.js', 'vb vbnet @shBrushVb.js', 'xml xhtml xslt html @shBrushXml.js' )); SyntaxHighlighter.config.stripBrs = true; SyntaxHighlighter.all(); </script> Remove Tag If Empty: Yes Disable BB Code Within This BB Code: Yes Disable Smilies Within This BB Code: Yes Disable Word Wrapping Within This BB Code: Yes Disable Automatic Link Parsing Within This BB Code: Yes Supported language by default: ActionScript3 Bash/shell ColdFusion C# C++ CSS Delphi Diff Erlang Groovy JavaScript Java JavaFX Perl PHP Plain Text PowerShell Python Ruby Scala SQL Visual Basic XML AutoHotKey ASM You can add more unofficial languages if you want, doing that: - Download the language that you want from here: http://www.undermyhat.org/blog/2009/...taxhighligher/ - Upload the file to scripts folder - After this line in bbcode (the last one of the lsit) 'xml xhtml xslt html @shBrushXml.js' - Add: 'ALIASES_HERE @FileNameHere.js' Exemple, how to use: [xcode=js] CODE HERE [/xcode] [xcode=cpp] CODE HERE [/xcode] [xcode=xml] CODE HERE [/xcode] For the complete list of options: http://alexgorbatchev.com/SyntaxHigh...anual/brushes/ Download Now
Show Your Support
|
Comments |
#12
|
||||
|
||||
please upload a version with a max height
Quote:
|
#13
|
|||
|
|||
It already have the max height... the scrollbar removed is only a bug that happens with vbulletin, that i fixed.
|
#14
|
||||
|
||||
Excellent = 5 stars
insalled i'll try it on vb 4.1.0 |
#15
|
||||
|
||||
It gets very very laggy if you use it multiple times. I removed all languages expect of one
maybe it is better if it gets included one time only. maybe if i put it in header btw i fixed the scoll bar thing, i just added a max-height: in css |
#16
|
|||
|
|||
only get laggy if you load everything, the idea is use the loader....
and make separated category in your forum, to each language, to no one use more than one in the same topic... |
#17
|
||||
|
||||
I told you i removed all clanguages expect of one languages, because i only need one
the bbcode gets called 60 times in one thread. The thread is a summary of all functions i use in that language, so the file gets included 60 times in this thread and this totally slows down the whole browser while the site is getting loaded. And it takes about 20-30sec, and yes it is much data on one page. Yes i know i could split it up, but this isn't good atm is it possible to add that it only gets included one time and only if needed. Maybe you know what cause the long load time, by the numbers the .js gets included or by the numbers the script has to be its job`? i'll show you my bbcode Code:
<script src="http://www.piroxbots.com/forum/scripts/shCore.js" type="text/javascript"></script> <script src="http://www.piroxbots.com/forum/scripts/shAutoloader.js" type="text/javascript"></script> <link type="text/css" rel="stylesheet" href="http://www.piroxbots.com/forum/styles/shCoreDefault.css"/> <pre style="height: 132px;" class="brush: pt; toolbar: false; ">{param}</pre> <script type="text/javascript"> function path() { var args = arguments, result = [] ; for(var i = 0; i < args.length; i++) result.push(args[i].replace('@', 'http://www.piroxbots.com/forum/scripts/')); return result }; SyntaxHighlighter.autoloader.apply(null, path( 'pt @shBrushAhk.js' )); SyntaxHighlighter.config.stripBrs = true; SyntaxHighlighter.all(); </script> btw thank you very very much for this cool mod, thats what i really needed! |
#18
|
|||
|
|||
No idea... here it load in less than 1 secound....
But, if you will only use one of then, so use it instead: Code:
<script type="text/javascript" src="/scripts/shCore.js"></script> <script type="text/javascript" src="/scripts/shBrushAhk.js"></script> <pre style="height: 132px;" class="brush: pt; toolbar: false; ">{param}</pre> <script type="text/javascript"> SyntaxHighlighter.config.stripBrs = true; SyntaxHighlighter.all(); </script> |
#19
|
|||
|
|||
Thank you for the mod. My forum uses one language so I'd rather have an image on the toolbar above that places the code in using the xcode=vb syntax and also if they highlight code then press the button it would work like the # button.
Anyone know how to implement this so my xcode=vb works just like the # button? Thank you. |
#20
|
|||
|
|||
Anyone still modding this? It's not working.
|
#21
|
|||
|
|||
Has anyone managed to get this working in 4.2 recently?
Thanks |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|