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 JurriaanRoelofs on
Hi, I would like to disallow posting links in a certain content type, or for a certain usergroup, how can this be done?
It looks like I can't do it through the input filter module.
JR
Comments
use hook_validate and
use hook_validate and hook_submit to modify imput data...
---------------------------------
Sites for uzbek and Uzbekistan:
Uzbek Lyrics Database
Uzbekistan Forum
If you disallow <a> tags in
If you disallow
<a>
tags in the filter settings, users won't be able to post clickable links. If you want to totally disallow URLs, etc, you have a couple options: Use hook_nodeapi with the 'validate' op, and look at the urlfilter module to see how it picks out URLS. With this option, the user will get an error if they post a URL, and their post won't be accepted until they remove it. You could also implement something like urlfilter that prevents the display of URLs.---
Work: BioRAFT
thanks peeps. The hook
thanks peeps.
The hook method sounds like a viable option, you can't disallow with the filter settings though.
First problem is that you can't remove it from the default filter. Then you can make a new custom filter and exclude in there but the second problem is that you can't prevent users from using the default input filter.
-------------------------------
http://www.sooperthemes.com/#-Drupal-Themes
yes, unfortunately different
yes, unfortunately different default filters per user role is not a feature that made it into 5.x even.
So, you'd have to make the most restrictive filter the default.
---
Work: BioRAFT