포럼
게시판 EX 호환 부분 문제 질문 안내 외 1가지
2011.11.05 17:27
게시판 EX 에서도 업데이트가 아직 없는 가운데..
호환성이 어디에 문제가 있는지 잘 모르겠습니다.
다만 확실하건, 1.4.5.10 버전의 TemplateHandler.class.php를 1.5.0.8 버전의 TemplateHandler.class.php로 교체하면,
게시판 EX가 표시됩니다.
1.4.5.10 버전
<?php class TemplateHandler extends Handler { var $compiled_path = './files/cache/template_compiled/'; ///< path of compiled caches files var $path = null; ///< target directory var $handler_mtime = 0; /** if(!$GLOBALS['__TemplateHandler__']) { /** // create tpl_file variable // set template file infos. $this->xe_path = preg_replace('/([^\.^\/]+)\.php$/i'+
','',$_SERVER['SCRIPT_NAME']); // get compiled file name // compare various file's modified time for check changed $this->buff = null; /** // initiation // if target file does not exist exit $source_template_mtime = filemtime($this->file); // cache controll // get cached buff if(!$this->buff) { $output = $this->_fetch(); // store the ending time for debug information return $output; /** // if target file does not exist exit $this->parse(); /** // read tpl file // replace value of src in img/input/script tag // loop 템플릿 문법을 변환 // cond 템플릿 문법을 변환 // |cond 템플릿 문법을 변환 // include 태그의 변환 // unload/ load 태그의 변환 // 가상 태그인 block의 변환 // replace include <!--#include($filename)--> // replace <!--@, --> // remove comments <!--// ~ --> // import xml filter/ css/ js/ files <!--%import("filename"[,optimized=true|false][,media="media"][,targetie="lt IE 6|IE 7|gte IE 8|..."])--> (media is applied to only css) // unload css/ js <!--%unload("filename"[,optimized=true|false][,media="media"][,targetie="lt IE 6|IE 7|gte IE 8|..."])--> (media is applied to only css) // javascript plugin import // replace variables // PHP 변수형의 변환 ($문자등을 공유 context로 변환) // replace parts not displaying results // prevent from calling directly before writing into file /** $__Context = &$GLOBALS['__Context__']; if($_SESSION['is_logged']) $__Context->logged_info = $_SESSION['logged_info']; ob_start(); /** /** $pre_pos = strrpos($pre, '<'); preg_match('/^ loop="([^"]+)"/i',$next,$m); $tag = substr($pre, $pre_pos). $tag. substr($next, 0, $next_pos); $tag_name = trim(substr($tag,1,strpos($tag,' '))); if(!preg_match('/ loop="([^"]+)"/is',$tag)) { preg_match_all('/ loop="([^"]+)"/is',$tag,$m); for($i=0,$c=count($m[0]);$i<$c;$i++) $vars = trim(substr($loop,$fpos+2)); $tag_head .= '<?php if(count('.$target.')) { foreach('+
'.$target.' as '.$vars.') { ?>'; if(substr(trim($tag),-2)!='/>') $buff = $pre.$tag_head.$tag.$tag_tail.$next; /** return $matches[0]; /** $pre_pos = strrpos($pre, '<'); preg_match('/<(\/|[a-z])/i',$next,$m); $tag = substr($pre, $pre_pos). substr($next, 0, $next_pos); // search end tag if(preg_match_all('/ cond=\"([^\"]+)"/is',$tag,$m)) if(!preg_match('/ cond="([^"]+)"/is',$tag)) { $tag = preg_replace('/ cond="([^"]+)"/is','', $tag); if(substr_count($tag, '<'.$tag_name) == substr_count($tag,'</'.$tag_name)) break; /** $target = $m[1]; return sprintf( /** $type = $matches[1]; if(!$attrs['target']) return $matches[0]; $web_path = $this->web_path; $target = $attrs['target']; if(!$attrs['index']) $attrs['index'] = 'null'; // if target ends with lang, load language pack // otherwise try to load xml, css, js file if(!preg_match('/^(http|https)/i',$source_filename)) // get filename and path //$base_path = implode("/",$tmp_arr)."/"; // get the ext // according to ext., import the file if($meta_file) $output = '<!--#Meta:'.$meta_file.'-->'.$output; /** $buff = substr($buff,$pos+2);
/** $tmp_arr = explode("/", $arg); $tmp2_arr = explode(".",$item1); // step1: check files in the template directory // step2: check path from root // split into path and filename // try to include return $output; /** /** /** switch(strtolower($code)) { if(substr($code, 0, 4) == 'else') { return sprintf('<?php %s %s ?>', $prefix, $output);
if(isset($matches[9])) $index = intval($matches[9]); // if given_file ends with lang, load language pack // otherwise try to load xml, css, js file // get filename and path $base_path = implode("/",$tmp_arr)."/"; // get the ext // according to ext., import the file if($meta_file) $output = '<!--#Meta:'.$meta_file.'-->'.$output; /** /** if(substr($given_file,0,1)!='/') $source_filename = sprintf("%s%s",$base_path, $given_file); // get path and file nam $base_path = implode("/",$tmp_arr)."/"; // get an ext. switch($ext) { return $output; |
1.5.0.8 버전
<?php class TemplateHandler { var $compiled_path = './files/cache/template_compiled/'; ///< path of compiled caches files var $path = null; ///< target directory var $handler_mtime = 0; function TemplateHandler() $__templatehandler_root_tpl = null; $this->xe_path = rtrim(preg_replace('/([^\.^\/]+)\.php$/i','',$_SERVER['SCRIPT_NAME']),'/'); /** if(__DEBUG__==3 ) { if(!$oTemplate) $oTemplate = new TemplateHandler(); return $oTemplate; /** // create tpl_file variable // set template file infos. $this->web_path = $this->xe_path.'/'.ltrim(preg_replace(path),'/'">'@^'.preg_quote(_XE_PATH_,'@').'|\./@','',$this->path),'/'); // get compiled file name // compare various file's modified time for check changed $skip = array(''); /** $buff = ''; // store the starting time for debug information // initiation // if target file does not exist exit // for backward compatibility $source_template_mtime = filemtime($this->file); // cache control // get cached buff if(!$buff) { $output = $this->_fetch($buff); if($__templatehandler_root_tpl == $this->file) { // store the ending time for debug information return $output; /** // if target file does not exist exit return $this->parse(); /** // read tpl file // HTML tags to skip // replace comments // replace value of src in img/input/script tag // replace loop and cond template syntax // include, unload/load, import // remove block which is a virtual tag and remove comments // form auto generation // prevent from calling directly before writing into file return $buff; /** if (strpos($m[1],'@') !== false){ // if not exists default hidden tag, generate hidden tag // return url generate $matches[0] = ''; /** $__Context = &$GLOBALS['__Context__']; if($_SESSION['is_logged']) { ob_start(); return ob_get_clean(); /** $src = $this->web_path.$src; // for backward compatibility while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src))!==$src) $src = $tmp; return substr($match[0],0,-strlen($match[1])-6)."src=\"{$src}\""; function _parseInline($buff) $tags = array_diff(array_unique($match[1]), $this->skipTags); if(!count($tags)) return $buff; $tags = '(?:'.implode('|',$tags).')'; $nodes = preg_split($split_regex, $buff, -1, PREG_SPLIT_DELIM_CAPTURE); // list of self closing tags for($idx=1,$node_len=count($nodes); $idx < $node_len; $idx+=2) { if(preg_match_all('@\s(loop|cond)="([^"]+)"@', $node, $matches)) { // if the vale of $closing is 0, it means 'skipping' // process opening tag switch($stmt) { // find closing tag if(strpos($node, '|cond="') !== false) { if($nodes[$idx] != $node) $nodes[$idx] = $node; $buff = implode('', $nodes); return $buff; function _parseResource($m) $echo = 'echo '; if($m[3]) switch($m[3]) $pathinfo = pathinfo($attr['target']); if(!$fileDir) return ''; return "<?php \$__tpl=TemplateHandler::getInstance();echo \$__tpl->compile('{$fileDir}','{$pathinfo['basename']}') ?>"; // <!--%load_js_plugin--> return "<?php Context::loadJavascriptPlugin({$plugin}); ?>"; // <load ...> or <unload ...> or <!--%import ...--> or <!--%unload ...--> if(!$isRemote) { $relativeDir = $this->_getRelativeDir($pathinfo['dirname']); $attr['target'] = $relativeDir.'/'.$pathinfo['basename']; switch($pathinfo['extension']) $result = "<?php {$result} ?>"; return $result; // <!--@..--> such as <!--@if($cond)-->, <!--@else-->, <!--@end--> $precheck = ''; return $m[0]; function _getRelativeDir($path) $fileDir = strtr(realpath($this->path),'\\','/'); // for backward compatibility if($idx !== false) { $path = preg_replace('/^'.preg_quote(_XE_PATH_,'/').'/', '', $path); return $path; /** /* End of File: TemplateHandler.class.php */ |
위에서도 확실하게 차이가 있고, 바꾸면 아래와 같은 문제가 있습니다.
정확하게 어느 값이 없는지 알고 싶습니다. 아시는 분 계신가요?
1. 일부 스킨에서는 게시판 관리 버튼과 목록 버튼이 겹쳐집니다.
2. FAQ, 각종 게시판에서 게시판 생성시 모듈 이름, 다국어 설정 등을 비롯하여 일부 목록이 보이지 않습니다.
3. 로그온 관리, 개인 정보 수정 등이 제대로 표시되지 않습니다.
4. 게시글 작성시 에디터가 정상적으로 표시되지 않습니다
5. DB 오류가 간혈적으로 발생합니다.
1.5.0.8이 나오기 전에 XE나 EX 게시판이 호환이 되어야 할것 같습니다만,
EX 게시판의 업데이트 중단 선언 게시글이 오래전에 적혀있어서,
게시판에 추가되었으면 하는 사항을 몇 가지 적습니다.
1. 분류관리의 새로워짐이 있다면 좋겠습니다. EX의 좌측메뉴, 우측메뉴, 콤보박스등이 대표적으로 좋았습니다.
2. 포인트를 등록해서 자료나, 전송이 가능한 포인트샵을 만들수 있어서 운영에 좋았습니다.
외 1가지 추가
회원 가입후 닉네임 간에 스페이스 공간이 갑자기 인식되지 않습니다.
예를 들어 희망과의 서약 이라 가입 하면 희망과의서약으로 정정됩니다.
이리 되면 DB에서 일일히 수정을 해야하는데.,
다음 버전에서 이부분 수정 부탁드리겠습니다.
댓글 0
글쓴이 | 제목 | 최종 글 |
---|---|---|
희망과의서약 | 게시판 EX 호환 부분 문제 질문 안내 외 1가지 | |
銀童 | ob_gzhandler 옵션에 관해서 [6] | 2011.11.05 by 쏘프티 |
roks821 | 페이지 편집을 html 편집 가능하게 [3] | 2011.11.05 by roks821 |
misol | 저작권 어떻게 생각하세요? [3] | 2020.03.14 by Garon |
Yosida_sakura | 1.5 미만 사용자들을 위한 보안패치는 게속 해줄까요? [5] | 2011.11.04 by snows96 |
Community | 혹시 DB에 자동으로 게시판 분류 사용과.... | |
snows96 | XE 1.5에서 약관 수정해도 반영안될 시 해결방법 | |
까멸 | 관리자 모드로 회원삭제시 오류 | |
우진홈 | XE와 큐브리드는 앞으로 어떤 관계로...? [12] | 2011.11.04 by tobor |
도라란 | 설문조사도 좀더 개발되면 좋을텐데요.. | |
자래보자 | 비회원 다운로드 문제점입니다 [5] | 2011.11.04 by we09 |
까멸 | 파일첨부가 안됩니다ㅠㅠ | |
rjsoo | 1.5.0.7 웹로딩 빠르게 하는 방법 (xe 사용팁에서 링크 걸음) [9] | 2011.11.04 by NA답답이 |
roks821 | 콘탠트위젯 정상화는? - 해결완료 ??? -_- [8] | 2011.11.04 by ForHanbi |
가브리엘조 | 1.5 문제있습니다. 해결방법있나요? [1] | 2011.11.04 by magosu |
가브리엘조 | 1.5 게시판 생성 및 삭제 어디갔죠? [1] | 2011.11.03 by rjsoo |
섹시한과쟈 | 일정 주기로 버전 업그레이드를 해주시면 좋겠네요.+메뉴관련 [2] | 2011.11.03 by 에릭리카드 |
카이네드 | 자료실이 하루 빨리 개선되었으면 좋겠습니다. [3] | 2011.11.03 by Cody |
악의미소 | html5 사용시 문제점 .. | |
magosu | 공홈에서 에디터일부기능이 제대로 작동안됩니다. [4] | 2011.11.03 by snows96 |