Advertisement:
Anonymous Login
12-05-2016 07:48 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004919SMF 2.1Templatepublic2012-08-14 09:24
Reporteremanuele 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
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 http://www.simplemachines.org/community/index.php?topic=464107.0 for two possible fixes (css and php).
Tags2.1
Attached Files

-Relationships
+Relationships

-Notes

bugnote:0014540

emanuele (Viewer)

The same applies to custom titles

bugnote:0014615

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.

bugnote:0014621

Spuds (Viewer)

Commit:a01bffb33b3c9e3e7fe1a53ef44cd964867d1893

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