News:

Wondering if this will always be free?  See why free is better.

Main Menu

[HELP] Href image issue

Started by SilverKnight, August 25, 2014, 10:09:22 PM

Previous topic - Next topic

SilverKnight

I want to add a link to the image however it does not appear around the avatar, i am not sure why, image appears fine, link is not applied. I have put the code at issue in bold.


if (!$modSettings['disable_avatar'])
[b]echo '<div style="float: right; border: 1px solid silver; padding: 1px; margin-right: 0px;">', !empty($board['last_post']['member']['avatar']) ? $board['last_post']['member']['avatar'] : '<a href="'. $board['last_post']['member']['link'] . '"><img src="'. $modSettings['avatar_url']. '/noavatar.gif" alt="" width="'. $modSettings['board_avatar_width']. '" align="middle" border="0" /> </a>', '</div>';[/b]

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $board['last_post']['link'], '</strong>  ', '<br />
<span class="smalltext">', ' ', $board['last_post']['time'],'</span>
</p>';
echo '
</td>
</tr>';


margarett

I'm looking at this on the phone, but it seems that your logic only adds the link when the last post has no avatar.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: