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

  #121  
Old 02 Jun 2010, 21:27
zeroality zeroality is offline
 
Join Date: Jul 2006
Installed artvs' modified product, as found here. Works great on vB4.0.3 and I'm not seeing any problems as reported in the later posts - and did not scroll down to see jarkkol's modification until it was too late.

Seems good to go, although I'm having trouble finding documentation on this. IE: what are the code tags for all languages? IE: Is ruby [code=ruby]? Is javascript [code=js] or [code=javascript]? Hopefully I'll find a list on the 6 middle pages of this thread.

Don't know why one of you don't post this as an official MOD for vb4... So useful!
Reply With Quote
  #122  
Old 03 Jun 2010, 22:56
mariohn mariohn is offline
 
Join Date: Mar 2005
Real name: Mario
I can not get this to work on vB4.0.3
Can someone post a step by step guide for 4.0.3 Please, I really need this mod to get my forums going.
Reply With Quote
  #123  
Old 04 Jun 2010, 20:44
digitalpoint's Avatar
digitalpoint digitalpoint is offline
 
Join Date: Mar 2004
Real name: Shawn
This is a really nice add-on. I used this as a basis for one I made for vB4... some changes I made (in case Andreas ever makes an "official" version for vB4):
  • Updated for vBulletin 4.
  • Instead of using [highlight], I decided to extend [code]. It uses it if you specify a parameter like so: [code=javascript]
  • I'm intercepting [html] and [php] BBCodes to use this automatically.
  • Reads all available languages (from the geshi language directory) so just having the file in the directory displays it as being available on the BBCode help page (see example).
Reply With Quote
  #124  
Old 14 Aug 2010, 17:28
petreza petreza is offline
 
Join Date: Aug 2010
Can anyone confirm that this Add-on works in vB 4.0.5?
I am a vBulletin newbee and if I break it I would not know how to fix it.
I see that it took some modification just to get it to work in 4.0.2 so I imagine it would take more for 4.0.5
Reply With Quote
  #125  
Old 23 Aug 2010, 19:32
lutek lutek is offline
 
Join Date: Jan 2002
Originally Posted by digitalpoint View Post
This is a really nice add-on. I used this as a basis for one I made for vB4... some changes I made (in case Andreas ever makes an "official" version for vB4):
  • Updated for vBulletin 4.
  • Instead of using [highlight], I decided to extend [code]. It uses it if you specify a parameter like so: [code=javascript]
  • I'm intercepting [html] and [php] BBCodes to use this automatically.
  • Reads all available languages (from the geshi language directory) so just having the file in the directory displays it as being available on the BBCode help page (see example).
could you attach your modification?
__________________
mariusz mielnik
flashZONE.pl
Reply With Quote
  #126  
Old 19 Sep 2010, 13:08
XLD_Bull XLD_Bull is offline
 
Join Date: Oct 2005
Hi all,

Really interesting but I have 2 big issues to use it definitely :

