Hello, I'm running CVS for both Drupal and service_links, I'm enabled the module but as you can see here:
http://www.teleworkpeople.com/a-better-life-doing-nothing
The link is not showing text or correct url. I've enabled "Show del.icio.us link" and service links are active for story nodes (this example is a story).
My other settings are:
Service links in links: disabled
Service links in nodes: full page view
Link style: text links
You can see from my source that I have this: href="/%3C?<#<" , where the url should be, and just a less than sign where the link text should be.
I've got a mytheme_links function in template.php but I disabled it and still had the problem.
I also have something like this in node.tpl.php (I use it to get better control over CSS in links):
<?php if (is_array($node->links)) { ?>
<p class="links">
<?php
global $user;
foreach ($node->links as $key => $link) {
if ($user->uid) {
print l($link['#title'],$link['#href'],$link['#attributes'], $link['#query'], $link['#fragment']) . ' ';
} else {
print ($page == 1 || (substr_count($link['#title'],'href') > 0)) ? $link['#title'] . ' ': l($link['#title'],$link['#h
ref'],$link['#attributes'], $link['#query'], $link['#fragment']) . ' ';
}
}
?>
</p>
<?php } ?>
But I replaced this with the standard code from bluemarine and I had the same problem.
Any ideas?
Thanks!
Comments
Comment #1
alexis commentedI think I've figured out this:
service_links is not using the forms API, in function _service_links_render() I changed:
to:
And now it's working. Of course you have to do this for each one of the services.
I haven't tried inserting the image of the services because I'm just relying on text links but you could easily make the change.
Sorry for not posting a patch but I think the module developer could do it better.
Regards!
Comment #2
alexis commentedI've inserted the image using some CSS. I added this rule:
Moved all the images from service_links to the directory "i" under my theme directory. You can leave them where they are but remember CSS background-image url is relative to the path of the CSS file.
Then I just added a class for the link in the function mentioned in my last post:
Do the same for the other services.
I'm bypassing the setting of the module but it should be easy using images or not, it's just a matter of setting the CSS class in the link.
I think this way designers can make changes without touching PHP, just with CSS.
Regards!
Comment #3
frjo commentedThanks for the code.
The cvs version of Service links is for 4.7 and I have no plans to start coding for 4.8 before they start to release beta versions.
In the handbook page "Converting 4.7 modules to 4.8" http://drupal.org/node/64279 the change to hook_link is explained.
Comment #4
alexis commentedHi, I just wanted to add that I made a mistake when mentioning the forms API, that's included already in service_links. What I meant was the new way how $links array is used, which, you are correct, it's a feature of CVS, and 4.8 of course.
Regards!
Comment #5
apsivam commented