vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Strip BBCodes From Quotes (https://vborg.vbsupport.ru/showthread.php?t=318157)

MarkFL 04-07-2015 09:00 PM

Strip BBCodes From Quotes
 
1 Attachment(s)
This simple hack allows you to define a list of BBCode tags and their content that you want to be stripped from the body of posts quoted by your users. This eliminates the repeated and unnecessary posting of images, videos and other such media.

Update: version 1.1
  • Fixed serious flaw whereby post content was stripped of BBCodes when previewing the post. I now have the correct hook location, and I apologize for any inconvenience to anyone.

Update: version 1.2
  • The function that actually strips the BBCode tags and their content from quoted posts has been moved to an external PHP file, so that it can be used by other products. There is no change in functionality.

Update: version 1.3
  • Select usergroups may now be exempted from the stripping of BBCode tags from quoted posts.

To Install:

Download and extract the attached zip file, then upload the contents of the "upload" folder to your forum's root directory.

In AdminCP, go to Plugins & Products -> Manage Products -> Add/Import Product.

Click on "Choose File" and browse to the product xml file that was included in the .zip file.

Click "Import"

You MUST set your settings to enable the mod. Each setting has an explanation of its use.

https://vborg.vbsupport.ru/attachmen...1&d=1437507359

The default list of tags is: attach,img,video

Support for this product can be found here:

MarkFL 04-08-2015 05:15 AM

Reserved.

MarkFL 04-15-2015 05:20 AM

I found and fixed a serious flaw with this product as described above. :o

DSemen 04-18-2015 07:09 PM

Thanks, was looking like.
Is it possible to adapt to version 4.1.3?
In my case, after the installation does not work multi citation.

MarkFL 04-18-2015 09:16 PM

Quote:

Originally Posted by DSemen (Post 2543457)
Thanks, was looking like.
Is it possible to adapt to version 4.1.3?
In my case, after the installation does not work multi citation.

Can you give me a link to your site and a test account to use so I can see how it behaves?

MarkFL 04-19-2015 01:46 AM

In the new version 1.2, there is no change in how the product functions, I have simply put the PHP function that strips the tags and their content into an external file so that a new product I will be uploading soon can use it as well. :D

DSemen 04-19-2015 08:48 AM

Quote:

Originally Posted by MarkFL (Post 2543476)
Can you give me a link to your site and a test account to use so I can see how it behaves?

Thank you very much! In version 1.2, everything works without error
Quote:

Originally Posted by MarkFL (Post 2543484)
In the new version 1.2, there is no change in how the product functions, I have simply put the PHP function that strips the tags and their content into an external file so that a new product I will be uploading soon can use it as well. :D

Is it possible to remove all the tags between brackets when empty?

https://vborg.vbsupport.ru/external/2015/04/10.jpg

MarkFL 04-19-2015 12:45 PM

Yes, edit your "newpost_quote" template to wrap the following conditional around the existing code:

Code:

<vb:if condition="$pagetext"></vb:if>

DSemen 04-19-2015 03:45 PM

Thank you.
Encountered an error: After answering a multi Quote checked with marked positions can not be removed! https://vborg.vbsupport.ru/external/2015/04/7.jpg

MarkFL 04-19-2015 03:58 PM

Quote:

Originally Posted by DSemen (Post 2543532)
Thank you.
Encountered an error: After answering a multi Quote checked with marked positions can not be removed! https://vborg.vbsupport.ru/external/2015/04/7.jpg

I am unable to reproduce this error. Can you describe exactly what you are doing?

DSemen 04-19-2015 04:11 PM

I note a few posts (4 for example) for multi citation, I press the button "Reply to Thread" and answer.

In this case, a tick (previously marked) remain active. https://vborg.vbsupport.ru/external/2015/04/7.jpg

They should be removed after the answer. https://vborg.vbsupport.ru/external/2015/04/8.jpg

MarkFL 04-19-2015 04:19 PM

Quote:

Originally Posted by DSemen (Post 2543536)
I note a few posts (4 for example) for multi citation, I press the button "Reply to Thread" and answer.

In this case, a tick (previously marked) remain active. https://vborg.vbsupport.ru/external/2015/04/7.jpg

They should be removed after the answer. https://vborg.vbsupport.ru/external/2015/04/8.jpg

Yes,when I reply, they are all unmarked for multi-quote just as they should be. Are you actually submitting the reply?

If so, try disabling the product, and see if this behavior persists...

DSemen 04-19-2015 04:23 PM

Behavior persists even when turned off.
Starts to work properly only after hack deleted

MarkFL 04-19-2015 04:56 PM

The earliest version of vBulletin to which I have access is 4.2.0 PL3, and it behaves correctly just as vB 4.2.1 and vB 4.2.2 PL 4 do.

If other users of vB 4.1.x report this issue, then I will mark this product for 4.2.x only.

nosaes 04-19-2015 05:53 PM

I'm getting the following error:
Quote:

Fatal error: require_once(): Failed opening required '/home/rogcommunity/public_html/forums/stripbbcodesfromquotes/striptagsfromquotes.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rogcommunity/public_html/forums/includes/functions_newpost.php(1663) : eval()'d code on line 1
Any idea how to resolve this?

Edit: I'm on 4.2.2

MarkFL 04-19-2015 06:07 PM

Quote:

Originally Posted by nosaes (Post 2543549)
I'm getting the following error:

Quote:

Fatal error: require_once(): Failed opening required '/home/rogcommunity/public_html/forums/stripbbcodesfromquotes/striptagsfromquotes.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rogcommunity/public_html/forums/includes/functions_newpost.php(1663) : eval()'d code on line 1
Any idea how to resolve this?

Edit: I'm on 4.2.2

Did you upload the contents of the "upload" folder to your forum's root directory (where forum.php resides)?

edit: To everyone asking for support, please click "Mark As Installed." :D

nosaes 04-19-2015 07:10 PM

Quote:

Originally Posted by MarkFL (Post 2543551)
Did you upload the contents of the "upload" folder to your forum's root directory (where forum.php resides)?

edit: To everyone asking for support, please click "Mark As Installed." :D

Oh. Thank you, I feel pretty silly now. Works great!

Marked as installed.

DSemen 04-19-2015 07:13 PM

1 Attachment(s)
Quote:

Originally Posted by MarkFL (Post 2543540)
The earliest version of vBulletin to which I have access is 4.2.0 PL3, and it behaves correctly just as vB 4.2.1 and vB 4.2.2 PL 4 do.

If other users of vB 4.1.x report this issue, then I will mark this product for 4.2.x only.


Maybe you can help this file
P.S. Marked as installed. Nominate for Modification of the Month

DSemen 04-22-2015 03:45 PM

1 Attachment(s)
Quote:

Originally Posted by MarkFL (Post 2543540)
The earliest version of vBulletin to which I have access is 4.2.0 PL3, and it behaves correctly just as vB 4.2.1 and vB 4.2.2 PL 4 do.

If other users of vB 4.1.x report this issue, then I will mark this product for 4.2.x only.

This product is not working properly in these versions, check.

MarkFL 04-22-2015 04:25 PM

Quote:

Originally Posted by DSemen (Post 2543876)
This product is not working properly in these versions, check.

I don't use the quick edit option because on the forums with which I am involved we use LaTeX rendering by MathJax, and the quick reply/edit simply do not work well with it. My users like for their LaTeX to be rendered after posting or making an edit without having to manually refresh the page.

However, when I enable the quick reply on my local dev site, I do see the behavior you have indicated. but I see this behavior even with my product uninstalled. I must therefore conclude that it is behavior intrinsic to vBulletin 4.2.x. As I said above, I don't have access to vBulletin 4.1.x and so I can't say whether that version behaves in this way or not.

DSemen 04-22-2015 04:34 PM

The last screen shot I have tested with version - 4.2.2

MarkFL 04-22-2015 04:39 PM

Quote:

Originally Posted by DSemen (Post 2543879)
The last screen shot I have tested with version - 4.2.2

Yes, I find that when using the quick reply with multi-quote, and the new post is placed on a different page, the multi-quote is left checked...and this is with or without my product being installed. Therefore, I must conclude that this is not the result of my product, but simply the default behavior of vBulletin.

DSemen 04-22-2015 04:44 PM

This is the result of your product. After the removal of your product forum working properly.
Forum test, there was nothing found except Strip BBCodes From Quotes

MarkFL 04-22-2015 05:52 PM

Quote:

Originally Posted by DSemen (Post 2543883)
This is the result of your product. After the removal of your product forum working properly.
Forum test, there was nothing found except Strip BBCodes From Quotes

As I said before, I get the same behavior with or without my product being installed. I just double-checked, and this is indeed the case. Therefore, I stand behind my assertion that this is not the result of my product.

DSemen 04-23-2015 11:58 AM

Sorry, this behavior is indeed observed in all versions vBulletin without your product.
I apologize for misrepresentation

Alan_SP 04-23-2015 04:55 PM

Quote:

Originally Posted by DSemen (Post 2543536)
I note a few posts (4 for example) for multi citation, I press the button "Reply to Thread" and answer.

In this case, a tick (previously marked) remain active. https://vborg.vbsupport.ru/external/2015/04/7.jpg

They should be removed after the answer. https://vborg.vbsupport.ru/external/2015/04/8.jpg

This is known bug in vB4, and not resolved for some time.

It happens sometimes, but in other instances doesn't happen. Who knows why. And I'm not optimistic that it would be solved by authors of vB.

Stratis 07-21-2015 03:47 PM

Thanks Mark, works fine in 4.2.0 pl4
You rock ;)

MarkFL 07-21-2015 03:50 PM

Quote:

Originally Posted by Stratis (Post 2550969)
Thanks Mark, works fine in 4.2.0 pl4
You rock ;)

Thanks for the feedback and for marking as installed. :up:

Stratis 07-21-2015 04:19 PM

in future... it would be nice if this take effect to which usergroups we select.
admins - smods - mods when they answer in posts they know what is better to quote or not.

MarkFL 07-21-2015 04:21 PM

Quote:

Originally Posted by Stratis (Post 2550985)
in future... it would be nice if this take effect to which usergroups we select.
admins - smods - mods when they answer in posts they know what is better to quote or not.

I will add the option to exempt selected usergroups tonight! ;)

MarkFL 07-21-2015 05:38 PM

Update: version 1.3
  • Select usergroups may now be exempted from the stripping of BBCode tags from quoted posts.


All times are GMT. The time now is 04:54 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.01273 seconds
  • Memory Usage 1,809KB
  • 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
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)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