bb image with curl

523
.
Добавлено: 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
Прикрепленные файлы:
.
(\/)____o_O____(\/)
jimy, use http://php.net/manual/en/funct ... e.php
http://johncms.com/forum/index ... 42230
.
wow, never try that Koenig. how to use it on bbcode?
.
(\/)____o_O____(\/)
jimy, Just make sure that the link is an image and an html print
without curl
.
(\/)____o_O____(\/)
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?
.
(\/)____o_O____(\/)
jimy, http://johncms.com/forum/index ... =5171
.
jimy
thx Koenig this what I need +5
Всего: 8