vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   HTML, not bbcode is displayed on edit (https://vborg.vbsupport.ru/showthread.php?t=216122)

flashfocus 06-14-2009 07:58 AM

HTML, not bbcode is displayed on edit
 
1 Attachment(s)
Hi,

I'm trying to implement this mod:
https://vborg.vbsupport.ru/showthrea...t=93071&page=4

I've added the following:
PHP Code:

if (!function_exists('handle_bbcode_xml'))
{
    function 
handle_bbcode_xml(&$parser$code$type)
    {
        return 
handle_bbcode_highlight$parser$code'XML' );
    }
}

$this->tag_list['no_option']['xml'] = array(
    
'callback' => 'handle_external',
    
'strip_empty' => true,
    
'stop_parse' => true,
    
'disable_smilies' => true,
    
'disable_wordwrap' => true,
    
'strip_space_after' => 1,
    
'external_callback' => 'handle_bbcode_xml'
); 

So now I would be able to highlight XML using [highlight=XML] and [XML]. These both work. However, when I edit or quote a post with highlighted syntax, only the [highlight=xml] gets turned back into bbcode. The [xml] tag just displays the HTML it generated.

When I look in my database, the bb-code is still there, so why am I seeing the generated html in stead of the bbcode ?

https://vborg.vbsupport.ru/attachmen...1&d=1244970036
All help is appreciated!! :)

Dismounted 06-14-2009 08:59 AM

Add this to a plugin at bbcode_start:
PHP Code:

$this->unparsed_tags[] = 'xml'


flashfocus 06-14-2009 09:47 AM

Alright, that seems to do the trick! I didn't knew I had to do this since the original product uses [highlight], which is already a standard bbcode tag and get's added to unparsed_tags that way, right ? :)

Thanks!

NLP-er 10-07-2009 10:42 PM

Quote:

Originally Posted by Dismounted (Post 1829441)
Add this to a plugin at bbcode_start:
PHP Code:

$this->unparsed_tags[] = 'xml'


I used this and in Fireofox and Opera it is ok, but in IE I have parsed BBCode... What to do?

Correction: only in Opera it works fine :(

NLP-er 10-10-2009 03:55 PM

Quote:

Originally Posted by NLP-er (Post 1896354)
I used this and in Fireofox and Opera it is ok, but in IE I have parsed BBCode... What to do?

Correction: only in Opera it works fine :(

Any hint what do do to assure that BBCode will never be parsed inside of editor? No matter which browser is used...


All times are GMT. The time now is 09:28 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.01985 seconds
  • Memory Usage 1,728KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete