XF 2.0 Modify stripquotes function

Sysnative

Well-known member
Hey all,

I'm trying to modify the stripquotes function in XF2 to allow for multi-level quotes (e.g. [*quote*][*quote*] )

I understand that modifying this function will allow this:

PHP:
    public function filterQuoteTag(array $tag, array $options)
    {
        // remove everything within
        return '';
    }

Location: BbCode\ProcessorAction\StripQuotes.php

If return ''; is changed to return; this should disable the stripquote functionality. However I also want to disable the alert notification for any inner quote. So for example:

[*quote=user1*][*quote=user2*] - User 1 will be notified their post has been quoted, but User 2 will not be.

I have two options for doing this -

1) Prevent the alert from triggering for inner quotes only - very stuck on how to go about this.

2) Instead of stripping inner quotes, do a find and replace and change [*quote*] to a custom BBCode: [quote_inner] each time this attempts to strip.

Questions:

1) Any guidance to point me in the right direction for disabling the alerts?

2) if I do a find and replace - can this be done in the filterQuoteTag function itself? I'm not 100% following where the text is parsed if the quote tag can be modified from this function.


I'm much more used to the vB4 code, so I'm still getting used to the XF framework and how each class chains together. If there are any other resources on this to help me learn that would also be greatly appreciated!

Thanks for any help!
 
Anyone? I'd like to do this instead:

PHP:
class StripQuotes extends XFCP_StripQuotes
{
    public function filterQuoteTag(array $tag, array $options)
    {
        str_replace("QUOTE","QUOTE2", $tag);

        return;
    }
}

Any guidance on getting this to work?
 
Top Bottom