mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1553 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d3aa224003
commit
0b7a4fc71b
2 changed files with 31 additions and 11 deletions
|
|
@ -91,7 +91,7 @@
|
|||
$buff = preg_replace_callback('!<\!--#include\(([^\)]*?)\)-->!is', array($this, '_compileIncludeToCode'), $buff);
|
||||
|
||||
// 이미지 태그 img의 src의 값이 http:// 나 / 로 시작하지 않으면 제로보드의 root경로부터 시작하도록 변경
|
||||
$buff = preg_replace_callback('!img([^>]*)src=[\'"]{1}(.*?)[\'"]{1}!is', array($this, '_compileImgPath'), $buff);
|
||||
$buff = preg_replace_callback('!(img|input)([^>]*)src=[\'"]{1}(.*?)[\'"]{1}!is', array($this, '_compileImgPath'), $buff);
|
||||
|
||||
// 변수를 변경
|
||||
$buff = preg_replace_callback('/\{[^@^ ]([^\}]+)\}/i', array($this, '_compileVarToContext'), $buff);
|
||||
|
|
@ -130,14 +130,14 @@
|
|||
**/
|
||||
function _compileImgPath($matches) {
|
||||
$str1 = $matches[0];
|
||||
$str2 = $matches[2];
|
||||
$path = $str2;
|
||||
$str2 = $path = $matches[3];
|
||||
|
||||
if(!eregi("^([a-z0-9\_\.])",$path)) return $str1;
|
||||
|
||||
$path = preg_replace('/^(\.\/|\/)/','',$path);
|
||||
$path = '<?=$this->tpl_path?>'.$path;
|
||||
return str_replace($str2, $path, $str1);
|
||||
$output = str_replace($str2, $path, $str1);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue