Hi guys,

I have looked at Drupal and played around setting it up, but still consider myself a newbie to it...

I've spent the last 2 weeks working on a PHP class that can process input coming from the user from lets say $_POST or $_GET.. and filter it according to the developer's wishes.

Http://cyberai.com/inputfilter/
http://cyberai.users.phpclasses.org/browse/package/2189.html

How would I go about writing a module for enabling this in Drupal ?

Many thanks,
-Dan Morris

Comments

animachine’s picture

Cheers!

Steven’s picture

Are you aware of the flexible filter system Drupal has?

The standard filter.module comes with an HTML filter which can also strip out JavaScript events and inline CSS styles. The codefilter.module (download from this site) allows you to post blocks of unescaped code, and will even syntax highlight PHP.

We also have an XSS checker which checks the $_GET/$_POST/etc arrays for suspicious data.

If you want to expand Drupal, it really only makes sense to work within the existing framework. Drupal does many things already and it is very likely that you will be re-inventing the wheel otherwise.

--
If you have a problem, please search before posting a question.

animachine’s picture

Indeed!

I will look at the existing module and check it does everything mine does.
Thanks for the feedback :-D