vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Validate matching quote BBCode tags. (https://vborg.vbsupport.ru/showthread.php?t=213719)

raywjohnson 12-05-2011 01:22 AM

Quote:

Originally Posted by xorex (Post 2274515)
will be good if mod would have setting for exclude validate quotes inside tags

example: [code] [html] [php] e.t.c

I tested some code changes that would allow for this. It will work, but you will introduce a huge problem that this product was designed to defeat. Wild looking posts. Here is an example:

--------START

THIS:

[QUOTE ]Test[QUOTE ]Nest #1[QUOTE ]Nest #2[QUOTE ]Nest #3[/QUOTE ]
[QUOTE ]in No Parse[/QUOTE ]
[code ][QUOTE]in Code [/code ]
[php ][QUOTE]in PHP[/php ]
[/QUOTE ][/QUOTE ][/QUOTE ]

RENDERS AS THIS:

[QUOTE]Test[QUOTE]Nest #1
Quote:

Nest #2
Quote:

Nest #3
[QUOTE]in No Parse[/QUOTE]
Code:


       
Quote:

       
       
               
       
       

                       

                       
                                in Code
                       
                       

               


PHP Code:

[QUOTE]in PHP<div style="margin:20px; margin-top:5px; ">
    <
div class="smallfont" style="margin-bottom:2px">Quote:</div>
    <
table cellpadding="6" cellspacing="0" border="0" width="100%">
    <
tr>
        <
td class="alt2">
            <
hr />
            
                
            
            <
hr />
        </
td>
    </
tr>
    </
table>
</
div

Quote:



[/QUOTE]

--------END

What is going wrong here? This product would tell you that the issue was mismatched quote tags. If you set it up to NOT detect this within PHP and CODE tags, then you might as well not use it at all.

--RayJ

Max Taxable 12-05-2011 01:37 AM

Installed, tested, works like a charm. Great Mod, thanks!

ravenscape 12-05-2011 01:58 AM

It looked the same, except for a comment. I replaced the code and saved the file anyway in case I missed something.

On testing, it still doesn't work.

Quote:

No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

raywjohnson 12-05-2011 03:05 AM

Quote:

Originally Posted by ravenscape (Post 2274759)
It looked the same, except for a comment. I replaced the code and saved the file anyway in case I missed something.

On testing, it still doesn't work.

Oops! I just gave you the Parse function, here is the entire code (with remarks):

PHP Code:

/**
* Quotes Validation Class
*
* @product    vqbc_rayj2009
*
*/
class vqbc_VerifyQuotes {

  
/**
  * Parses the post message.
  *
  * @param  string  text to be validated for matching quote tags
  */
  
public function Parse($text) { //returns TRUE if bad quote found

    
$text preg_replace('#\[quote.*?\]#i','[quote]',$text);
    
$text preg_replace('#\[quote\]\[\/quote\]#i','',$text);
    
$text preg_replace('#\[noparse\].*?\[\/noparse\]#si','',$text);

    
$text $this->do_parse($text);
    return 
preg_match('/\[quote.*?\]|\[\/quote\]/si',$text);
  }

  
/**
  * sub-parsing function
  *
  * @param  string  (internal call only)
  */
  
private function do_parse($text) {
    if(
is_array($text)) { $text $text[1]; }
    
$regex '#\[quote\]((?:[^[]|\[(?!/?quote\])|(?R))+)\[/quote\]#i';
    return 
preg_replace_callback($regex,array($this,'do_parse'),$text);
  }



--RayJ

ravenscape 12-05-2011 03:10 AM

still doesn't work.

I'll reinstall from scratch tomorrow and see if it clears up.

raywjohnson 12-05-2011 04:09 AM

Quote:

Originally Posted by ravenscape (Post 2274775)
still doesn't work.

I'll reinstall from scratch tomorrow and see if it clears up.

Ok.

Also, what exactly does the system tell you when you have a quote with more than 8281 characters?

--RayJ

Joe Blow 09-16-2013 06:11 PM

I have had to disable this plugin for 4.x.x as it has been causing problems for those trying to post long posts in quote tags. My host narrowed it down to this plugin and sure enough, as soon as it was disabled all the posting issues went away.

A shame, as it is a useful plugin. Just doesn't seem to work.

Max Taxable 09-16-2013 07:50 PM

Quote:

Originally Posted by Joe Blow (Post 2446018)
I have had to disable this plugin for 4.x.x as it has been causing problems for those trying to post long posts in quote tags. My host narrowed it down to this plugin and sure enough, as soon as it was disabled all the posting issues went away.

A shame, as it is a useful plugin. Just doesn't seem to work.

It's a plugin for v3.8.x which might need some tweaking to be truly compatible with version 4.

raywjohnson 09-16-2013 10:42 PM

Quote:

Originally Posted by Joe Blow (Post 2446018)
I have had to disable this plugin for 4.x.x as it has been causing problems for those trying to post long posts in quote tags. My host narrowed it down to this plugin and sure enough, as soon as it was disabled all the posting issues went away.

A shame, as it is a useful plugin. Just doesn't seem to work.

If you could tell me what exactly it is doing, I could work on a fix. Did you get any errors in the php error log? Any errors or other output in the browser?

Quote:

Originally Posted by Max Taxable (Post 2446035)
It's a plugin for v3.8.x which might need some tweaking to be truly compatible with version 4.

True. Thanks. I will to some testing on version 4 to see what I can find out.

--RayJ

Joe Blow 09-17-2013 05:52 PM

Quote:

Originally Posted by raywjohnson (Post 2446070)
If you could tell me what exactly it is doing, I could work on a fix. Did you get any errors in the php error log? Any errors or other output in the browser?



True. Thanks. I will to some testing on version 4 to see what I can find out.

--RayJ

I am waiting on my host to respond to my request for additional info. In the meantime, you can take a look at this thread I started on vbulletin.com. The issue that I started the thread about was being caused by this plugin.

http://www.vbulletin.com/forum/forum...ong-post-error

This is what the host said in an email to me when this plugin was finally identified as the issue:

Quote:

Hey Joe, the class_verifyquotes.php plugin appears to be the culprit.
Are you able to disable that and confirm if it fixes it? I tried to
just rename the file but it's still getting called and giving a blank
page. While slightly better than a crash, i think disabling it or
updating that plugin ought to fix the problem.
Hope that helps.


All times are GMT. The time now is 10:37 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.01144 seconds
  • Memory Usage 1,767KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)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