Changeset 5557

Show
Ignore:
Timestamp:
03/07/08 22:36:19 (10 months ago)
Author:
inureyes
Message:

#863

  • 카테고리 / 태그의 글 주소/숫자 사용을 결정할 수 있도록 함.
  • 관련 설정 전부 반영
  • 영어 리소스 번역 약간 추가
Location:
trunk
Files:
24 modified

Legend:

Unmodified
Added
Removed
  • trunk/components/Textcube.Data.BlogSetting.php

    r5285 r5557  
    1616        $this->description = 
    1717        $this->banner = 
    18         $this->useSlogan = 
     18        $this->useSloganOnPost = 
    1919        $this->entriesOnPage = 
    2020        $this->entriesOnList = 
     
    6363                            break; 
    6464                        case 'defaultDomain': 
    65                         case 'useSlogan': 
     65                        case 'useSloganOnPost': 
    6666                        case 'acceptGuestComment': 
    6767                        case 'acceptCommentOnGuestComment': 
     
    108108            setBlogSetting('logo', $this->banner); 
    109109        } 
    110         if (isset($this->useSlogan)) 
    111             setBlogSetting('useSlogan', Validator::getBit($this->useSlogan)); 
     110        if (isset($this->useSloganOnPost)) 
     111            setBlogSetting('useSloganOnPost', Validator::getBit($this->useSloganOnPost)); 
    112112        if (isset($this->postsOnPage)) { 
    113113            if (!Validator::number($this->postsOnPage, 1)) 
  • trunk/components/Textcube.Function.Setting.php

    r5410 r5557  
    7474                    'logoWidth'                => 0, 
    7575                    'logoHeight'               => 0, 
    76                     'useSlogan'                => 1, 
     76                    'useSloganOnPost'          => 1, 
     77                    'useSloganOnCategory'      => 1, 
     78                    'useSloganOnTag'           => 1, 
    7779                    'entriesOnPage'            => 10,  
    7880                    'entriesOnList'            => 10,  
  • trunk/interface/blog/sync.php

    r5285 r5557  
    2626    echo '</blog>', "\r\n"; 
    2727    echo '<entry>', "\r\n"; 
    28     echo '<permalink>', htmlspecialchars("$defaultURL/".($blog['useSlogan'] ? "entry/{$entry['slogan']}": $entry['id'])), '</permalink>', "\r\n"; 
     28    echo '<permalink>', htmlspecialchars("$defaultURL/".($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}": $entry['id'])), '</permalink>', "\r\n"; 
    2929    echo '<title>', htmlspecialchars($entry['title']), '</title>', "\r\n"; 
    3030    echo '<content>', htmlspecialchars(getEntryContentView($blogid, $suri['id'], $entry['content'], $entry['contentFormatter'])), '</content>', "\r\n"; 
  • trunk/interface/blog/tag.php

    r5285 r5557  
    99$cache = new pageCache; 
    1010if (strlen($suri['value'])) { 
    11     $tag = getTagId($blogid, $suri['value']); 
     11    if(!isset($suri['id'])) { 
     12        $tag = getTagId($blogid, $suri['value']); 
     13    } else { 
     14        $tag = $suri['id']; 
     15        $suri['value'] = getTagById($blogid, $suri['id']); 
     16    } 
    1217 
    1318    $preservedEntries = 
  • trunk/interface/comment/add/index.php

    r5439 r5557  
    9595        if(!$comment['secret']) { 
    9696            if($row = POD::queryRow("SELECT * FROM {$database['prefix']}Entries WHERE blogid = $blogid AND id = $entryId AND draft = 0 AND visibility = 3 AND acceptComment = 1")) 
    97                 sendCommentPing($entryId, "$defaultURL/".($blog['useSlogan'] ? "entry/{$row['slogan']}": $entryId), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']); 
     97                sendCommentPing($entryId, "$defaultURL/".($blog['useSloganOnPost'] ? "entry/{$row['slogan']}": $entryId), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']); 
    9898        } 
    9999        $skin = new Skin($skinSetting['skin']); 
  • trunk/interface/comment/comment/index.php

    r5439 r5557  
    6060            if($row = POD::queryRow("SELECT * FROM {$database['prefix']}Entries  
    6161                WHERE blogid = $blogid AND id = {$comment['entry']} AND draft = 0 AND visibility = 3 AND acceptComment = 1")) 
    62                 sendCommentPing($comment['entry'], "$defaultURL/".($blog['useSlogan'] ? "entry/{$row['slogan']}": $comment['entry']), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']); 
     62                sendCommentPing($comment['entry'], "$defaultURL/".($blog['useSloganOnPost'] ? "entry/{$row['slogan']}": $comment['entry']), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']); 
    6363        } 
    6464        $skin = new Skin($skinSetting['skin']); 
  • trunk/interface/owner/data/export/index.php

    r5547 r5557  
    6767        $writer->write('</content>'); 
    6868    } 
    69     $writer->write('</banner>' . '<useSlogan>' . Validator::getBit($setting->useSlogan) . '</useSlogan>' . '<postsOnPage>' . $setting->postsOnPage . '</postsOnPage>' . '<postsOnList>' . $setting->postsOnList . '</postsOnList>' . '<postsOnFeed>' . $setting->postsOnFeed . '</postsOnFeed>' . '<publishWholeOnFeed>' . Validator::getBit($setting->publishWholeOnFeed) . '</publishWholeOnFeed>' . '<acceptGuestComment>' . Validator::getBit($setting->acceptGuestComment) . '</acceptGuestComment>' . '<acceptCommentOnGuestComment>' . Validator::getBit($setting->acceptCommentOnGuestComment) . '</acceptCommentOnGuestComment>' . '<language>' . $setting->language . '</language>' . '<timezone>' . $setting->timezone . '</timezone>' . '</setting>'); 
     69    $writer->write('</banner>' . '<useSloganOnPost>' . Validator::getBit($setting->useSloganOnPost) . '</useSloganOnPost>' . '<postsOnPage>' . $setting->postsOnPage . '</postsOnPage>' . '<postsOnList>' . $setting->postsOnList . '</postsOnList>' . '<postsOnFeed>' . $setting->postsOnFeed . '</postsOnFeed>' . '<publishWholeOnFeed>' . Validator::getBit($setting->publishWholeOnFeed) . '</publishWholeOnFeed>' . '<acceptGuestComment>' . Validator::getBit($setting->acceptGuestComment) . '</acceptGuestComment>' . '<acceptCommentOnGuestComment>' . Validator::getBit($setting->acceptCommentOnGuestComment) . '</acceptCommentOnGuestComment>' . '<language>' . $setting->language . '</language>' . '<timezone>' . $setting->timezone . '</timezone>' . '</setting>'); 
    7070    $writer->write(CRLF); 
    7171} 
  • trunk/interface/owner/data/import/index.php

    r5541 r5557  
    250250            if (isset($node['banner'][0]['name'][0]['.value'])) 
    251251                $setting->banner = $node['banner'][0]['name'][0]['.value']; 
    252             if (isset($node['useSlogan'][0]['.value'])) 
    253                 $setting->useSlogan = $node['useSlogan'][0]['.value']; 
     252            if (isset($node['useSloganOnPost'][0]['.value'])) 
     253                $setting->useSloganOnPost = $node['useSloganOnPost'][0]['.value']; 
    254254            if (isset($node['postsOnPage'][0]['.value'])) 
    255255                $setting->postsOnPage = $node['postsOnPage'][0]['.value']; 
  • trunk/interface/owner/setting/blog/index.php

    r5495 r5557  
    234234                                } 
    235235                                 
    236                                 var useSlogan = "<?php echo $blog['useSlogan'];?>"; 
     236                                var useSlogan             = "<?php echo $blog['useSloganOnPost'];?>"; 
     237                                var useCSlogan            = "<?php echo $blog['useSloganOnCategory'];?>"; 
     238                                var useTSlogan            = "<?php echo $blog['useSloganOnTag'];?>"; 
    237239                                var publishEolinSyncOnRSS = "<?php echo $blog['publishEolinSyncOnRSS'];?>"; 
    238                                 var entriesOnRSS = "<?php echo $blog['entriesOnRSS'];?>"; 
    239                                 var publishWholeOnRSS = "<?php echo $blog['publishWholeOnRSS'];?>"; 
     240                                var entriesOnRSS          = "<?php echo $blog['entriesOnRSS'];?>"; 
     241                                var publishWholeOnRSS     = "<?php echo $blog['publishWholeOnRSS'];?>"; 
    240242                                var allowCommentGuestbook = <?php echo $blog['allowWriteDblCommentOnGuestbook'];?>; 
    241                                 var blogVisibility = <?php echo $blog['visibility'];?>; 
     243                                var blogVisibility        = <?php echo $blog['visibility'];?>; 
    242244 
    243245                                //var allowWriteGuestbook = <?php echo $blog['allowWriteOnGuestbook'];?>; 
    244246                                function setRSS() { 
    245                                     if (document.getElementById('rss-form').useSlogan[useSlogan].checked == true) { 
    246                                         if (document.getElementById('rss-form').useSlogan.value != useSlogan) { 
    247                                             var request = new HTTPRequest("GET", "<?php echo $blogURL;?>/owner/setting/blog/slogan/" + (document.getElementById('rss-form').useSlogan[0].checked ? 1 : 0)); 
    248                                             request.onSuccess = function() { 
    249                                                 useSlogan = document.getElementById('rss-form').useSlogan[0].checked ? 1 : 0; 
     247                                    if (document.getElementById('rss-form').useSlogan[useSlogan].checked == true 
     248                                        || document.getElementById('rss-form').useCSlogan[useCSlogan].checked == true 
     249                                        || document.getElementById('rss-form').useTSlogan[useTSlogan].checked == true) { 
     250                                        var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/setting/blog/slogan/"); 
     251                                         
     252                                        request.onSuccess = function() { 
     253                                            useSlogan = document.getElementById('rss-form').useSlogan[0].checked ? 1 : 0; 
     254                                            useCSlogan = document.getElementById('rss-form').useCSlogan[0].checked ? 1 : 0; 
     255                                            useTSlogan = document.getElementById('rss-form').useTSlogan[0].checked ? 1 : 0; 
    250256                                                PM.showMessage("<?php echo _t('저장되었습니다.');?>", "center", "bottom"); 
    251257                                            } 
    252                                             request.onError = function() { 
    253                                                 alert("<?php echo _t('글 주소 표기법을 변경할 수 없습니다.');?>"); 
    254                                             } 
    255                                             request.send(); 
    256                                         } 
    257                                     } 
    258                                      
     258                                        request.onError = function() { 
     259                                            alert("<?php echo _t('글 주소 표기법을 변경할 수 없습니다.');?>"); 
     260                                        } 
     261                                        request.send("useSloganOnPost="+(document.getElementById('rss-form').useSlogan[0].checked ? 1 : 0) 
     262                                            +"&useSloganOnCategory="+(document.getElementById('rss-form').useCSlogan[0].checked ? 1 : 0) 
     263                                            +"&useSloganOnTag="+(document.getElementById('rss-form').useTSlogan[0].checked ? 1 : 0) 
     264                                        ); 
     265//                                      } 
     266                                    }  
    259267                                     
    260268                                    var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/setting/blog/rss/"); 
     
    643651                                            <dt><span class="label"><?php echo _t('글 주소');?></span></dt> 
    644652                                            <dd> 
    645                                                 <input type="radio" id="useSlogan1" class="radio" name="useSlogan"<?php echo ($blog['useSlogan'] ? ' checked="checked"' : '');?> /><label for="useSlogan1"><span class="text"><?php echo _t('문자를 사용합니다.');?> <samp><?php echo _f('(예: %1/entry/텍스트큐브로-오신-것을-환영합니다)',link_cut(getBlogURL()));?></samp></span></label><br /> 
    646                                                 <input type="radio" id="useSlogan0" class="radio" name="useSlogan"<?php echo ($blog['useSlogan'] ? '' : ' checked="checked"');?> /><label for="useSlogan0"><span class="text"><?php echo _t('숫자를 사용합니다.');?> <samp><?php echo _f('(예: %1/123)', link_cut(getBlogURL()));?></samp></span></label> 
     653                                                <input type="radio" id="useSlogan1" class="radio" name="useSlogan"<?php echo ($blog['useSloganOnPost'] ? ' checked="checked"' : '');?> /><label for="useSlogan1"><span class="text"><?php echo _t('문자를 사용합니다.');?> <samp><?php echo _f('(예: %1/entry/텍스트큐브로-오신-것을-환영합니다)',link_cut(getBlogURL()));?></samp></span></label><br /> 
     654                                                <input type="radio" id="useSlogan0" class="radio" name="useSlogan"<?php echo ($blog['useSloganOnPost'] ? '' : ' checked="checked"');?> /><label for="useSlogan0"><span class="text"><?php echo _t('숫자를 사용합니다.');?> <samp><?php echo _f('(예: %1/123)', link_cut(getBlogURL()));?></samp></span></label> 
     655                                            </dd> 
     656                                        </dl> 
     657                                        <dl id="category-address-line" class="line"> 
     658                                            <dt><span class="label"><?php echo _t('카테고리 주소');?></span></dt> 
     659                                            <dd> 
     660                                                <input type="radio" id="useCSlogan1" class="radio" name="useCSlogan"<?php echo ($blog['useSloganOnCategory'] ? ' checked="checked"' : '');?> /><label for="useCSlogan1"><span class="text"><?php echo _t('문자를 사용합니다.');?> <samp><?php echo _f('(예: %1/category/텍스트큐브)',link_cut(getBlogURL()));?></samp></span></label><br /> 
     661                                                <input type="radio" id="useCSlogan0" class="radio" name="useCSlogan"<?php echo ($blog['useSloganOnCategory'] ? '' : ' checked="checked"');?> /><label for="useCSlogan0"><span class="text"><?php echo _t('숫자를 사용합니다.');?> <samp><?php echo _f('(예: %1/category/1)', link_cut(getBlogURL()));?></samp></span></label> 
     662                                            </dd> 
     663                                        </dl> 
     664                                        <dl id="tag-address-line" class="line"> 
     665                                            <dt><span class="label"><?php echo _t('태그 주소');?></span></dt> 
     666                                            <dd> 
     667                                                <input type="radio" id="useTSlogan1" class="radio" name="useTSlogan"<?php echo ($blog['useSloganOnTag'] ? ' checked="checked"' : '');?> /><label for="useTSlogan1"><span class="text"><?php echo _t('문자를 사용합니다.');?> <samp><?php echo _f('(예: %1/tag/텍스트큐브)',link_cut(getBlogURL()));?></samp></span></label><br /> 
     668                                                <input type="radio" id="useTSlogan0" class="radio" name="useTSlogan"<?php echo ($blog['useSloganOnTag'] ? '' : ' checked="checked"');?> /><label for="useTSlogan0"><span class="text"><?php echo _t('숫자를 사용합니다.');?> <samp><?php echo _f('(예: %1/tag/101)', link_cut(getBlogURL()));?></samp></span></label> 
    647669                                            </dd> 
    648670                                        </dl> 
  • trunk/interface/owner/setting/blog/slogan/index.php

    r5285 r5557  
    33/// All rights reserved. Licensed under the GPL. 
    44/// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 
     5$IV = array( 
     6    'POST' => array( 
     7        'useSloganOnPost' => array('int',0,1), 
     8        'useSloganOnCategory' => array('int',0,1), 
     9        'useSloganOnTag' => array('int',0,1) 
     10    ) 
     11); 
     12 
    513require ROOT . '/lib/includeForBlogOwner.php'; 
    614requireStrictRoute(); 
    7 if (useBlogSlogan($blogid, $suri['id'])) 
     15if (useBlogSlogan($blogid, $_POST['useSloganOnPost'],$_POST['useSloganOnCategory'],$_POST['useSloganOnTag'])) 
    816    respond::ResultPage(0); 
    917respond::ResultPage( - 1); 
  • trunk/interface/trackback/index.php

    r5285 r5557  
    4343            AND visibility = 3  
    4444            AND acceptComment = 1")) 
    45         sendTrackbackPing($suri['id'], "$defaultURL/".($blog['useSlogan'] ? "entry/{$row['slogan']}": $suri['id']), $url, $blog_name, $title); 
     45        sendTrackbackPing($suri['id'], "$defaultURL/".($blog['useSloganOnPost'] ? "entry/{$row['slogan']}": $suri['id']), $url, $blog_name, $title); 
    4646    respond::ResultPage(0); 
    4747} else { 
  • trunk/language/en.php

    r5508 r5557  
    10421042$__text['오름차순'] = 'Ascending order'; 
    10431043$__text['오직하나뿐인'] = 'Sweetheart'; 
    1044 //$__text['오픈아이디 게스트 로그인'] = ''; 
    1045 //$__text['오픈아이디 기억'] = ''; 
     1044$__text['오픈아이디 게스트 로그인'] = 'OpenID Guest login'; 
     1045$__text['오픈아이디 기억'] = 'Remember OpenID'; 
    10461046//$__text['오픈아이디 댓글 테이블을 기존 댓글 테이블에 병합합니다'] = ''; 
    10471047$__text['오픈아이디 로그인 목록'] = 'OpenID Login List'; 
    10481048$__text['오픈아이디 로그인 사용자에게만 댓글을 허용하도록 설정하러 가기'] = 'Set to accept comment only to the OpenID users'; 
    1049 //$__text['오픈아이디 발급하기'] = ''; 
    1050 //$__text['오픈아이디 사용자 테이블을 만듭니다'] = ''; 
     1049$__text['오픈아이디 발급하기'] = 'Issue an OpenID'; 
     1050$__text['오픈아이디 사용자 테이블을 만듭니다'] = 'Creating OpenID User table'; 
    10511051$__text['오픈아이디 연결'] = 'OpenID Connection'; 
    1052 //$__text['오픈아이디 인증'] = ''; 
    1053 //$__text['오픈아이디 저장'] = ''; 
     1052$__text['오픈아이디 인증'] = 'Authorize OpenID'; 
     1053$__text['오픈아이디 저장'] = 'Save OpenID'; 
    10541054$__text['오픈아이디 주소(이름)'] = 'OpenID Address(Name)'; 
    10551055$__text['오픈아이디 플러그인 설정 바로가기'] = 'Go to OpenID plugin setting'; 
    10561056$__text['오픈아이디 플러그인을 사용하고 있지 않으므로, 오픈아이디는 설정할 수 없습니다. 관리자에게 문의 하십시오'] = 'OpenID plugin is inactivated, so you cannot set up OpenID. Contact Admin.'; 
    10571057$__text['오픈아이디'] = 'OpenID'; 
    1058 //$__text['오픈아이디란?'] = ''; 
    1059 //$__text['오픈아이디로 글쓰기'] = ''; 
     1058$__text['오픈아이디란?'] = 'What is OpenID?'; 
     1059$__text['오픈아이디로 글쓰기'] = 'Write with OpenID'; 
    10601060$__text['오픈아이디로 로그인을 해야만 댓글 및 방명록을 쓸 수 있습니다.'] = 'You can leave a comment or write in guestbook only when logged in with OpenID.'; 
    10611061$__text['오픈아이디로 로그인하여 쓴 댓글/방명록에 오픈아이디 아이콘을 표시합니다.'] = 'Show OpenID icon in comments and guesbook written with OpenID.'; 
     
    10681068$__text['올바른 스킨 디렉토리명이 아닙니다.\n디렉토리명에는 알파벳, 숫자, 언더바(_), 공백문자, 대쉬(-)만 사용하실 수 있습니다.'] = 'Invalid theme directory name.\\nYou can use only alphabet, numeric numbers, underbar(_), null character, or dash(-).'; 
    10691069$__text['올바른 피드가 아닙니다.'] = 'Invalid Feed.'; 
    1070 //$__text['완료'] = ''; 
     1070$__text['완료'] = 'Complete'; 
    10711071$__text['완료.'] = 'Complete'; 
    10721072$__text['완료되었습니다.'] = 'Completed'; 
     
    10771077$__text['운영체제'] = 'OS'; 
    10781078//$__text['움베르트 에코 -장미의 이름- 중'] = ''; 
    1079 //$__text['원본 크기로 보기'] = ''; 
     1079$__text['원본 크기로 보기'] = 'View with original size'; 
    10801080$__text['원하시는 스킨의 적용 버튼을 클릭하십시오.'] = 'Click "Apply" to use the theme.'; 
    10811081//$__text['월요일'] = ''; 
     
    11001100$__text['이 걸린글을 복원합니다.'] = 'Restore This Trackback.'; 
    11011101$__text['이 걸린글을 삭제합니다.'] = 'Delete This Trackback'; 
    1102 //$__text['이 계정은 %1에 생성되었습니다.'] = ''; 
     1102$__text['이 계정은 %1에 생성되었습니다.'] = 'This account is created at %1.'; 
    11031103$__text['이 계정의 업로드 허용 용량은 <em>%1</em> 바이트로 백업파일의 크기가 이를 초과하는 경우 <acronym title="File Transfer Protocol">FTP</acronym> 등으로 원하시는 사이트에 업로드하신 후 이 파일의 웹 주소를 입력해서 진행하십시오. 이 경우, 보안을 위해 복원이 끝나면 반드시 그 백업파일을 웹 상에서 지우실 것을 권장합니다.'] = 'Upload file size limit for this account is %1 bytes. If backup file size exceeds this limit, try uploading the file to other web space via FTP, and enter the URL of the file location. After the restoration process is finished, deleting the backup file is recommended for the sake of security.'; 
    11041104$__text['이 그룹 정보를 수정합니다.'] = 'Modify Group Information'; 
  • trunk/lib/model/blog.blogSetting.php

    r5473 r5557  
    134134} 
    135135 
    136 function useBlogSlogan($blogid, $useSlogan) { 
     136function useBlogSlogan($blogid, $useSloganOnPost, $useSloganOnCategory, $useSloganOnTag) { 
    137137    global $blog; 
    138138    requireModel('blog.rss'); 
    139139    requireComponent('Needlworks.Cache.PageCache'); 
    140     $useSlogan = $useSlogan ? 1 : 0; 
    141     if ($useSlogan == $blog['useSlogan']) 
    142         return true; 
    143     if(setBlogSetting('useSlogan',$useSlogan) === false) { 
    144         return false; 
    145     } 
    146     $blog['useSlogan'] = $useSlogan; 
     140    $useSloganOnPost     = $useSloganOnPost     ? 1 : 0; 
     141    $useSloganOnCategory = $useSloganOnCategory ? 1 : 0; 
     142    $useSloganOnTag      = $useSloganOnTag      ? 1 : 0; 
     143    if ($useSloganOnPost == $blog['useSloganOnPost']  
     144        && $useSloganOnCategory == $blog['useSloganOnCategory'] 
     145        && $useSloganOnTag == $blog['useSloganOnTag']) 
     146        return true; 
     147/*  if(setBlogSetting('useSloganOnPost',$useSlogan) === false 
     148    || setBlogSetting('useSloganOnCategory',$useSlogan) === false 
     149    || setBlogSetting('useSloganOnTag',$useSlogan) === false 
     150        ) { 
     151        return false; 
     152    }*/ 
     153    setBlogSetting('useSloganOnPost',$useSloganOnPost); 
     154    setBlogSetting('useSloganOnCategory',$useSloganOnCategory); 
     155    setBlogSetting('useSloganOnTag',$useSloganOnTag); 
     156 
     157    $blog['useSloganOnPost'] = $useSloganOnPost; 
     158    $blog['useSloganOnCategory'] = $useSloganOnCategory; 
     159    $blog['useSloganOnTag'] = $useSloganOnTag; 
    147160    CacheControl::flushCategory(); 
    148161    CacheControl::flushEntry(); 
    149     fireEvent('ToggleBlogSlogan',null,$blog['useSlogan']); 
    150     clearRSS(); 
    151     return true; 
     162    CacheControl::flushTag(); 
     163    fireEvent('ToggleBlogSlogan',null,$blog['useSloganOnPost']); 
     164    clearRSS(); 
     165    return true;  
    152166} 
    153167 
     
    277291            'logoWidth'                => 0, 
    278292            'logoHeight'               => 0, 
    279             'useSlogan'                => 1, 
     293            'useSloganOnPost'          => 1, 
     294            'useSloganOnCategory'      => 1, 
     295            'useSloganOnTag'           => 1, 
    280296            'entriesOnPage'            => 10, 
    281297            'entriesOnList'            => 10, 
  • trunk/lib/model/blog.comment.php

    r5474 r5557  
    819819        $r2_comment_check_url = rawurlencode("$defaultURL/guestbook#comment" . $comments['id']); 
    820820    }else{ 
    821         $r1_comment_check_url = rawurlencode("$defaultURL/" . ($blog['useSlogan'] ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $parentComments['id']); 
    822         $r2_comment_check_url = rawurlencode("$defaultURL/" . ($blog['useSlogan'] ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $comments['id']); 
     821        $r1_comment_check_url = rawurlencode("$defaultURL/" . ($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $parentComments['id']); 
     822        $r2_comment_check_url = rawurlencode("$defaultURL/" . ($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}" : $entry['id']) . "#comment" . $comments['id']); 
    823823    } 
    824824         
    825     $data = "url=" . rawurlencode($defaultURL) . "&mode=fb" . "&s_home_title=" . rawurlencode($blog['title']) . "&s_post_title=" . rawurlencode($entry['title']) . "&s_name=" . rawurlencode($comments['name']) . "&s_no=" . rawurlencode($comments['entry']) . "&s_url=" . rawurlencode("$defaultURL/" . ($blog['useSlogan'] ? "entry/{$entry['slogan']}" : $entry['id'])) . "&r1_name=" . rawurlencode($parentComments['name']) . "&r1_no=" . rawurlencode($parentComments['id']) . "&r1_pno=" . rawurlencode($comments['entry']) . "&r1_rno=0" . "&r1_homepage=" . rawurlencode($parentComments['homepage']) . "&r1_regdate=" . rawurlencode($parentComments['written']) . "&r1_url=" . $r1_comment_check_url. "&r2_name=" . rawurlencode($comments['name']) . "&r2_no=" . rawurlencode($comments['id']) . "&r2_pno=" . rawurlencode($comments['entry']) . "&r2_rno=" . rawurlencode($comments['parent']) . "&r2_homepage=" . rawurlencode($comments['homepage']) . "&r2_regdate=" . rawurlencode($comments['written']) . "&r2_url=" . $r2_comment_check_url . "&r1_body=" . rawurlencode($parentComments['comment']) . "&r2_body=" . rawurlencode($comments['comment']); 
     825    $data = "url=" . rawurlencode($defaultURL) . "&mode=fb" . "&s_home_title=" . rawurlencode($blog['title']) . "&s_post_title=" . rawurlencode($entry['title']) . "&s_name=" . rawurlencode($comments['name']) . "&s_no=" . rawurlencode($comments['entry']) . "&s_url=" . rawurlencode("$defaultURL/" . ($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}" : $entry['id'])) . "&r1_name=" . rawurlencode($parentComments['name']) . "&r1_no=" . rawurlencode($parentComments['id']) . "&r1_pno=" . rawurlencode($comments['entry']) . "&r1_rno=0" . "&r1_homepage=" . rawurlencode($parentComments['homepage']) . "&r1_regdate=" . rawurlencode($parentComments['written']) . "&r1_url=" . $r1_comment_check_url. "&r2_name=" . rawurlencode($comments['name']) . "&r2_no=" . rawurlencode($comments['id']) . "&r2_pno=" . rawurlencode($comments['entry']) . "&r2_rno=" . rawurlencode($comments['parent']) . "&r2_homepage=" . rawurlencode($comments['homepage']) . "&r2_regdate=" . rawurlencode($comments['written']) . "&r2_url=" . $r2_comment_check_url . "&r1_body=" . rawurlencode($parentComments['comment']) . "&r2_body=" . rawurlencode($comments['comment']); 
    826826    requireComponent('Eolin.PHP.HTTPRequest'); 
    827827    if (strpos($parentComments['homepage'], "http://") === false) { 
  • trunk/lib/model/blog.entry.php

    r5556 r5557  
    133133            WHERE e.blogid = $blogid AND e.draft = 0 $visibility $cond  
    134134            ORDER BY e.published DESC"; 
    135     return fetchWithPaging($sql, $page, $count, "$folderURL/".((!getBlogSetting('useSlogan',true) && isset($suri['id'])) ? $suri['id'] : $suri['value'])); 
     135    return fetchWithPaging($sql, $page, $count, "$folderURL/".((!getBlogSetting('useSloganOnCategory',true) && isset($suri['id'])) ? $suri['id'] : $suri['value'])); 
    136136} 
    137137 
     
    162162        WHERE e.blogid = $blogid AND e.draft = 0 $visibility AND e.category >= 0 AND t.tag = '$tag'  
    163163        ORDER BY published DESC"; 
    164     return fetchWithPaging($sql, $page, $count, "$folderURL/{$suri['value']}"); 
     164    return fetchWithPaging($sql, $page, $count, "$folderURL/".((!getBlogSetting('useSloganOnTag',true) && isset($suri['id'])) ? $suri['id'] : $suri['value'])); 
    165165} 
    166166 
     
    218218        WHERE e.blogid = $blogid AND e.draft = 0 $visibility $cond  
    219219        ORDER BY e.published DESC"; 
    220     return fetchWithPaging($sql, $page, $count, "$folderURL/{$suri['value']}","?page=",$countItem); 
     220    return fetchWithPaging($sql, $page, $count, "$folderURL/".((!getBlogSetting('useSloganOnCategory',true) && isset($suri['id'])) ? $suri['id'] : $suri['value']),"?page=",$countItem); 
    221221} 
    222222 
     
    233233        WHERE e.blogid = $blogid AND e.draft = 0 $visibility AND e.category >= 0 AND t.tag = '$tag'  
    234234        ORDER BY e.published DESC"; 
    235     return fetchWithPaging($sql, $page, $count, "$folderURL/{$suri['value']}","?page=", $countItem); 
     235    return fetchWithPaging($sql, $page, $count, "$folderURL/".((!getBlogSetting('useSloganOnTag',true) && isset($suri['id'])) ? $suri['id'] : $suri['value']),"?page=", $countItem); 
    236236} 
    237237 
     
    993993        $summary['blogTitle'] = $blog['title']; 
    994994        $summary['language'] = $blog['language']; 
    995         $summary['permalink'] = "$defaultURL/".($blog['useSlogan'] ? "entry/{$entry['slogan']}": $entry['id']); 
     995        $summary['permalink'] = "$defaultURL/".($blog['useSloganOnPost'] ? "entry/{$entry['slogan']}": $entry['id']); 
    996996        $summary['title'] = $entry['title']; 
    997997        $summary['content'] = UTF8::lessenAsByte(stripHTML(getEntryContentView($blogid, $entry['id'], $entry['content'], $entry['contentFormatter'])), 1023, ''); 
  • trunk/lib/model/blog.rss.php

    r5447 r5557  
    5858    $channel['items'] = array(); 
    5959    foreach($result as $row) { 
    60         $entryURL = $defaultURL . '/' . ($blog['useSlogan'] ? 'entry/' . rawurlencode($row['slogan']) : $row['id']); 
     60        $entryURL = $defaultURL . '/' . ($blog['useSloganOnPost'] ? 'entry/' . rawurlencode($row['slogan']) : $row['id']); 
    6161 
    6262        $content = getEntryContentView($blogid, $row['id'], $row['content'], $row['contentFormatter'], true, 'Post', true, true); 
     
    214214    $channel = initializeRSSchannel($blogid); 
    215215    $channel['title'] = RSSMessage($blog['title']. ': '._textf('%1 에 달린 댓글',$entry['title'])); 
    216     if($blog['useSlogan']) { 
     216    if($blog['useSloganOnPost']) { 
    217217        $channel['link'] = $defaultURL."/entry/".URL::encode($entry['slogan'],true); 
    218218    } else { 
     
    294294    $channel = initializeRSSchannel($blogid); 
    295295    $channel['title'] = RSSMessage($blog['title']. ': '._textf('%1 에 달린 트랙백',$entry['slogan'])); 
    296     if($blog['useSlogan']) { 
     296    if($blog['useSloganOnPost']) { 
    297297        $channel['link'] = $defaultURL."/entry/".URL::encode($entry['slogan'],true); 
    298298    } else { 
  • trunk/lib/model/blog.tag.php

    r4943 r5557  
    88    $name = POD::escapeString($name); 
    99    return POD::queryCell("SELECT id FROM {$database['prefix']}Tags WHERE name = '$name'"); 
     10} 
     11 
     12function getTagById($blogid, $id) { 
     13    global $database; 
     14    return POD::queryCell("SELECT name FROM {$database['prefix']}Tags WHERE id = $id"); 
    1015} 
    1116 
     
    3742    if ($skinSetting['tagboxAlign'] == 1) { // order by count 
    3843        if (doesHaveOwnership()) 
    39             $tags = POD::queryAll("SELECT `name`, count(*) `cnt` FROM `{$database['prefix']}Tags` t  
     44            $tags = POD::queryAll("SELECT `name`, count(*) `cnt`, `id` FROM `{$database['prefix']}Tags` t  
    4045                INNER JOIN `{$database['prefix']}TagRelations` r ON r.blogid = $blogid AND r.tag = t.id 
    4146