Some interesting findings from web-dev land…
Might be useful for someone, I wrote it to handle dynamic select menus. Particularity when listing URLs.
1234567891011121314151617181920212223242526272829<?php
/**
* Smarty truncate_left modifier plugin
*
* Type: modifier<br />
* Name: truncate_left<br />
* Purpose: truncates left hand side of a string
* @link: none
* @param string
* @param integer
* @param string
* @return string
*/
function smarty_modifier_truncate_left($string, $threshold=80, $replacement=’&hellip;’) {
if(strlen($string) >= $threshold){
$amount_over = count($string) – $threshold;
$output [...]