Добавлено: 31.05.2017 / 00:25
package :
bbcode jcms 7.1.0 with curl in checkin file extention info
nb. for older engine see this
http://johncms.com/forum/index ... =5744
Добавлено: 31.05.2017 / 00:28
requirement :
1. active curl modul on php server.
live demo :
CROTS
wow, never try that Koenig. how to use it on bbcode?
jimy, Just make sure that the link is an image and an html print
without curl
jimy,
private function higlite_img($var) {
return preg_replace_callback('#\[img\](.*?)\[/img\]#si', function($img) {
list($width, $height, $type, $attr, $mime) = getimagesize($img[1]);
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="' . $this->homeUrl . '" title="' . $this->homeUrl . ' external image" class="image"/>';
}
}, $var);
}
can it use for video or audio file too?
thx Koenig this what I need +5