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)

erosolmi 02-07-2010 07:26 PM

I'm interested too in using this mod for vB 4.x

as soon as I will be ready I will try to apply changes suggested by artvs here above.

Thanks

Sadikb 02-13-2010 04:25 PM

Confirmed working with VB 4.0.1 according to changes suggested by artvs. Thanks mate.

JarkkoL 03-03-2010 05:55 PM

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

lightbox 03-04-2010 01:32 PM

Quote:

Originally Posted by JarkkoL (Post 1996271)
Got warning with vb4.0.2:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bbcode.php(185) : eval()'d code on line 11

Same here *sigh*

JarkkoL 03-21-2010 08:58 AM

Does anyone have a patch for vb4.0.2 to fix the above problem?

Edit: Ok, I was able to fix it by adding the following two lines to the product-advhighlight.xml file in artvs attachment:
Code:

    if(!is_array($specialtemplates))
            $specialtemplates = array();

above this line:
Code:

$specialtemplates = array_merge($specialtemplates, array('bbcode_highlight','bbcode_highlight_printable'));

JarkkoL 03-21-2010 01:20 PM

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 (:

the_bolo 03-22-2010 09:36 AM

Having a problem with this mod on vb4.0.2 in that whenever I rebuild post cache, my [code] blocks in posts dont show up at all and I have to revisit each post/edit and save it again to ensure the code appears.

JarkkoL 03-22-2010 01:09 PM

Strange, I tried rebuilding the post cache but don't have the problem.

AshMagic 04-15-2010 11:52 AM

I have a problem. I am running 3.8.

It installs fine and works OK.. The syntax highlighting works but it replaces the [ and ] with HTML code. Eg, & #91; This is displayed as code rather than the actual symbol. Any ideas?

golsby 04-15-2010 06:37 PM

I hacked this for VB4 and my own personal preferences, then installed it. Works great!


All times are GMT. The time now is 08:57 PM.

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.01343 seconds
  • Memory Usage 1,733KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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