Anonymous Login
06-18-2018 04:44 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004919SMF 2.1Templatepublic2012-08-14 09:24
PrioritynormalSeverityminorReproducibilityhave not tried
Summary0004919: personal text and name could overlap the post
DescriptionIf the personal text or the username are too long they could overlap the post text.

See for two possible fixes (css and php).
Attached Files




emanuele (Viewer)

The same applies to custom titles


Spuds (Viewer)

Looking at this a bit .... As the thread indicates there are a couple of things we can do. First is add some css rules to the profile class second it attack it script side.

I think just adding word-wrap: break-word; overflow: hidden; to the .profile class will do most of what we want, and appears to have good browser support (old ie stuff and modern css3)

If we also want to do something php wise, maybe something easy like
// break up long display names and personal text
if ($smcFunc['strlen']($profile['personal_text']) > 24)
    $profile['personal_text'] = wordwrap($profile['personal_text'], 24, '
', true);
if ($smcFunc['strlen']($profile['real_name']) > 10)
    $profile['real_name'] = wordwrap($profile['real_name'], 10, '& shy;', true);
Or the more elegant one that Ema posted in the thread.

I don't like the shy; thing but that would be best for real_name, but the lengths here are really layout dependent so just doing the css fix seems like the best choice to me.


Spuds (Viewer)


* ! 0004919: personal text and name could overlap the post
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group