* Name: to_url
* Purpose: adds http:// to the begining of a string if it contains no protocol * @author SugarCRM * @param string The link to modify * @return string The converted link */ function smarty_modifier_to_url($string) { if (preg_match('/^[^:\/]*:\/\/.*/', $string)) { return $string; } else { return 'http://' . $string; } } ?>