What's the best way to go about removing the trailing three dots (ellipsis: ...) that are added to the trimmed content titles in the {writeNewestRow} and {writeTopTenRow} outputs?
Thanks,
Ed
Removing three dots / ellipsis in newest and topten display
Moderator: Thorsten
Never mind, I found it...
In functions.php, I just removed the ellipsis from the line
I was worried that this line:
would create a trailing space at the end of the link, but it doesn't seem to have happened (at least in Firefox and IE). Here's the whole thing below, in case someone else wants to do the same. (I'm doing it because I'll be reviewing all content and creating a brief "title" and incorporating the longer question in the answer block.)
Ed
Code: Select all
$shortStr .= "...";Code: Select all
$str = ereg_replace("[[:space:]]+", " ", $str);Ed
Code: Select all
function makeShorterText($str, $char)
{
$str = ereg_replace("[[:space:]]+", " ", $str);
$arrStr = explode(" ", $str);
$shortStr = "";
$num = count($arrStr);
if ($num > $char) {
for ($j = 0; $j <= $char; $j++) {
$shortStr .= $arrStr[$j]." ";
}
$shortStr .= "";
}
else {
$shortStr = $str;
}
return $shortStr;
}