public static function tags($var){
then add this
$var = self::img_njobo($var);
$var = self::ndelik($var);
external images using curl [img]HTTP[/img]
then put this code :
private static function img_njobo($var) {
/*mod on jcms by @jimy/@ironyzm & @radya -- please do not remove this */
return preg_replace_callback('#\[img\](.*?)\[/img\]#si', function($img) {
$curl = curl_init($img[1]);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_exec($curl);
$mime = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
curl_close($curl);
if (!in_array($mime, array('image/png', 'image/jpeg', 'image/gif', 'image/x-png'))) {
return '<strong class="red">[BROKEN IMAGE]</strong>';
} else {
return '<img src="' . $img[1] . '" alt="' . core::$system_set['copyright'] . '"/>';
}
}, $var);
}
AND BBCODE [hide]CONTENT[/hide]
private static function ndelik($var) {
if (!function_exists('ndelik')) {
function ndelik($hide) {
global $user_id;
if(!$user_id) {
return '<strong class="red" title="Sign in to see this content.">[hidden content]</strong>';
} else {
return '' . $hide[1] . '';
}
}
}
return preg_replace_callback('#\[hide\](.*?)\[/hide\]#si', 'ndelik', $var);
}
work on my jcms v450 - 510..
sory i only give tutorials