document.item.php
 
// If not exists, file an image file from the content
if(!$source_file)
{
$content = $this->get('content');
$target_src = null;
preg_match_all('/<\s*img[^>]*src\s*=\s*["\']?([^"\']*)/i', $content, $matches, PREG_SET_ORDER);
$cnt = count($matches);
for($i=0;$i<$cnt;$i++)
{
$target_src = trim($matches[$i][1]);
if(preg_match('/\/(common|modules|widgets|addons|layouts)\//i', $target_src)) continue;
else
{
if(!preg_match('/^(http|https):\/\//i',$target_src)) $target_src = Context::getRequestUri().$target_src;
 
$tmp_file = sprintf('./files/cache/tmp/%d', md5(rand(111111,999999).$this->document_srl));
if(!is_dir('./files/cache/tmp')) FileHandler::makeDir('./files/cache/tmp');
FileHandler::getRemoteFile($target_src, $tmp_file);
if(!file_exists($tmp_file)) continue;
else
{
list($_w, $_h, $_t, $_a) = getimagesize($tmp_file);
// if($_w<$width || $_h<$height) continue;
 
$source_file = $tmp_file;
$is_tmp_file = true;
break;
}
}
}
}

skyo

?
XE타운 관리자 입니다.
관리자 아닌것 같지만 제이쿼리 엔지가 없는게 매력인 관리자 입니다.