Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Advanced Syntax Highlighting - BBCode [highlight] Details »»
Advanced Syntax Highlighting - BBCode [highlight]
Version: 1.00, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.0 RC1 Rating:
Released: 07-27-2005 Last Update: Never Installs: 143
Uses Plugins Template Edits
Additional Files Is in Beta Stage  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-28-2005, 04:15 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #3  
Old 07-28-2005, 05:40 PM
prawn prawn is offline
 
Join Date: Mar 2002
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great idea. thanks kirby

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

greets
Reply With Quote
  #4  
Old 07-28-2005, 05:51 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 07-28-2005, 05:58 PM
prawn prawn is offline
 
Join Date: Mar 2002
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah thank you. that's pretty easy. didn't really look into the geshi dir.
Reply With Quote
  #6  
Old 07-29-2005, 12:11 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 07-29-2005, 06:49 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like xml hightlighting gets broken.
Reply With Quote
  #8  
Old 07-29-2005, 07:41 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 07-29-2005, 08:00 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure thing.

Here you go.

Quote:
<?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;g roup=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 07-29-2005, 08:13 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the Output I get on my Board ...
Reply With Quote
Reply

Thread Tools

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


All times are GMT. The time now is 03:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04541 seconds
  • Memory Usage 2,288KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete