I think that this module needs a huge overall in a lot of areas. I would like if if someone was interested in helping me do this. I want to recode the entire module and make it run a different way .
I believe that this should not be hooked in using input filters and just hooked in via hook_nodeapi or hook_user.
Currently this module only supports filters on node titles and node bodies or ANY textarea that uses filters. This lacks a lot of other areas that can really use this feature.
Another feature that has been requested that I also wanted added in was the ability to export / import word lists so you don't have to find yourself re entering the words on each site you make. There should also be a default word list so you possibly don't even have to think of that.
Comments
Comment #1
buddaA default word list could be provided in the hook_install() ?
Comment #2
Anonymous (not verified) commentedyep.
Comment #3
moshe weitzman commentedbeware - filtered html is cached so you don't run the filter on every page view. that won't happen if you switch to nodeapi based filtering. you will have to search/replace every time ... better to make filter system smarter if some requirement needs it.
Comment #4
moshe weitzman commentedi do agree that a recode would be nice. the form handling is not proper. use regular submit handler to make changes. or just use usual filter form. and i would prefer a delimited list of word, replacement lines not two separate entry fields. i al so made those entry fields into large textareas instead of textfield. no idea why that decision was made.
Comment #5
Woodoo commentedI started a recode which is using hook_nodeapi.
If anyone wants to test it, a first alpha release (for Drupal 5.x) is available at:
http://www.woodoomagic.de/drupal/wordfilter2-5.x-0.x-dev.zip
Comment #6
summit commentedHi,
I hope this is the place to ask, otherwise sorry for this..
I am testing the module, and it is working ok for node-entry/updates.
But the allready inserted forbidden words before enabling the module are not changed.
My nodes which contained forbidden words stay the same until I update the node, then the forbidden words are altered.
Would it be possible to make the module replace also the words from content what not have been updated?
This way the whole site will be altered and the forbidden word will not be found on the site.
Greetings,
Martijn
Comment #7
zmove commentedRecode using hook_nodeapi would apply regular expressions each time a people view a node, this will bring huge performance issue compared to the filter system that cache the content.
So I'm for the caching system, however, if you let the user to choose how he want to apply wordfilter, it's ok.
Comment #8
jaydub commentedwe're sticking with the filter approach for now for performance reasons already mentioned. The other comments about the module design have been addressed in the current module version.
Comment #9
zmove commentedAbout the default word list, instead of providing a default list that some people will don't want, maybe it would be better to provide a mass importin/exporting system, it will be more extensible and all people will be happy with it.
About the filter system, unfortunately, I continue to think that using the hook_nodeapi is just not viable without a NASA/CIA server. Maybe a solution would be to change textarea that don't use filter system into textarea that use the filter system. I think using hook_form_alter can allow that.
To go further, you could provide an admin option, with a select list of all non filtered textfields/textarea, and the user choose in the list which textfield/textarea he want to filter.