MyBB Community Forums

Full Version: show fully text in lastest post column
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello
help me.i want the title of every posts in 'lastest post' column shows fully,if the title is longer than the width of 'lastest post',it will go to the second line and the width of 'lastest post' column doesn't change

instead of limiting the length in index.php with "..."
sorry for my english
thanks everyone
noone reply me
who can help me plzzzzzzzzzz!
This code i supposed to do it, but for some reason the \n aint working =z =P

							if(strlen($lastpostsubject) > 25)
							{			
								$lastpostsubject = substr($lastpostsubject, 0, 25)."\n".substr($lastpostsubject,25,strlen($lastpostsubject));
							}

But words will be cut off in ordinary ways =z The fulltext of the threadtitle is already showed in the alt-tag.
hello.i tried your code,the text show fully but it changes the width of "lastest post" colum.is there any way to keep the width and the text come to second line?
thanks
asmilewyt Wrote:hello.i tried your code,the text show fully but it changes the width of "lastest post" colum.is there any way to keep the width and the text come to second line?
thanks

If you read what i said, you will see i said the \n aint working ( \n = new line ). Just hover with your mouse over the latest post, wait a second and you also will see the fulltext.
Open the file index.php and search for:
if(strlen($lastpostsubject) > 25)
{
$lastpostsubject = substr($lastpostsubject, 0, 25) . "...";
}
Replace with:
$lastpostsubject = wordwrap($lastpostsubject, 4, "<br />" );

See also: http://www.php.net/manual/en/function.wordwrap.php