The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Advanced Syntax Highlighting - BBCode [highlight] Details »» | |||||||||||||||||||||||||||
Advanced Syntax Highlighting - BBCode [highlight]
Developer Last Online: Jan 2023
Advanced Syntax Highlighting
This Hack provides a [highlight] BBCode to highlight a wide range of Languages such as XML, HTML, Java, Javascript, SQL and so on. It uses GeSHi, which is included in this ZIP. Details 1 Product XML with 2 Plugins and 2 Templates Please only click Install if you actually have installed/are using this Hack, and click Uninstall whan you don't use it any longer! Show Your Support
|
Comments |
#42
|
|||
|
|||
Ok, finally.. for anyone wanting tags like [sql]code[/sql] and [lua]code[/lua].. here's an example for Lua..
Code:
if (!function_exists('handle_bbcode_lua')) { function handle_bbcode_lua(&$parser, $code, $type) { return handle_bbcode_highlight( $parser, $code, 'lua' ); } } $this->tag_list['no_option']['lua'] = array( 'callback' => 'handle_external', 'strip_empty' => true, 'stop_parse' => true, 'disable_smilies' => true, 'disable_wordwrap' => true, 'strip_space_after' => 1, 'external_callback' => 'handle_bbcode_lua' ); |
#43
|
||||
|
||||
Have you any hint, where i can switch the width for bbcode code to 100%?
Thank you thomas |
#44
|
|||
|
|||
boofo - I was able to retain spacing by changing the code in class_bbcode.php in the includes folder:
// [HIGHLIGHT] $tag_list['no_option']['highlight'] = array( 'html' => '<span class="highlight">%1$s</span>', 'strip_empty' => false ); |
#45
|
|||
|
|||
Hi everyone,
Where would I add this code to enable only [as] functionality: Code:
if (!function_exists('handle_bbcode_as')) { function handle_bbcode_as(&$parser, $code, $type) { return handle_bbcode_highlight( $parser, $code, 'ActionScript' ); } } $this->tag_list['no_option']['ActionScript'] = array( 'callback' => 'handle_external', 'strip_empty' => true, 'stop_parse' => true, 'disable_smilies' => true, 'disable_wordwrap' => true, 'strip_space_after' => 1, 'external_callback' => 'handle_bbcode_as' ); EDIT: Nevermind - I fixed it. I had to add it to the XML file itself. Everything works now :surprised: |
#46
|
|||
|
|||
I swear, this will be my final question!
When pasting code that has been highlighted, the vertical line spacing is no longer retained in IE. All pasted code appears in one line, and for functions containing comments, it makes the code unusable unless line breaks are manually added. Is there a fix for that? There are examples of that problem here: http://www.kirupa.com/forum/showthread.php?p=1737670 It works well in FF though. EDIT: I was able to modify the bbcode_highlight template to the following to fix it - though spacing seems a bit off: [code]<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px">$type $vbphrase Code:
:</div> <div class="alt2" style="margin:0px; font-family:Courier New; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto"><div dir="ltr" style="text-align:left;">$code</div></pre> </div> |
#47
|
||||
|
||||
Hi,
seems are a little bit buggy on this: 1. Can you please change that the line number dont copied, when i copy the code. Is very strange, when you post code and the other must delete line numbers... 2. this["foo"] -> was converted to this["foo"] I like this and have installed, but i hope the buggy items are fixed soon. Thomas |
#48
|
|||
|
|||
In my previous post, I fixed the IE copy/paste issue by replacing the pre tag with a div. The problem is that the code now wraps. Does anybody have a way of fixing the IE copy/paste issue while retaining no-wrapping of code?
Thanks! Kirupa :squareeyed: |
#49
|
|||
|
|||
Thanks!
Is working now. |
#50
|
|||
|
|||
Works really great. Only thing is that I didn't manage to get a button to the editor. With usual vb-code this is no problem as the vb-code option allows to define a grafik. But how to do this for this hack? I searched in several forums and got no really heloing answer.
maybe here? thanks, marc |
#51
|
|||
|
|||
I cant figure out a little thing: A squared bracket open doesn't show up in the code. For example:
Code:
_root["ball"+i].x=100 _root& #91;"ball"+i].x=100 (without the space between & and #) Any help where to find the line I have to change? Checkes "actionscript.php" in the geshi folder, but with no success. Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|