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: Apr 2016 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

Comments
  #2  
Old 28 Jul 2005, 17:15
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Real name: Chris Murphy, BSc
Warning: Unknown(/home/xxx/public_html/xxx/includes/geshi.php): failed to open stream: No such file or directory in /includes/class_bbcode.php(148) : eval()'d code on line 70

Fatal error: (null)(): Failed opening required '/home/xxx/public_html/xxx/includes/geshi.php' (include_path='.:/usr/local/lib/php') in /home/xxx/public_html/xxx/includes/class_bbcode.php(148) : eval()'d code on line 70
:ermm:

Edit: I re-uploaded geshi.php and it worked - Odd :speechless:

Satan
__________________
Chris Murphy, BSc .:. vBulletin.org Moderator
street-legal.biz - Best UK Car Club 2006!!

Please do not Private Message, Email or Instant Message me for Support with vBulletin or help with any Modifications to vBulletin - Doing so may result in angering my own personal Dragon bodyguard, Smokey...
Reply With Quote
  #3  
Old 28 Jul 2005, 18:40
prawn prawn is offline
 
Join Date: Mar 2002
great idea. thanks kirby

but html highlightning does not show up colored. what am i doing wrong?

greets
Reply With Quote
  #4  
Old 28 Jul 2005, 18:51
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
You must use the Names of the Files in Directory geshi, eg. for HTML you must use html4strict:

[hightlight=html4strict]
<!-- some HTML here -->
[/highlight]
Reply With Quote
  #5  
Old 28 Jul 2005, 18:58
prawn prawn is offline
 
Join Date: Mar 2002
ah thank you. that's pretty easy. didn't really look into the geshi dir.
Reply With Quote
  #6  
Old 29 Jul 2005, 01:11
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Is there a way we can make a bbcode replacement for like sql and xml tags? And is there any way to take the numbers out of the code on each line at the beginning?

Last edited by Boofo; 29 Jul 2005 at 07:36.
Reply With Quote
  #7  
Old 29 Jul 2005, 07:49
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
It looks like xml hightlighting gets broken.
Attached Images
File Type: gif Snap4.gif (20.9 KB, 913 views)
Reply With Quote
  #8  
Old 29 Jul 2005, 08:41
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Line Numbers -> Edit the Plugin (Hook bbcode_create) and comment out $geshi->enable_line_numbers

Furure Versions might include a setting for this.

As for the Screenshot: Can you post the Text which generated this output?

If you want to have [sql] and [xml] Tags, I guess you would have to create similar handlers that would then call handle_bbcode_highlight
Reply With Quote
  #9  
Old 29 Jul 2005, 09:00
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Sure thing.

Here you go.

<?xml version="1.0" encoding="ISO-8859-1"?>
<navgroups product="vbulletin">
<navgroup phrase="styles_and_templates" permissions="canadminstyles" displayorder="20">
<navoption displayorder="12">
<phrase>edit_templates</phrase>
<link>template.php?do=modify&amp;expandset=1</link>
</navoption>
<navoption displayorder="14">
<phrase>view_all_templates</phrase>
<link>template.php?do=modify&amp;expandset=1&amp;group=all</link>
</navoption>
<navoption displayorder="16">
<phrase>add_new_template</phrase>
<link>template.php?group=&amp;do=add&amp;dostyleid=all</link>
</navoption>
</navgroup>
<navgroup phrase="languages_and_phrases" permissions="canadminlanguages" displayorder="30">
<navoption displayorder="25">
<phrase>add_new_phrase</phrase>
<link>phrase.php?do=add</link>
</navoption>
</navgroup>
</navgroups>
This is something I did for my admin cpnav.
Reply With Quote
  #10  
Old 29 Jul 2005, 09:13
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
This is the Output I get on my Board ...
Attached Images
File Type: png xml.png (26.7 KB, 536 views)
Reply With Quote
  #11  
Old 29 Jul 2005, 09:50
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by KirbyDE
This is the Output I get on my Board ...
Ok, I see what is going on. In the file I have you are changing the &amp to &, because that's how it shows on my site. It shows the &amp in your pic. Am I close?

Because that's where it seems to break in my pic.
Reply With Quote
  #12  
Old 29 Jul 2005, 10:00
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
If I comment this line out in the plug-in, then it shows just like yours.

'&amp;', // &amp; to &
If I leave it in, then it shows like my pic.
Reply With Quote
  #13  
Old 29 Jul 2005, 10:08
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Hmm, I didn't change anything - I just copypasted your XML and seems to work fine for me.

So can you tell me exactly how to reproduce the Problem?
Reply With Quote
  #14  
Old 29 Jul 2005, 10:10
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Ok, I figured it out now. You're hack is smarter than I am (big surprise, I know).

I was using & instead of &amp; in my original code. It messes up with just &. I guess it was trying to teach me the proper xml way to do it. Any way to catch that for noobies?
Reply With Quote
  #15  
Old 29 Jul 2005, 10:13
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Well, just & is invalid XML
I guess GeSHIi doesn't like that too much.

I don't think there is any way to detect such things ...
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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 06:12.

Layout Options | Width: Wide Color: