hi,
When using Service Link and set the "Service link styles" to "Only Image", the bookmark area shows the content with html only, please see attachment. Is there any thing wrong with it?

By the way, if I choose "Only text", the bookmark link shows correctly.

Thanks,
Ray.

Comments

darkkin’s picture

+1

TheCrow’s picture

I don't note this error,
where the "src" attribute point?
can you open this image directly?

could be a local trouble ...

darkkin’s picture

Hi, TheCrow.
When I enable service_links "Only Image" in my custom theme then I see the same error like in post #1, but when I use other theme like Garland the error disappears. Probably problem in my custom theme?

TheCrow’s picture

so seem darkkin... your theme derive from another one? or it's write from zero?
How i can reproduce the error?

darkkin’s picture

Thanks for your answer, TheCrow.

I write my theme from zero, using Zen.
I can send you theme files on e-mail that you could reproduce an error.

TheCrow’s picture

Probably due to a double escape of 'title' field in the theme_links hook (template.php)

TheCrow’s picture

Status: Active » Fixed

After examinate the trouble in darkkin's theme and solved it, i consider this issue closed

Kendall Totten’s picture

Status: Fixed » Needs work
StatusFileSize
new18.63 KB

"Posted by TheCrow on September 26, 2010 at 7:08am
Probably due to a double escape of 'title' field in the theme_links hook (template.php)"

What do you mean? I am having the same problem... how do I fix this? Thanks.

TheCrow’s picture

Into the file template.php of your theme you should have a function like phptemplate_links() or themename_links() that overwrite the standard theme function and introduce a row which escape the title of link through check_plain() function:

in the theme i was inspecting i found

      if (isset($link['href'])) {
        $link['title'] = '<span>' .  check_plain($link['title']) . '</span>';
        $link['html'] = TRUE;
        // Pass in $link as $options, they share the same keys.
        $output .= l($link['title'], $link['href'], $link);
      }

and i replaced it with:

      if (isset($link['href'])) {
        $link['title'] = '<span>' . $link['title'] . '</span>';
        $link['html'] = TRUE;
        // Pass in $link as $options, they share the same keys.
        $output .= l($link['title'], $link['href'], $link);
      }
mattwmc’s picture

Version: 6.x-2.x-dev » 6.x-2.0
StatusFileSize
new8.9 KB

Nevermind! Had to configure in block setting.

TheCrow’s picture

hi matt your template.php seem ok, i tried your theme and all work, maybe some other module reimplement this function or alter the normal links render...

mattwmc’s picture

Thanks for the quick reply.

I got it to work! Great mod!

TheCrow’s picture

Category: bug » support
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jenlampton’s picture

Title: Service Link Images Cannot Display Correctly » Service Link Images Cannot Display
Status: Closed (fixed) » Active

This problem is not related to theme_links() since it also exists in the service links blocks.

I have enabled the "Service links block for not-node pages" (though I think you meant non-node pages) and the images will not appear when the style is "Image" or "Image and text". The text appears correctly when the sytle is "Image and text" or "Text".

The problem is in your service_links_expand_path() function. For some reason it is returning /sites/all/modules/service_links when that's not where I have my module.

Here's the problem: in service_links.admin.inc on line 140 you are setting the default value of "Alternative icon's folder" when there should only be a value saved to the db when the service_links icons are not being used.

jenlampton’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Assigned: Unassigned » jenlampton
Status: Active » Needs review
StatusFileSize
new971 bytes

Here's a patch for the dev branch, but the same fix works on 2.0.

This will include the "current" location of images in the description text, just in case people are curious, but will not save anything to the db unless that path needs to be overridden.

TheCrow’s picture

Assigned: jenlampton » Unassigned
Status: Needs review » Closed (fixed)

Hi jenlampton,

I confirm that the issue raised here is fixed in the theme function (watch the image attached in the original post and u will understand that what u say is totally out-context)

I also have enabled the "only image" style for not nodes block and it work perfect with the latest dev version.

service_links_expand_path() has been changed in one of the latest commits, try it again and open an issue if u are sure that there is a bug!