diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8e30e2cf0d..c39dd34822 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-06-25 Sergio Martin + + * include/functions_ui.php: Adding a parameter to + printTruncateText to personalize the suffix string + of a truncate string + 2010-06-25 Sergio Martin * include/functions_ui.php: Changed substr() to diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 8ae375192b..9a5fa6c6c3 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -28,10 +28,11 @@ * @param boolean $showTextInAToopTip Flag to show the tooltip. * @param boolean $return Flag to return as string or not. * @param boolean $showTextInTitle Flag to show the text on title. + * @param string $suffix String at the end of a strimmed string. */ -function printTruncateText($text, $numChars = 25, $showTextInAToopTip = true, $return = true, $showTextInTitle = true) { +function printTruncateText($text, $numChars = 25, $showTextInAToopTip = true, $return = true, $showTextInTitle = true, $suffix = '…') { if (strlen($text) > ($numChars - 1)) { - $truncateText = mb_strimwidth($text, 0, ($numChars - 1)) . '…'; + $truncateText = mb_strimwidth($text, 0, ($numChars - 1)) . $suffix; if ($showTextInTitle) { $truncateText = ''.$truncateText.'';