Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
What's the best way to verify that an email address "looks" sensible? I'm writing a module that asks for an email address on a form and I'd like the form validation procedure to check that the email address looks like a decent email address. I've considered writing a lumpy bit of code that first checks for the presence of an "@", then explodes the email address around the "@", then checks to make sure the explode resulted in two fragments, then checks for the existance of a "." in the second fragment. Is there an easier and less fragile way?
How can I write a module that inserts a hook into the node.module? I want to set a meta header containing keywords for the nodes. They keywords are saved in a table cell.
I want to make my own drupal module. I use the template from the tutorial as a base. Let's say the module prints the nodes that belong to a taxonomy term.
When I call it via ?q=new_module
everything works fine and it displays all taxonomy terms.
If I call it via ?q=new_module/term/2
everyone may access the module. Why is that?
(I know there IS a module that does what I try to do, it's only for training purposes.)
I've installed Drupal 4.6.5 (no problems), a few stand-alone modules (no problem) and installed CivicRM (a pain, but a smooth installation). Upon adding the latest volunteer.module (4.6.0) available, I continue to get errors as it makes calls to contact_manager.module. My understanding is that particular module is being phased out and replaced by CivicRM?
Is there a patch or an updated download for volunteer that I've missed?