![]() |
Validate matching quote BBCode tags.
1 Attachment(s)
Quotes Validation
I created this modification to help alleviate the need to edit posts that have invalid/mismatched QUOTE tags. For a busy forum, correcting bad QUOTE tags can become a big problem for your moderators. Messages (new or edited) rejected by this mod will return the member to the post submission form with the phrase: "One or more of [quote] tags are missing or mismatched. All posts are required to have proper matching quotes." I have been running it on my board for a month or so without problems. It may run on versions older then 3.8, but I have not tested that. I have created a number of mods for my board, this is the first one I have released! --RayJ NOTE: Plugin works on vBulletin version 4 Description Check new and edited posts for valid/matching open and close [quote] BBCode tags. *Should* work with any number of nested or included quote tags. Details 1 Product XML with 3 Plugins, 2 Phrases, 5 Settings, and 0 Queries 1 File/Class No template modifications. Files class_verifyquotes.php install.txt license.txt license-vqbc_rayj2009.txt v1.3 = product-vqbc_rayj2009_1-3.xml v1.2 = product-vqbc_rayj2009_1-2.xml v1.1 = product-vqbc_rayj2009_1-1.xml v1.0 = product-vqbc_rayj2009.xml Upgrading v1.0-v1.1 : Upload class_verifyquotes.php file to the /includes/ directory import product-vqbc_rayj2009_v1-1.xml (Allow Overwrite) v1.(0/1)-v1.2 : Upload class_verifyquotes.php file to the /includes/ directory import product-vqbc_rayj2009_v1-2.xml (Allow Overwrite) v1.(0/1/2)-v1.3 : Upload class_verifyquotes.php file to the /includes/ directory import product-vqbc_rayj2009_v1-3.xml (Allow Overwrite) History 1.0 Initial Version1.1 Added plugin: newpost_preview Added setting: Auto Preview Mode. If active, the system will automatically put you in preview mode, and display the error message in the post area, when QUOTE mismatches are found.Added phrase: To display CSS around "in post" error message. Bug Fix: versions v1.0 and v1.1 (Note: fix already applied to all versions) Memory leak causes download dialog for all browsers (for large posts). Download quotes_validation_bugfix.zip (contains: class_verifyquotes.php) and upload it. Fixes all previously installed versions.1.2 Added Option: Style (CSS) for error message Added Option: Bad Quotes Error Message This will let you edit the Error Message and CSS that controls the output without having to edit the phrase directly. I left the original phrase code in place so that it will not get wiped out when you upgrade. You will have to search for the phrase (vqbc_bad_quotes_error) and copy it to the new setting.Changed the phrase that displays the "in post" error message to work with the new options. 1.3 Bug Fix: Removed recursion and complex regular expressions. These were causing issues with large posts. Added Option: Ignored Tags (allows you to add tags to be ignored during validation, note: noparse is always ignored) Notes PHP 5.0+ required. If you are still using PHP 4 (you should upgrade). Or you can edit the class_verifyquotes.php file and remove all public and private keywords (before each function). Then edit the product-vqbc_rayj2009_v1-1.xml file and remove the PHP 5.0 dependency line. |
My first mod release.
Enjoy! --RayJ |
Yeah ! Not bad.
I will test it later. Thank you for this mod. ;) |
Great idea! I'm always fixing mismatched quotes. Thanks!
|
Good idea, I'm tagging this to test it in a few days.
Thanks. |
A great idea, many thanks, RayJ!
|
Great, great, GREAT idea!!!
Thank you so very much. |
I get:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /path/to/forums/includes/class_verifyquotes.php on line 35 When it's active. Any ideas? |
Quote:
If so, open the file /includes/class_verifyquotes.php and remove the "public" and "private" before both function keywords. --RayJ |
Yes PHP 4.4.6 (cli)
That fixed it - works great now! :D |
Great mod, going to install this one, thank you!
|
Works great...
I do find on Quick reply it just takes you to a preview of the post if there's a mismatch, I think it could do with an error message here like on the full reply so people know what's wrong. |
Quote:
--RayJ |
sounds handy. Thanks :D
|
good mod
thanks, |
Greetings All!
You are most welcome! A number of users on my forum requested that this modification automatically put you in the Preview mode when it finds mismatched quotes. After a bit of effort, I found a way to make it work. I decided that some might like the original functionality, so I made this change an option in the AdminCP. Enjoy! --RayJ |
I had this installed on vBulletin 3.8 and it was great. Does anyone know if it will work with vBulletin 4?
|
It may. I am not sure. I will do some testing and let you know. If it does not work, I will update it so that it will.
--RayJ |
Alrighty then!
I installed it on vB v4.0.8 and it worked as expected. :D --RayJ |
Looks cool... has the bug-fix been put into version 1.1 yet or we still need to download both?
Thanks :up: |
The bug fix has already been applied to both versions. So you only have to download the latest!
And... there is a new version (1.2) that added the ability to change the error message, and the CSS that controls its display, via the options. --RayJ |
Nice update, thanks. :)
If anyone is interested I'm using this CSS to make a rounded border with a slight shadow, light yellow background and dark red text... Easily edited to your needs. There are 3 properties needed for each rounded border (radius) and shadow... -moz is for firefox browser, -webkit is for chrome browser, and the other is for IE9 and standard web browsers. Code:
color: darkred; background: lightyellow; border: 2px inset red; padding: 4px; margin: 2px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; moz-box-shadow:0 0 2px darkred; -webkit-box-shadow:0 0 2px darkred; box-shadow:0 0 2px darkred; |
This is a great modification, but people occasionally will have a problem with it on our site due to the length (number of characters) of the quoted text. The limit within one set of quote tags appears to be 8281. I can add another set of quote tags around a 8281 character quote and add some more text in the outer set.
|
Are you using the latest version? There was an issue with large posts in the original version.
--RayJ |
it is version 1.2 that I have installed.
|
will be good if mod would have setting for exclude validate quotes inside tags
example: [code] [html] [php] e.t.c |
Quote:
Quote:
--RayJ |
Quote:
Could you do me a favor? Check your forums "Maximum Characters Per Post" setting. That may be what is causing this issue. The setting is in Message Posting and Editing Options. --RayJ |
Quote:
The max characters setting is at 50,000. This is the maximum amount that I can post in a single quote. Quote:
|
Quote:
PHP Code:
if not, then you are still using the original buggy version. --RayJ |
Quote:
--------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:
--------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 |
Installed, tested, works like a charm. Great Mod, thanks!
|
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:
|
Quote:
PHP Code:
--RayJ |
still doesn't work.
I'll reinstall from scratch tomorrow and see if it clears up. |
Quote:
Also, what exactly does the system tell you when you have a quote with more than 8281 characters? --RayJ |
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. |
Quote:
|
Quote:
Quote:
--RayJ |
Quote:
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:
|
All times are GMT. The time now is 02:38 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|