Properly update to smarty 3.1.27.

(cherry picked from commit a02262a)
This commit is contained in:
DariusIII
2015-06-24 00:47:04 +02:00
parent ff04d8d428
commit febc882e79
13 changed files with 879 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty magicurl modifier plugin
*
* Type: modifier<br>
* Name: magicurl<br>
* Purpose: turn www addresses into hyperlinks
* @author bb
* @param string
* @return string
*/
function smarty_modifier_magicurl($str, $dereferrer="") {
return preg_replace('/(https?):\/\/([A-Za-z0-9\._\-\/\?=&;%]+)/is', '<a href="'.$dereferrer.'$1://$2" target="_blank">$1://$2</a>', $str);
}
?>