This patch addresses the use case of some or all users to be able to forward using the forward module's form but the site doesn't need each node to have the "email this page" for every user.
example:
admin users can have the link displayed.
everyone else can visit the link/url and submit the form.
Joe
| Comment | File | Size | Author |
|---|---|---|---|
| forward.module.20060626.patch.txt | 1 KB | joestewart |
Comments
Comment #1
seanrNot sure how usefull this is really - can you provide more detail on why it should work in this way? What would the benefit of that be?
Comment #2
joestewart commentedThe usefulness is for a limited set of circumstances. Nothing earth shattering.
We had a client request that they have a mechanism for providing a link in some content that would then display the forward form and email the request out.
But they did not want the regular "email this page" links displayed on all pages to their regular users.
This just goes to the general theory of providing more granular permissions on actions. This provides the flexibility to construct the roles required.
thanks,
Joe
Comment #3
marcoBauli commentedhi there,
i need to show a custom icon link in my theme instead of the default forward "email this page" link.
Do you guys think this is possible? Or is there a snippet or code i can use as a link for my icon to send the visitor to the correct forward form for the node he is visiting?
@joestewart: this seems similar to the needs of that client of yours, can i ask if you find a solution, and eventually if you can share?
Thank you
Comment #4
designwork commentedHi all,
to over ride the link in any module or what ever go via the hook link. I will give you an example for the premium module i wrote.
The funktion is looking for the normal read more link, if the node is premium it will override it´s text with "Members only".
How to apply with forward. Two possibilities first go to the module and override the text, not nice if you have to upgrade the module latter. Second write a function phptemplate_link in your template.php. For forward it should look like this:
/**
* Implementation of hook_link()
* You can called it mytheme_link
*/
function phptemplate_link($type, $node = NULL, $teaser = NULL) {
$links = array();
if ($forward_link_type) {
$links['forward_links'] = array(
'title' => t('Your text'),
'href' => 'forward/'.$node->nid.'&cid='.$node->cid,
'attributes' => array('title' => t('Your text'))
);
}
return $links;
}
this should work for Drupal 5.x
Warm regards from Cologne.
Dirk
Comment #5
seanrDesignWork, thanks for the suggestion. In light of the ease of that fix and the limited usefullness of the original requested feature, I'm marking this "won't fix".