Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rowanboy on
I've been working on a content filter module to remove swearing from posts..
I've pretty much copied the urlfilter module provided. It doesn't work. I can enable my module, but text is still not filtered.. I don't think drupal is actually calling the function?!
HELP!
When I've got this bit working, I'll add a database table full of swearwords to check against... one step at a time eh?!
Here is the module:
Comments
Module location:
ok! here it is!!
module
Function enabled
I don't immediately see why your function is not being enabled. As a work around, just drop the variable_get test in your filter function.
Working now...
It's fine. I just didn't realise *when* the module would be called... it only seems to work on new submissions... not old content.
I notice that when I tried ex
I notice that when I tried experimenting with the filter hook a while back, it didn't filter the teaser that's displayed on the main page, but when you click read more or go to display the comments, suddenly the filtering works. Perhaps this is what's happening to you too?