1 - It deletes spaces before the code
James had a solution but impossible to download it. :-(
http://www.vbulletin.org/forum/showp...6&postcount=80
Does someone else fixed it?

2 - It deletes carriage return when you copy the code and paste it in a editor.
The whole text is one line only.
If someone has also a solution for this.

I will adopt it if I correct it succesfully but I do not know how. :-(

Thanks in advance for your help.

David
Reply With Quote
  #127  
Old 09 Dec 2010, 13:31
AshMagic AshMagic is offline
 
Join Date: Nov 2008
Originally Posted by XLD_Bull View Post
Hi all,

Really interesting but I have 2 big issues to use it definitely :

1 - It deletes spaces before the code
James had a solution but impossible to download it. :-(
http://www.vbulletin.org/forum/showp...6&postcount=80
Does someone else fixed it?

2 - It deletes carriage return when you copy the code and paste it in a editor.
The whole text is one line only.
If someone has also a solution for this.

I will adopt it if I correct it succesfully but I do not know how. :-(

Thanks in advance for your help.

David
We have fixed this issue through trial and error. BIG pain in the a**.
Reply With Quote
  #128  
Old 09 Dec 2010, 14:48
AshMagic AshMagic is offline
 
Join Date: Nov 2008
Can confirm that:

http://www.vbulletin.org/forum/showp...&postcount=108

Works with 4.1.0.. Kind of!

There is an error when visiting the CMS though

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bbcode.php(194) : eval()'d code on line 11

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bbcode.php(194) : eval()'d code on line 11

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bbcode.php(194) : eval()'d code on line 11

Last edited by AshMagic; 09 Dec 2010 at 15:19.
Reply With Quote
  #129  
Old 09 Dec 2010, 22:03
AshMagic AshMagic is offline
 
Join Date: Nov 2008
Originally Posted by JarkkoL View Post
I made few changes to the product-advhighlight.xml file posted by artvs to make this mod work properly with vb4.0.2. I used latest GeSHi (1.0.8.6) with this mod:

- Added the is_array() check mentioned above.

- Changed the bbcode_highlight template to use "Maximum [CODE] Lines" defined in BB Code Settings. Previous version printed all the lines to the page regardless how long code you pasted within the code-tags, while this version limits the code window height and adds vertical scrollbar for code with more lines. It's doesn't limit the height exactly to the "Maximum [CODE] Lines" (I guess because of the different fonts used in the standard vB code tag and GeSHi), but is pretty close anyway (:

- Changed GeSHi to use GESHI_HEADER_PRE_VALID instead of GESHI_HEADER_DIV. This fixes word wrapping issue in the code window, i.e. previous version wrapped long code lines while this version adds horizontal scrollbar in that case.

- Fixed typos


Disclaimer: I'm newbie when it comes to php & vb modding, so use this version at your own discretion (:
Can confirm that this works great with 4.2 and has solved my issue. Thanks
Reply With Quote
  #130  
Old 26 Dec 2010, 12:00
erosolmi erosolmi is offline
 
Join Date: Jan 2010
Does someone has a working xml file to be used in 4.1?
Thanks a lot
Reply With Quote
  #131  
Old 06 Feb 2011, 12:41
Sadikb's Avatar
Sadikb Sadikb is offline
 
Join Date: Aug 2008
Real name: Sadik
I have attached my working copy on 4.0.6. May work on 4.1 also.

Edit: Just Tested and this works fine on VB 4.1.1
Attached Files
File Type: xml product-advhighlight.xml (6.0 KB, 96 views)
__________________
Owner: Oracle Forums - General Discussion Forums.

Last edited by Sadikb; 14 Feb 2011 at 08:33.
Reply With Quote
  #132  
Old 20 Jun 2011, 07:04
waldbauer.com waldbauer.com is offline
 
Join Date: Apr 2007
Real name: waldbauer.com
Hello !

I use this a while but now i have troubles with highlighting ASM code.
Instead [ i always get &#91 - can this be fixed by myself ?
Reply With Quote
  #133  
Old 15 Oct 2011, 13:32
enivid2008 enivid2008 is offline
 
Join Date: Dec 2008
If anyone else here isn't fond of the plugin removing all formatting spaces and tabs in the first line of the code, you can do the following change:

Find:


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

Replace with:


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

Reply With Quote
  #134  
Old 14 Jul 2013, 13:59
ellenthompson ellenthompson is offline
 
Join Date: Jun 2013
i upload gashi.php in /include directory

i also upload xml in product upload from admincp.

where i upload this :

"the geshi Directory (which includes all the Language Files) to Direcotry includes"

i also see this error


Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1419) : eval()'d code on line 125

please suggest me the solution
Reply With Quote
  #135  
Old 06 Jan 2014, 20:32
Gillysnyter Gillysnyter is offline
 
Join Date: Oct 2012
So I can post any code such as Java in the discussion and it will show up woth multple of colors like Notepad ++?
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 21:50.

Layout Options | Width: Wide Color: