MyBB Community Forums

Full Version: "Last post" display too long
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
is there a a way to reduce the length of auto generated post titles that go into the forumbit_depth2_forum_lastpost template?

Like for here: [Image: KuayvXS.png]
The text is a bit too long, and creates a new line, forcing the table layout to get all messed up.

Here is the page it happens on, if you would like to try messing around with the html to find a better way of solving the breaking issue:
http://www.bronyville.me/forum/Forum-RuneScape
Would be useful to know. Smile
It is your theme causing this issue as it is a fluid width theme. There are several ways of solving this, the easiest would probably be to set a minimum width to each column. This would obviously mean that your forum wouldn't be completely fluid any more though. Let me know what browser sizes you use most often and I can help you with the exact code.
In line 273 of inc/functions_forumlist.php, find:

$lastpost_subject = $full_lastpost_subject = $parser->parse_badwords($lastpost_data['lastpostsubject']);
					if(my_strlen($lastpost_subject) > 25)
					{
						$lastpost_subject = my_substr($lastpost_subject, 0, 25)."...";
					}

and change both instances of '25' to whichever value you prefer.
I found that changing the entire width of the "container" style fixed the issue.

(2013-02-09, 04:31 PM)Tindris Wrote: [ -> ]It is your theme causing this issue as it is a fluid width theme. There are several ways of solving this, the easiest would probably be to set a minimum width to each column. This would obviously mean that your forum wouldn't be completely fluid any more though. Let me know what browser sizes you use most often and I can help you with the exact code.


I tried to do that, but it does not work since there is a nested table within the template for forumbit_depth2_forum (I had to use that to fix layouts because of a plugin I was using, could have used divs, but this was much simpler)




(2013-02-09, 04:41 PM)Wildcard Wrote: [ -> ]In line 273 of inc/functions_forumlist.php, find:

$lastpost_subject = $full_lastpost_subject = $parser->parse_badwords($lastpost_data['lastpostsubject']);
					if(my_strlen($lastpost_subject) > 25)
					{
						$lastpost_subject = my_substr($lastpost_subject, 0, 25)."...";
					}

and change both instances of '25' to whichever value you prefer.

Thanks! Good to know for future reference, I would have used this now had i not found a work around. ^^