5
Smarty Remove BBCode
Smarty Remove BBCode From String
//libs/plugins/modifier.removebb.php
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage plugins
*/
/**
* smarty_modifier_removebb()
*
* @param mixed $string
* @return
*/
function smarty_modifier_removebb($string) {
$find = '|[[/!]*?[^[]]*?]|si';
$replace = '';
return preg_replace($find,$replace,$string);
}
?>
// Usage:
{$m.foo|removebb}
rated 5 times
(5)
(0)
comments: 1 / hits: 2372
/ 4 years ago, thu, nov 10, 16, 04:21:59
More From
» PHP
Comments
1
The correct code should be:
Code:
[#26] Saturday, December 28, 2019, 4:01:29

commented 1 year ago
pport
Only authorized users can post. Please sign in first, or register a free account