I have attached a ptch that allows other modules to add service_links. This is the preferred "Drupal way" rather than the module designers suggestion to edit his module code.
an example of my own module adding a hook lokos like:
// add Service Links - using our custmm added hook
function umga_service_links_links ($links, $url, $title, $nodelink) {
// Permalink
$links['service_links_permalink'] = theme('service_links_build_link', t('Permalink'), urldecode($url), t('Permalink to this page.'), '', $nodelink);
return $links;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | add_hook_01.patch | 841 bytes | sanduhrs |
| add_hook.patch | 652 bytes | liquidcms |
Comments
Comment #1
liquidcms commentedComment #2
vesapalmu commentedWorks for me. I did some testing to make sure everything still works and this will now be published to a production site.
Comment #3
sanduhrsThis makes a lot more sense, than hacking the module itself.
If I just apply the patch, all links disappear, until i add at least one new link via hook_service_links_links().
Added a patch to fix that.
Comment #4
Trasherk commentedadd_hook_01.patch wurde hinzugefügt und nun funktioniert es thx :)
Comment #5
wayland76 commentedI'd suggest that resolving this bug:
http://drupal.org/node/253758
...would also fix these problems, and in a more flexible way.
Comment #6
dwwThere's an older issue about exactly the same thing here: #185642: Hook to define service links
Let's move over there.