As displayed on the screen the forum postings have duplicate images for edit delete and reply links.

In the css file advanced-forum.blue_lagoon.images.css the following css for the edit small icons is as follows:

/* Edit */
.comment-edit .af-button-small span,
.post-edit .af-button-small span {
  background: url(images/post_edit.png) no-repeat;
}

in advanced_forum.module the following line wraps a span around the link

$links[$key]['title'] = '<span>' . $links[$key]['title'] . '</span>';

It seems drupal already by default wraps a span tag around link text.

This gives the following as an example for the edit link

<span>
<span>edit</span>
</span>

So you end up with two nested span tags around the edit delete and reply links and the two span tags with the css applied to them each get an image.

I still would like a separate span for the icon so can we change the span as follows?

$links[$key]['title'] = '</span><span ID="af-small-button-text" >' . $links[$key]['title'];

This still gives a span for the icon and adds an ID to the span for the text.

Then add to the css the following:

/* suppress image on link text span */
#af-small-button-text {
background-image:none;
}

Comments

troky’s picture

Category: bug » support

I believe something else is messing with links here because I don't see double <span> tags around button title.
theme_links function will put <span> tag around button title only if button doesn't have link/href associated with it.

den33775’s picture

I had the same problem, and with firebug it showed two nested span tags. I tried the solution above by inventlogic and it still had double icons. I simply deleted line 391 of advanced_forum.module and it worked perfectly with only one span tag (added by drupal or theme, not sure which).

Thanks to inventlogic and troky for pointing me in the right direction. If either of you can see a problem I've set myself up for with this approach, please do let me know. :)

Best wishes
den33775