![]() |
Text too long
How do you control the feature title text length on the front page? By either making it wrap (I guess this would be controlled by the TD width) or by giving it a limit withe the ... at the end.
|
You could use the Smarty truncate function to accomplish this:
http://smarty.php.net/manual/en/lang...r.truncate.php |
Where do I edit this? in the home.tpl.php
|
Humn, nobody knows this answer above?
PHP Code:
|
If that is the portion you are wanting to change you will have to truncate it through the Smarty plugin and will not be able to do it through the template file.
This file will not be encrypted however you will need to be familiar with php to alter it. |
Quote:
Code:
$output.=$loop[$x][title] ."<br />"; |
I'm gonna keep asking until somebody answers me, sorry.
Where in the functions.feature_listings_horizontal.php is this done to make the title text limited? |
I thought you found the answer?
You the code you posted is the title so you will need to use some type of php function to trim it to the amount of characters you want. |
Quote:
|
Replace:
$output.=$loop[$x][title] ."<br />"; With: $limit = '25'; // Set to your preference $textin = $loop[$x][title]; if(strlen($textin)>$limit){ $textin = substr($textin,0,$limit); $textout = substr($textin,0,-(strlen(strrchr($textin,' '))) )."…";} else{$textout = $textin;} $output.=$textout ."<br />"; This shortens the string to whatever you specify as the limit, drops any word fragment, and ads the ellipsis (…) |
| All times are GMT -4. The time now is 11:33 AM. |
Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.