Changeset 4265

Show
Ignore:
Timestamp:
06/10/2008 01:14:52 PM (3 months ago)
Author:
zero
Message:

#471 rss출력시 Context::transContent()를 거치도록 하고 이미지갤러리/인용구의 결과물 방식에 따른 결과물 형태를 다르게 하는 코드를 삽입

Location:
sandbox/modules
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • sandbox/modules/editor/components/image_gallery/image_gallery.class.php

    r2572 r4265  
    5252            $gallery_info->images_list = explode("\n",trim($images_list)); 
    5353 
     54            // 만약 출력설정이 XML일 경우 이미지 목록만 출력하도록 코드 생성 
     55            if(Context::getResponseMethod() == 'XMLRPC') { 
     56                $output = ''; 
     57                for($i=0;$i<count($gallery_info->images_list);$i++) { 
     58                    $output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]); 
     59                } 
     60                return $output; 
     61            } 
     62 
     63            // HTML 출력일 경우 템플릿 변환을 거쳐서 갤러리 출력 설정에 맞는 html코드를 생성하도록 함 
    5464            preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches); 
    5565            $gallery_info->width = trim($matches[3][0]); 
  • sandbox/modules/editor/components/quotation/quotation.class.php

    r2775 r4265  
    5656            $body = $xml_obj->body; 
    5757 
     58            if(Context::getResponseMethod() == 'XMLRPC') { 
     59                return $body; 
     60            } 
     61 
    5862            $output = ""; 
    5963            $style = sprintf('margin:%spx;padding:%spx;background-color:#%s;', $margin, $padding, $bg_color); 
  • sandbox/modules/rss/rss.view.php

    r4219 r4265  
    127127            Context::setResponseMethod("XMLRPC"); 
    128128 
     129            // 결과물을 얻어와서 에디터 컴포넌트등의 전처리 기능을 수행시킴 
     130            $path = $this->module_path.'tpl/'; 
     131            if($args->start_date || $args->end_date) $file = 'xe_rss'; 
     132            else $file = 'rss20'; 
     133 
     134            $oTemplate = new TemplateHandler(); 
     135            $oContext = &Context::getInstance(); 
     136 
     137            $content = $oTemplate->compile($path, $file); 
     138            $content = $oContext->transContent($content); 
     139            Context::set('content', $content); 
     140 
    129141            // 템플릿 파일 지정 
    130             $this->setTemplatePath($this->module_path.'tpl/'); 
    131  
    132             if($args->start_date || $args->end_date) $this->setTemplateFile('xe_rss'); 
    133             else $this->setTemplateFile('rss20'); 
     142            $this->setTemplatePath($path); 
     143            $this->setTemplateFile('display'); 
    134144        } 
    135145