Changeset 5992

Show
Ignore:
Timestamp:
05/21/08 23:33:00 (8 months ago)
Author:
inureyes
Message:

#981

  • 스킨 검색 추가
Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/components/Textcube.Function.Setting.php

    r5830 r5992  
    33/// All rights reserved. Licensed under the GPL. 
    44/// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 
     5 
     6global $__gCacheBlogSettings; // share blog.service.php 
    57class setting { 
    68    function fetchConfigVal( $DATA ){ 
  • trunk/doc/changes_ko

    r5991 r5992  
    2121 * 관리자  : 관리 패널 UI에서 큰 메뉴의 하위 메뉴를 마우스 얹기로 보기 지원 (#961) 
    2222 * 관리자  : 플러그인 메뉴에서 플러그인 검색 지원 (#981) 
     23 * 관리자  : 스킨 선택 메뉴에서 설치된 스킨 검색 지원 (#981) 
    2324 * 스킨    : 스킨 편집시 스킨의 부분만을 편집할 수 있도록 영역별 탭 지원 (#952) 
    2425 * 스킨    : 현재 편집중인 스킨의 html을 내려 받는 기능 추가 (#952) 
  • trunk/interface/owner/skin/index.php

    r5926 r5992  
    66require ROOT . '/lib/piece/owner/header.php'; 
    77 
     8if(isset($_POST['search'])) { 
     9    $search = $_POST['search']; 
     10} else $search = null; 
     11 
    812$skins = array(); 
    913$dirHandler = dir(ROOT . "/skin"); 
    1014while ($file = $dirHandler->read()) { 
     15    $skin = array(); 
    1116    if ($file == '.' || $file == '..') 
    1217        continue; 
     
    1823    if (file_exists(ROOT . "/skin/$file/preview.gif")) 
    1924        $preview = "{$service['path']}/skin/$file/preview.gif"; 
    20     array_push($skins, array('name' => $file, 'path' => ROOT . "/skin/$file/", 'preview' => $preview)); 
     25     
     26    if (file_exists(ROOT . "/skin/$file/index.xml")) { 
     27        $xml = file_get_contents(ROOT . "/skin/$file/index.xml"); 
     28        $xmls = new XMLStruct(); 
     29        $xmls->open($xml, $service['encoding']); 
     30        $skin['skinName']     = $xmls->getValue('/skin/information/name'); 
     31        $skin['version']  = $xmls->getValue('/skin/information/version'); 
     32        $skin['license']  = $xmls->getValue('/skin/information/license'); 
     33        $skin['maker']    = $xmls->getValue('/skin/author/name'); 
     34        $skin['homepage'] = $xmls->getValue('/skin/author/homepage'); 
     35        $skin['email']    = $xmls->getValue('/skin/author/email'); 
     36        $skin['description'] = $xmls->getValue('/skin/information/description'); 
     37    } 
     38 
     39    if(!empty($search) &&  
     40        (stristr($skin['skinName'],$search) === false) &&  
     41        (stristr($skin['maker'],$search) === false) && 
     42        (stristr($skin['homepage'],$search) === false) && 
     43        (stristr($skin['email'],$search) === false) && 
     44        (stristr($skin['description'],$search) === false)) continue; // Search. 
     45 
     46    $skin['name'] = $file; 
     47    $skin['path'] = ROOT . "/skin/$file/"; 
     48    $skin['preview'] = $preview; 
     49     
     50    array_push($skins, $skin); 
    2151} 
    2252 
     
    180210                                            <table cellspacing="0" cellpadding="0"> 
    181211<?php 
    182     if (file_exists(ROOT . "/skin/{$skin['name']}/index.xml")) { 
    183         $xml = file_get_contents(ROOT . "/skin/{$skin['name']}/index.xml"); 
    184         $xmls = new XMLStruct(); 
    185         $xmls->open($xml, $service['encoding']); 
    186         writeValue('<span class="skin-name">' . $xmls->getValue('/skin/information/name') . '</span> <span class="version">ver.' . $xmls->getValue('/skin/information/version') . '</span>', _t('제목'), "title"); 
    187         writeValue($xmls->getValue('/skin/information/license'), _t('저작권'), "license"); 
    188         writeValue($xmls->getValue('/skin/author/name'), _t('만든이'), "maker"); 
    189         writeValue($xmls->getValue('/skin/author/homepage'), _t('홈페이지'), "homepage"); 
    190         writeValue($xmls->getValue('/skin/author/email'), _t('e-mail'), "email"); 
    191         writeValue($xmls->getValue('/skin/information/description'), _t('설명'), "explain"); 
     212    if (isset($skin['skinName'])) { 
     213        writeValue('<span class="skin-name">' . $skin['skinName'] . '</span> <span class="version">ver.' . $skin['version']. '</span>', _t('제목'), "title"); 
     214        writeValue($skin['license'], _t('저작권'), "license"); 
     215        writeValue($skin['maker'], _t('만든이'), "maker"); 
     216        writeValue($skin['homepage'], _t('홈페이지'), "homepage"); 
     217        writeValue($skin['email'], _t('e-mail'), "email"); 
     218        writeValue($skin['description'], _t('설명'), "explain"); 
    192219    } else { 
    193220        writeValue($skin['name'], _t('제목')); 
     
    207234?> 
    208235                            </div> 
    209                         </div> 
    210                                  
     236                            <hr class="hidden" /> 
     237                            <form id="skin-search-form" class="data-subbox" method="post" action="<?php echo $blogURL;?>/owner/skin"> 
     238                                <h2><?php echo _t('검색');?></h2> 
     239                                <div class="section"> 
     240                                    <label for="search"><?php echo _t('제목');?>, <?php echo _t('내용');?></label> 
     241                                    <input type="text" id="search" class="input-text" name="search" value="<?php echo htmlspecialchars($search);?>" onkeydown="if (event.keyCode == '13') {  document.getElementById('search-form').submit();return false; }" /> 
     242                                    <input type="submit" class="search-button input-button" value="<?php echo _t('검색');?>" onclick="document.getElementById('search-form').submit();return false;" /> 
     243                                </div> 
     244                            </form> 
     245                        </div> 
    211246                        <div id="part-skin-more" class="part"> 
    212247                            <h2 class="caption"><span class="main-text"><?php echo _t('스킨을 구하려면');?></span></h2> 
  • trunk/lib/blog.skin.php

    r5976 r5992  
    8585    function Skin($name, $previewMode = false) { 
    8686        global $service, $blogURL, $suri, $blog; 
    87         //$this->noneCommentMessage = setting::getBlogSettingGlobal('noneCommentMessage'); 
    88         //$this->singleCommentMessage = setting::getBlogSettingGlobal('singleCommentMessage'); 
    89         //$this->noneTrackbackMessage = setting::getBlogSettingGlobal('noneTrackbackMessage'); 
    90         //$this->singleTrackbackMessage = setting::getBlogSettingGlobal('singleTrackbackMessage'); 
    9187        if($previewMode == true || ($service['skincache'] != true) || !$this->loadCache()) { 
    92             $this->noneCommentMessage = $blog['noneCommentMessage']; 
    93             $this->singleCommentMessage = $blog['singleCommentMessage']; 
    94             $this->noneTrackbackMessage = $blog['noneTrackbackMessage']; 
    95             $this->singleTrackbackMessage = $blog['singleTrackbackMessage']; 
     88            requireComponent('Textcube.Function.Setting'); 
     89            $this->noneCommentMessage = setting::getBlogSettingGlobal('noneCommentMessage',null); 
     90            $this->singleCommentMessage = setting::getBlogSettingGlobal('singleCommentMessage',null); 
     91            $this->noneTrackbackMessage = setting::getBlogSettingGlobal('noneTrackbackMessage',null); 
     92            $this->singleTrackbackMessage = setting::getBlogSettingGlobal('singleTrackbackMessage',null); 
     93            //$this->noneCommentMessage = $blog['noneCommentMessage']; 
     94            //$this->singleCommentMessage = $blog['singleCommentMessage']; 
     95            //$this->noneTrackbackMessage = $blog['noneTrackbackMessage']; 
     96            //$this->singleTrackbackMessage = $blog['singleTrackbackMessage']; 
    9697            $this->microformatDebug = array(); 
    9798             
  • trunk/skin/coolant/index.xml

    r4396 r5992  
    3535        <commentMessage> 
    3636            <none>No Comment</none> 
    37             <single>1 Comment</single> 
     37            <single>a comment</single> 
    3838        </commentMessage> 
    3939        <trackbackMessage> 
    4040            <none>No Trackback</none> 
    41             <single>1 Trackback</single> 
     41            <single>A trackback</single> 
    4242        </trackbackMessage> 
    4343        <contentWidth>450</contentWidth> 
  • trunk/style/admin/whitedream/plugin.css

    r5989 r5992  
    452452    margin                           : 0 auto; 
    453453} 
    454  
    455  
    456454 
    457455#plugin-search-form 
  • trunk/style/admin/whitedream/skin.css

    r5914 r5992  
    138138{ 
    139139    margin-bottom                    : 100px; 
     140} 
     141 
     142#skin-search-form 
     143{ 
     144    background-color                 : transparent; 
     145    border                           : none; 
     146    margin                           : 0; 
     147    position                         : absolute; 
     148    right                            : 35px; 
     149    text-align                       : right; 
     150    top                              : 275px; 
     151    width                            : 25em; 
     152    z-index                          : 1; 
     153} 
     154    
     155#skin-search-form label 
     156{ 
     157    display                          : none; 
    140158} 
    141159 
  • trunk/style/admin/whitedream/skin.ie.css

    r5465 r5992  
    77{ 
    88    border                           : 1px solid #FFFFFF; 
     9} 
     10 
     11#skin-search-form .input-button 
     12{ 
     13    line-height                      : 1.6em !important; 
    914} 
    1015