Posted by austintnacious on March 5, 2009 at 5:13am
Jump to:
| Project: | Node Invite |
| Version: | 6.x-1.0-beta7 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
Currently the node invite link title is something like "Invite people to this %type" (where %type is a token representing the CCK content type's machine readable name).
I'd like to be able to change this link title to my liking.
Any chance you'll incorporate that feature in the future?
Thanks!
Great module BTW!
Comments
#1
Also, I've tried using the string overrides module to alter this link text but with no luck so far.
That approach did work with the ecard module which I was trying to use for the purpose of invites before I found your module but it doesn't seem to work here.
I'm not a programmer so I don't know why. . .
. . . I found out why. . .
string overrides require the WHOLE STRING [contained within t()], I was trying to search for the string as rendered on the end-user webpage and alter that text, when what I needed to do was alter the string passing through t() before it gets sent to the page [I'm trying to sound like I have a clue here].
So this is still a feature request and I'm requesting that you make the link title configurable by a user with appropriate permissions and that the link title is token-aware [again trying to sound like I have a clue. . . don't be fooled].
#2
I'm marking this as won't fix now. Basically what I'd recommend doing is putting this code into your sites custom module (if you don't have one you'll need to make one):
<?phpfunction mymodule_link_alter(&$links, $node, $comment = NULL) {
if (isset($links['node_invite'])) {
$links['node_invite'][0]['title'] = t('my new title');
}
}
?>
I haven't tested it, but something like that should do the trick.