Osclass Support Forums

Osclass plugin support => Spam Solution Plugin => Topic started by: Tango on January 19, 2017, 11:34:53 PM

Title: Plugin compatibility issue
Post by: Tango on January 19, 2017, 11:34:53 PM
Hello,

I'm having a compatibility issue between HTML Editor (https://market.osclass.org/plugins/text-processing-wysiwyg-editors/html-editor_453) and Spam Solution Plugin (https://market.osclass.org/plugins/security/spam-solution-plugin_318) Badwords filter.

While the BANwords feature works perfectly, the BADwords one, does not.
If I disable the HTML Editor, everything works as it should.

In my theme (\oc-content\themes\mcfly\parts\item\details.php -> details.php replaces item.php) I have the following:
Code: [Select]
<?php if (function_exists('html_editor_description')) {
if (html_editor_description() != '') {
echo html_editor_description();
} else {
echo osc_item_description();
}
} else {
echo osc_item_description();
}
?>

This function outputs the item description modified by the HTML Editor.

Where/how could we insert this check, for it to work?
Code: [Select]
<?php if (function_exists('spam_clear_description')) { echo spam_clear_description(); } else { echo osc_item_description(); } ?>
For example: if the description text has a bad word in it, echo html_editor_description minus the bad word, else echo  html_editor_description.

Any suggestions?

Thanks!
Title: Re: Plugin compatibility issue
Post by: MB Themes on January 23, 2017, 05:58:40 PM
@Tango
Only what is checked can be function osc_item_description(), so you can replace just this one.
Plugin does not care about different editors, as there exists many of them.