I'm trying to figure out a way to blacklist certain top level domains when they are used in CCK link fields. I run a social news site where users can post links and I don't want them linking to offensive/pornographic content.

This doesn't necessarily need to be a part of this module if I can find a way to do custom validation for any CCK field (it seems like there should be a module to do this, but I haven't found it).

If anyone can point me in the right direction, I'd appreciate it. If no such validation module exists, then I would appreciate it as an added feature to the Links package. Thanks.

Comments

jcfiala’s picture

That's a neat idea. I'm not really sure if it fits into the link module, though.

As a suggestion, have you looked at the http://drupal.org/project/spam module yet? I know it has whitelists/blacklists, and really you're more likely to have people throw bad links into the body of nodes than into the link field. Take a look, and if it does what you need, reply back here and close the ticket. Thanks!

dqd’s picture

Status: Active » Closed (duplicate)
Issue tags: -url validation, -blacklist +field validation

Dear followers of this issue: please read the project page info of link module for further validation issues. There is already an issue to collect and discuss all possible validation scenarios in general. That's why I will mark this one here as duplicate. I need all concentration inside the ONE and only discussion to move forward. After a D7 implementation we will provide a D6 backport.

Explanation: There are too many corner cases and validation wishes of users to implement them all serially one after the other. We would have a 40 lines cluttered settings form for validation methods only conflicting each other. I think, the right way is to find a maybe more complex but all embracing configuration method, which lets the admin better decide how and when to validate the url. Including a good description which helps to set it up.