Simple Machines Bug and Feature Tracker
|Anonymous | Login||05-25-2013 02:32 AM|
|My View | View Issues|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004919||SMF 2.1||Template||public||2012-01-03 15:22||2012-08-14 09:24|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Summary||0004919: personal text and name could overlap the post|
|Description||If the personal text or the username are too long they could overlap the post text.|
See http://www.simplemachines.org/community/index.php?topic=464107.0 [^] for two possible fixes (css and php).
MantisBT 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group
|The same applies to custom titles|
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, '
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.
* ! 0004919: personal text and name could overlap the post