2013-03-09, 02:58 PM
Hi friends,
today I was styling up a bit my board's Control panels and I asked myself why MyBB doesn't come with text-overflow CSS property applied to long text by default.
For example, at line 1590 of usercp.php the thread subject is capped to 25 words:
This correctly prevents extremely long subjects to go out of its container. But the title maximum length is quite static. You can't change it unless you modify the core, but there's a pretty CSS trick we can use to automatically cap long text inside a container: text-overflow.
Its ellipsis value should be a valid replacement for unuseful PHP replacing functions and it can be used to make the text cap limit more dynamic in my opinion. Do you think it's worth to include this in MyBB 1.8 default theme?
today I was styling up a bit my board's Control panels and I asked myself why MyBB doesn't come with text-overflow CSS property applied to long text by default.
For example, at line 1590 of usercp.php the thread subject is capped to 25 words:
$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
This correctly prevents extremely long subjects to go out of its container. But the title maximum length is quite static. You can't change it unless you modify the core, but there's a pretty CSS trick we can use to automatically cap long text inside a container: text-overflow.
Its ellipsis value should be a valid replacement for unuseful PHP replacing functions and it can be used to make the text cap limit more dynamic in my opinion. Do you think it's worth to include this in MyBB 1.8 default theme?