vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advanced Syntax Highlighting - BBCode [highlight] (https://vborg.vbsupport.ru/showthread.php?t=93071)

zylstra 12-27-2006 05:38 PM

Quote:

Originally Posted by Wildthinks (Post 854765)
Have you any hint, where i can switch the width for bbcode code to 100%?
Thank you
thomas

Well, you can change it here, Styles & Templates -> Style Manager -> StyleVars -> Sizes and Dimensions -> Code Block Width, but IE will stretch the entire page to the dimension of the code.

delaen1 01-15-2007 04:42 PM

Anyone know if this still works with 3.6.4?

Gryphon 01-18-2007 09:34 PM

Yes

Smike 03-05-2007 11:22 AM

Thank you !
How can i add a button when i reply ?

Andrijeski 04-12-2007 01:18 PM

Works fine so far, thanks :)

Florian Bernd 05-17-2007 01:06 PM

Mhh .. look at my problem:

http://img248.imageshack.us/img248/940/syntaxev0.jpg

On the next edit the spaces got lost and some chars are maleformed .. =(

James Edwards 05-18-2007 07:37 AM

I can confirm that this works in 3.6.4; you can update the range of available languages by grabbing the latest version of "geshi.php" and the "geshi" directory from the developer's site -- http://qbnz.com/highlighter/

I fixed the square bracket issue (which also happens with percentage symbols) by adding the following line to the parse_code function in geshi.php (just before "// Initialise various stuff"):

PHP Code:

$code str_replace(array('['']''%'), array('['']''%'), $code); 

(Can't get the entitities to show up unparsed - the first array of replacements should be numeric entities 91, 93 and 37)

Florian Bernd 05-20-2007 10:48 AM

Thank you .. with this line it works fine for me .. but the bug with the tabs and spacings does already exists =/ After preview or on edit all spaces and tabs bevore the commands are missing .. Any ideas?

James Edwards 05-22-2007 12:11 AM

Not yet, I'm still trying to hack a solution for that!

James Edwards 05-25-2007 03:48 AM

Okay there's a few different things contributing to the whitespace/line-break formatting problems. I had to hack quite a bit to fix all this, so I've just uploaded my edited gehsi.php -- http://www.brothercake.com/clients/geshi.zip

All the changes I made begin with a comment that says "20070518 -- brothercake". Apart from fixing these issues, I've also removed the list markup (because line-numbers were being copied into the clipboard in some browsers), while retaining fancy lines (alternate line highlighting). And I've also stripped out some of the markup it generates - everything apart from what's actually needed!

To make these changes work I also had to comment out four lines from the product (the code inside the XML file):

PHP Code:

//################################################################
//20070518 -- brothercake mod commented these lines so we can control from geshi.php directly                
// $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
// $tabs = 4;
// $geshi->set_header_type(GESHI_HEADER_DIV);
// $geshi->set_tab_width($tabs);
//################################################################ 

Hope this is useful :) It's all pretty brutal, but it works!


All times are GMT. The time now is 08:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02370 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete