I have an idea for my site but am unsure how difficult it would be to implement.
Basically, once a user submits a certain type of content, I'd like to redirect them to a page where they can notify their friends/family. I use the Print, Mail, PDF module to mail pages to friends, so ideally, once a user submits node/123, it would take them to printmail/123 (the URL that the module uses to mail pages) with possibly a customised message along the lines of "now you've published on our site, let your friends know!" or something equally cheesy.
tough to do?
thanks in advance
Neil
Neil Coghlan wrote:
I have an idea for my site but am unsure how difficult it would be to implement.
Basically, once a user submits a certain type of content, I'd like to redirect them to a page where they can notify their friends/family. I use the Print, Mail, PDF module to mail pages to friends, so ideally, once a user submits node/123, it would take them to printmail/123 (the URL that the module uses to mail pages) with possibly a customised message along the lines of "now you've published on our site, let your friends know!" or something equally cheesy.
tough to do?
You could probably achieve this with an implementation of hook_form_alter() in a custom module by adding a #redirect to the node form.
http://api.drupal.org/api/file/developer/topics/forms_api_reference.html
To add the customized message, you'd probably also need to add an additional #submit handler to the node form.
Cheers,
Jonathan
You might also be able to do this with the actions and rules modules.
Hans www.koba.be
2009/6/9, Jonathan Hedstrom jhedstrom@opensourcery.com:
Neil Coghlan wrote:
I have an idea for my site but am unsure how difficult it would be to implement.
Basically, once a user submits a certain type of content, I'd like to redirect them to a page where they can notify their friends/family. I use the Print, Mail, PDF module to mail pages to friends, so ideally, once a user submits node/123, it would take them to printmail/123 (the URL that the module uses to mail pages) with possibly a customised message along the lines of "now you've published on our site, let your friends know!" or something equally cheesy.
tough to do?
You could probably achieve this with an implementation of hook_form_alter() in a custom module by adding a #redirect to the node form.
http://api.drupal.org/api/file/developer/topics/forms_api_reference.html
To add the customized message, you'd probably also need to add an additional #submit handler to the node form.
Cheers,
Jonathan
-- Jonathan Hedstrom OpenSourcery http://opensourcery.com Technology for Good