Changeset 4555
- Timestamp:
- 10/08/07 23:25:21 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 modified
-
blog/owner/setting/blog/index.php (modified) (3 diffs)
-
blog/owner/setting/blog/tag (added)
-
blog/owner/setting/blog/tag/index.php (added)
-
lib/model/blog.blogSetting.php (modified) (1 diff)
-
lib/piece/blog/end.php (modified) (1 diff)
-
lib/piece/blog/entries.php (modified) (2 diffs)
-
style/admin/default/setting.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/blog/owner/setting/blog/index.php
r4487 r4555 8 8 require ROOT . '/lib/piece/owner/contentMenu.php'; 9 9 ?> 10 <script type="text/javascript" src="<?php echo $service['path'];?>/script/generaltag.js"></script> 10 11 <script type="text/javascript"> 11 12 //<![CDATA[ … … 37 38 } 38 39 } 40 41 function setBlogTag() { 42 var oForm = document.forms[2]; 43 var tagValue = ""; 44 try { 45 tagValue = oTag.getValues().join(","); 46 } catch (e) { 47 tagValue = oForm.blog-tag.value; 48 } 49 50 var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/setting/blog/tag/"); 51 request.onSuccess = function() { 52 PM.showMessage("<?php echo _t('저장되었습니다.');?>", "center", "bottom"); 53 } 54 request.onError = function() { 55 alert("<?php echo _t('대표 태그를 변경하지 못했습니다.');?>"); 56 } 57 request.send("tags=" + encodeURIComponent(tagValue)); 58 } 59 39 60 <?php 40 61 if ($service['type'] != 'single') { … … 400 421 } 401 422 ?> 423 <form id="tag-form" class="section" method="post" action="<?php echo $blogURL;?>/owner/setting/blog/tag"> 424 <fieldset class="container"> 425 <legend><?php echo _t('블로그 태그');?></legend> 426 427 <dl id="blog-tag-line" class="line"> 428 <dt><label for="title"><?php echo _t('대표 태그');?></label></dt> 429 <dd id="blog-tag"></dd> 430 </dl> 431 </fieldset> 432 <script type="text/javascript"> 433 //<![CDATA[ 434 try { 435 var oTag = new Tag(document.getElementById("blog-tag"), "<?php echo $blog['language'];?>", <?php echo isset($service['disableEolinSuggestion']) && $service['disableEolinSuggestion'] ? 'true' : 'false';?>); 436 oTag.setInputClassName("input-tag"); 437 <?php 438 $tags = array(); 439 $blogTags = getBlogTags($blogid); 440 if(!empty($blogTags)) { 441 $blogTags = explode(',',$blogTags); 442 foreach ($blogTags as $tag) { 443 array_push($tags, $tag); 444 echo 'oTag.setValue("' . addslashes($tag) . '");'; 445 } 446 } 447 ?> 448 } catch(e) { 449 document.getElementById("tag").innerHTML = '<input type="text" class="input-text" name="blog-tag" value="<?php echo addslashes(str_replace('"', '"', implode(', ', $tags)));?>" /><br /><?php echo _t('태그 입력 스크립트를 사용할 수 없습니다. 콤마(,)로 구분된 태그를 직접 입력해 주십시오.(예: 텍스트큐브, BLOG, 테스트)');?>'; 450 } 451 //]]> 452 </script> 453 <div class="button-box"> 454 <input type="submit" class="save-button input-button" value="<?php echo _t('저장하기');?>" onclick="setBlogTag(); return false;" /> 455 </div> 456 </form> 402 457 </div> 403 458 </div> -
trunk/lib/model/blog.blogSetting.php
r4472 r4555 24 24 clearRSS(); 25 25 return true; 26 } 27 28 function setBlogTags($blogid, $tags) { 29 if(isset($tags)) { 30 setBlogSetting('blogTags',$tags); 31 return true; 32 } 33 return false; 34 } 35 36 function getBlogTags($blogid) { 37 if($tags = getBlogSetting('blogTags')) { 38 return $tags; 39 } 40 return null; 26 41 } 27 42 -
trunk/lib/piece/blog/end.php
r4551 r4555 28 28 dress('taglog_link', "$blogURL/tag", $view); 29 29 dress('guestbook_link', "$blogURL/guestbook", $view); 30 31 if(isset($totalTags)) { 32 $totalTags = array_unique($totalTags); 33 $totalTagsView = implode(",",$totalTags); 34 } else { 35 $totalTagsView = getBlogTags($blogid); 36 } 37 38 dress('meta_http_equiv_keywords', $totalTagsView, $view); 30 39 31 40 $searchView = $skin->search; -
trunk/lib/piece/blog/entries.php
r4553 r4555 132 132 } 133 133 if(count($entries) > 1) { 134 $totalTags = array();134 unset($totalTags); 135 135 } 136 array_push($totalTags, $blog['title']);137 $totalTags = array_unique($totalTags);138 136 if(isset($cache)) { 139 137 $cache->contents = revertTempTags(removeAllTags($entriesView)); … … 146 144 $isKeylog = false; 147 145 } else { 148 $totalTagsView = implode(",",$totalTags);149 dress('meta_http_equiv_keywords', $totalTagsView, $view);150 146 if (isset($cache->contents)) { 151 147 dressInsertBefore('article_rep', $entriesView, $view); -
trunk/style/admin/default/setting.css
r4258 r4555 126 126 { 127 127 margin-left : 3px; 128 } 129 130 #blog-tag ul li 131 { 132 background-image : url("./image/comma.gif"); 133 background-position : right 10px; 134 background-repeat : no-repeat; 135 display : inline; 136 margin-right : 5px; 137 padding : 0 4px 0 0; 138 vertical-align : middle; 128 139 } 129 140
