esotalk / esoTalk

Fat-free forum software.
GNU General Public License v2.0
1.47k stars 237 forks source link

Display issue with long username #361

Open tvb opened 9 years ago

tvb commented 9 years ago

See the screenshot below, due to the long username and the translation to dutch of 'posted x minutes ago' the total <span> is expanding beyond the post count.

screen shot 2014-10-21 at 22 36 42

The span is created by memberLink(); but since it is a general function I could not really alter that. So I have solved it with the following code in conversations.php:

"<span class='lastPostMember name'><a href='".URL(memberURL($conversation["lastPostMemberId"], $conversation["lastPostMember"]))."' title='".sprintf(sanitizeHTML(T("View %s's profile")), $conversation["lastPostMember"])."'>".(strlen($conversation["lastPostMember"]) > 15 ? substr($conversation["lastPostMember"],0,12).'...' : $conversation["lastPostMember"])."</a></span>",

Really dirty fix but I could not get it to work with CSS text-overflow: ellipsis; Do you know an better solution @tobscure ?

jamesn81 commented 9 years ago

Just about to post about the same little issue here - time gets cut off with long usernames.