Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Advanced Syntax Highlighting - BBCode [highlight] Details »
Advanced Syntax Highlighting - BBCode [highlight]
Mod Version: 1.00, by Andreas (Coder) Andreas is offline
Developer Last Online: Mar 2019 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.0 RC1 Rating: (10 votes - 4.50 average) Installs: 144
Released: 28 Jul 2005 Last Update: Never Downloads: 1241
Not Supported Uses Plugins Template Edits Additional Files Is in Beta Stage  

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!

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements Highlight BBCode Patria vBulletin 3.6 Add-ons 19 21 Jan 2010 23:39

  #31  
Old 04 Sep 2005, 20:54
digitalpoint's Avatar
digitalpoint digitalpoint is offline
 
Join Date: Mar 2004
Real name: Shawn
Is there a way to get it to not parse bbcode within the highlight tags?

For example, try this:

[highlight=php]<?php
echo '[b]test';
?>[/highlight]

It gives me:

echo '&#### start pluginlist ###;b&#### start pluginlist ###;test';
Also, really minor, but shouldn't this line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

be:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by digitalpoint; 04 Sep 2005 at 20:59.
Reply With Quote
  #32  
Old 04 Sep 2005, 23:52
digitalpoint's Avatar
digitalpoint digitalpoint is offline
 
Join Date: Mar 2004
Real name: Shawn
The comments being output looks like it was caused by a bug in RC2, which was fixed for the next release already, so I got that squared away. Very nice plug-in BTW... I changed it to be CODE instead of HIGHLIGHT (more natural to me) and I added a little extra to have it intercept the normal PHP and HTML tag calls.

Last edited by digitalpoint; 05 Sep 2005 at 01:59.
Reply With Quote
  #33  
Old 16 Oct 2005, 07:03
Jesse Stratford Jesse Stratford is offline
 
Join Date: Aug 2003
Hi Kirby,

This looks like an awesome plugin. I'm interested in knowing if it can be changed such that a tag like [as] automatically invokes this plugin using ActionScript as the type. I know I can use [highlight=ActionScript] but the problem is my board is 4 years old and already has a few hundred thousand posts which used the [as] syntax.

I've tried playing around with it but to no avail.

Primarily I changed:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But no dice.

Any help much appreciated.

Cheers

Jesse

Last edited by Jesse Stratford; 16 Oct 2005 at 07:06.
Reply With Quote
  #34  
Old 18 Oct 2005, 15:52
Alphawolf83's Avatar
Alphawolf83 Alphawolf83 is offline
 
Join Date: Mar 2005
Real name: Oliver
It does not work on v3.0.7, right?
Good Job!

Last edited by Alphawolf83; 18 Oct 2005 at 15:56.
Reply With Quote
  #35  
Old 02 Nov 2005, 22:38
marc_t marc_t is offline
 
Join Date: Mar 2002
Originally Posted by Jesse Stratford
Hi Kirby,

This looks like an awesome plugin. I'm interested in knowing if it can be changed such that a tag like [as] automatically invokes this plugin using ActionScript as the type. I know I can use [highlight=ActionScript] but the problem is my board is 4 years old and already has a few hundred thousand posts which used the [as] syntax.

I've tried playing around with it but to no avail.

Primarily I changed:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But no dice.

Any help much appreciated.

Cheers

Jesse
Any NEws on this. HAve the same problem.
Reply With Quote
  #36  
Old 04 Nov 2005, 10:58
Wildthinks's Avatar
Wildthinks Wildthinks is offline
 
Join Date: Apr 2002
Originally Posted by marc_t
Any NEws on this. HAve the same problem.
Yupp,
also interesting on a solution.
__________________
Flash templates with SWiSH - more - faster - better as flash... hope so :ninja:
Reply With Quote
  #37  
Old 04 Nov 2005, 11:51
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
If you just want [as] for ActionScript, then change it to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

as well as

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #38  
Old 05 Nov 2005, 00:03
Jesse Stratford Jesse Stratford is offline
 
Join Date: Aug 2003
Thanks Andreas. I figured that our just yesterday myself and it worked pretty well. The only problem I'm finding is that all NEW posts will highlight correctly but all the old posts which have [as]foobar[/as] just remain as plain text. What's with that? How can I fix it up?

Any help much appreciated.

Cheers

Jesse
Reply With Quote
  #39  
Old 05 Nov 2005, 05:05
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #40  
Old 05 Nov 2005, 14:55
Jesse Stratford Jesse Stratford is offline
 
Join Date: Aug 2003
Works great. Thanks!
Reply With Quote
  #41  
Old 13 Nov 2005, 11:48
garrynewman garrynewman is offline
 
Join Date: Mar 2005
Ok, finally.. for anyone wanting tags like
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and [lua]code[/lua].. here's an example for Lua..


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just add it near the bottom of the bbcode_create hook.
Reply With Quote
  #42  
Old 22 Dec 2005, 18:59
Wildthinks's Avatar
Wildthinks Wildthinks is offline
 
Join Date: Apr 2002
works fine...very good...

Have you any hint, where i can switch the width for bbcode code to 100%?
Thank you
thomas
__________________
Flash templates with SWiSH - more - faster - better as flash... hope so :ninja:
Reply With Quote
  #43  
Old 24 Dec 2005, 16:34
kirupa kirupa is offline
 
Join Date: Dec 2002
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
);
Reply With Quote
  #44  
Old 24 Dec 2005, 17:39
kirupa kirupa is offline
 
Join Date: Dec 2002
Hi everyone,
Where would I add this code to enable only [as] functionality:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I've looked everywhere, and I can't figure out where in vb 3.5.2 the above code would be included.

EDIT: Nevermind - I fixed it. I had to add it to the XML file itself. Everything works now

:surprised:

Last edited by kirupa; 24 Dec 2005 at 20:57.
Reply With Quote
  #45  
Old 24 Dec 2005, 21:32
kirupa kirupa is offline
 
Join Date: Dec 2002
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
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

:ermm:

Last edited by kirupa; 25 Dec 2005 at 22:50.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:59.

Layout Options | Width: Wide Color: