Changeset 5376
- Timestamp:
- 02/23/08 19:12:02 (11 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
lib/model/blog.rss.php (modified) (11 diffs)
-
lib/piece/blog/end.php (modified) (1 diff)
-
lib/piece/blog/entries.php (modified) (2 diffs)
-
skin/coolant/skin.html (modified) (5 diffs)
-
skin/standard/skin.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/model/blog.rss.php
r5367 r5376 123 123 } 124 124 125 function getCommentRSSTotal($blogid) {126 global $ database, $serviceURL, $defaultURL, $blogURL, $blog, $service;125 function initializeRSSchannel($blogid = null) { 126 global $serviceURL, $defaultURL, $blogURL, $blog; 127 127 128 128 if(empty($blogid)) $blogid = getBlogId(); 129 129 130 130 $channel = array(); 131 $channel['title'] = RSSMessage($blog['title']. ': '._text('최근 댓글 목록'));132 131 $channel['link'] = "$defaultURL/"; 133 132 $channel['description'] = RSSMessage($blog['description']); … … 142 141 $channel['height'] = $logoInfo[1]; 143 142 } 143 return $channel; 144 } 145 function getResponseRSSTotal($blogid) { 146 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 147 if(empty($blogid)) $blogid = getBlogId(); 148 $channel = initializeRSSchannel($blogid); 149 $channel['title'] = $blog['title']. ': '._text('최근 댓글/트랙백 목록'); 150 151 $recentComment = getCommentRSSTotal($blogid,true); 152 $recentTrackback = getTrackbackRSSTotal($blogid,true); 153 $merged = array_merge($recentComment, $recentTrackback); 154 $channel['items'] = $merged; 155 $rss = array('channel' => $channel); 156 return publishRSS($blogid, $rss); 157 } 158 159 function getResponseRSSByEntryId($blogid, $entryId) { 160 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 161 if(empty($blogid)) $blogid = getBlogId(); 162 $channel = initializeRSSchannel($blogid); 163 $channel['title'] = $blog['title']. ': '._text('최근 댓글/트랙백 목록'); 164 165 $recentComment = getCommentRSSByEntryId($blogid,$entryId,true); 166 $recentTrackback = getTrackbackRSSByEntryId($blogid,$entryId,true); 167 $merged = array_merge($recentComment, $recentTrackback); 168 $channel['items'] = $merged; 169 $rss = array('channel' => $channel); 170 return publishRSS($blogid, $rss); 171 } 172 173 function getCommentRSSTotal($blogid, $rawMode = false) { 174 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 175 $channel = initializeRSSchannel($blogid); 176 $channel['title'] = $blog['title']. ': '._text('최근 댓글 목록'); 177 144 178 $result = getRecentComments($blogid, 20, false, true); 145 179 if (!$result) … … 163 197 array_push($channel['items'], $item); 164 198 } 165 $rss = array('channel' => $channel); 166 return publishRSS($blogid, $rss); 167 } 168 169 function getCommentRSSByEntryId($blogid, $entryId) { 170 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 171 199 if($rawMode == true) return $channel['items']; 200 $rss = array('channel' => $channel); 201 return publishRSS($blogid, $rss); 202 } 203 204 function getCommentRSSByEntryId($blogid = null, $entryId, $rawMode = false) { 205 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 206 172 207 if(empty($blogid)) $blogid = getBlogId(); 173 208 … … 176 211 if($entry['visibility'] < 2) return false; 177 212 if(in_array($entry['category'], getCategoryVisibilityList($blogid, 'private'))) return false; 178 $channel = array(); 213 214 $channel = initializeRSSchannel($blogid); 179 215 $channel['title'] = RSSMessage($blog['title']. ': '._textf('%1 에 달린 댓글',$entry['title'])); 180 216 if($blog['useSlogan']) { … … 182 218 } else { 183 219 $channel['link'] = $defaultURL."/".$entryId; 184 }185 $channel['description'] = RSSMessage($blog['description']);186 $channel['language'] = $blog['language'];187 $channel['pubDate'] = Timestamp::getRFC1123();188 $channel['generator'] = TEXTCUBE_NAME . ' ' . TEXTCUBE_VERSION;189 190 if ((getBlogSetting('visibility',2) == 2) && !empty($blog['logo']) && file_exists(ROOT."/attach/$blogid/{$blog['logo']}")) {191 $logoInfo = getimagesize(ROOT."/attach/$blogid/{$blog['logo']}");192 $channel['url'] = $serviceURL."/attach/".$blogid."/".$blog['logo'];193 $channel['width'] = $logoInfo[0];194 $channel['height'] = $logoInfo[1];195 220 } 196 221 $result = POD::queryAll("SELECT * … … 219 244 array_push($channel['items'], $item); 220 245 } 221 $rss = array('channel' => $channel); 222 return publishRSS($blogid, $rss); 223 } 224 225 226 function getTrackbackRSSTotal($blogid) { 227 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 228 229 if(empty($blogid)) $blogid = getBlogId(); 230 $isPublic = (getBlogSetting('visibility',2) == 2 ? true : false); 231 232 $channel = array(); 246 if($rawMode == true) return $channel['items']; 247 $rss = array('channel' => $channel); 248 return publishRSS($blogid, $rss); 249 } 250 251 252 function getTrackbackRSSTotal($blogid, $rawMode = false) { 253 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 254 255 if(empty($blogid)) $blogid = getBlogId(); 256 $channel = initializeRSSchannel($blogid); 233 257 $channel['title'] = RSSMessage($blog['title']. ': '._text('최근 트랙백 목록')); 234 $channel['link'] = "$defaultURL/";235 $channel['description'] = RSSMessage($blog['description']);236 $channel['language'] = $blog['language'];237 $channel['pubDate'] = Timestamp::getRFC1123();238 $channel['generator'] = TEXTCUBE_NAME . ' ' . TEXTCUBE_VERSION;239 240 if ((getBlogSetting('visibility',2) == 2) && !empty($blog['logo']) && file_exists(ROOT."/attach/$blogid/{$blog['logo']}")) {241 $logoInfo = getimagesize(ROOT."/attach/$blogid/{$blog['logo']}");242 $channel['url'] = $serviceURL."/attach/".$blogid."/".$blog['logo'];243 $channel['width'] = $logoInfo[0];244 $channel['height'] = $logoInfo[1];245 }246 258 $result = getRecentTrackbacks($blogid, 20, true); 247 259 if (!$result) … … 264 276 array_push($channel['items'], $item); 265 277 } 266 $rss = array('channel' => $channel); 267 return publishRSS($blogid, $rss); 268 } 269 270 function getTrackbackRSSByEntryId($blogid, $entryId) { 278 if($rawMode == true) return $channel['items']; 279 $rss = array('channel' => $channel); 280 return publishRSS($blogid, $rss); 281 } 282 283 function getTrackbackRSSByEntryId($blogid = null, $entryId, $rawMode = false) { 271 284 global $database, $serviceURL, $defaultURL, $blogURL, $blog, $service; 272 285 … … 278 291 if(in_array($entry['category'], getCategoryVisibilityList($blogid, 'private'))) return false; 279 292 $channel = array(); 293 294 $channel = initializeRSSchannel($blogid); 280 295 $channel['title'] = RSSMessage($blog['title']. ': '._textf('%1 에 달린 트랙백',$entry['slogan'])); 281 296 if($blog['useSlogan']) { … … 283 298 } else { 284 299 $channel['link'] = $defaultURL."/".$entryId; 285 }286 $channel['description'] = RSSMessage($blog['description']);287 $channel['language'] = $blog['language'];288 $channel['pubDate'] = Timestamp::getRFC1123();289 $channel['generator'] = TEXTCUBE_NAME . ' ' . TEXTCUBE_VERSION;290 291 if ((getBlogSetting('visibility',2) == 2) && !empty($blog['logo']) && file_exists(ROOT."/attach/$blogid/{$blog['logo']}")) {292 $logoInfo = getimagesize(ROOT."/attach/$blogid/{$blog['logo']}");293 $channel['url'] = $serviceURL."/attach/".$blogid."/".$blog['logo'];294 $channel['width'] = $logoInfo[0];295 $channel['height'] = $logoInfo[1];296 300 } 297 301 $result = POD::queryAll("SELECT * … … 320 324 array_push($channel['items'], $item); 321 325 } 326 if($rawMode == true) return $channel['items']; 322 327 $rss = array('channel' => $channel); 323 328 return publishRSS($blogid, $rss); … … 328 333 329 334 if(empty($blogid)) $blogid = getBlogId(); 330 $isPublic = (getBlogSetting('visibility',2) == 2 ? true : false); 331 332 $channel = array(); 335 $channel = initializeRSSchannel($blogid); 333 336 $channel['title'] = RSSMessage($blog['title']. ': '._text('최근 댓글 알리미 목록')); 334 $channel['link'] = "$defaultURL/";335 $channel['description'] = RSSMessage($blog['description']);336 $channel['language'] = $blog['language'];337 $channel['pubDate'] = Timestamp::getRFC1123();338 $channel['generator'] = TEXTCUBE_NAME . ' ' . TEXTCUBE_VERSION;339 340 if ((getBlogSetting('visibility',2) == 2) && !empty($blog['logo']) && file_exists(ROOT."/attach/$blogid/{$blog['logo']}")) {341 $logoInfo = getimagesize(ROOT."/attach/$blogid/{$blog['logo']}");342 $channel['url'] = $serviceURL."/attach/".$blogid."/".$blog['logo'];343 $channel['width'] = $logoInfo[0];344 $channel['height'] = $logoInfo[1];345 }346 337 $mergedComments = array(); 347 338 list($comments, $paging) = getCommentsNotifiedWithPagingForOwner($blogid, '', '', '', '', 1, 20); -
trunk/lib/piece/blog/end.php
r5233 r5376 75 75 dress('link_rep', getLinksView(getLinks( $blogid ), $skin->s_link_rep), $view); 76 76 dress('rss_url', "$defaultURL/rss", $view); 77 dress('response_rss_url', "$defaultURL/rss/response", $view); 77 78 dress('comment_rss_url', "$defaultURL/rss/comment", $view); 78 79 dress('trackback_rss_url', "$defaultURL/rss/trackback", $view); -
trunk/lib/piece/blog/entries.php
r5285 r5376 13 13 $entryRsses = ''; 14 14 foreach ($entries as $entry) { 15 // $entryRsses .= '<link rel="alternate" type="application/rss+xml" '. 16 // 'title="Trackback: '.htmlspecialchars($entry['title']).' - '.htmlspecialchars($blog['title']).'" '. 17 // 'href="'.$defaultURL.'/rss/trackback/'.$entry['id'].'" />'.CRLF; 18 // $entryRsses .= '<link rel="alternate" type="application/rss+xml" '. 19 // 'title="Comment: '.htmlspecialchars($entry['title']).' - '.htmlspecialchars($blog['title']).'" '. 20 // 'href="'.$defaultURL.'/rss/comment/'.$entry['id'].'" />'.CRLF; 15 21 $entryRsses .= '<link rel="alternate" type="application/rss+xml" '. 16 'title="Trackback: '.htmlspecialchars($entry['title']).' - '.htmlspecialchars($blog['title']).'" '. 17 'href="'.$defaultURL.'/rss/trackback/'.$entry['id'].'" />'.CRLF; 18 $entryRsses .= '<link rel="alternate" type="application/rss+xml" '. 19 'title="Comment: '.htmlspecialchars($entry['title']).' - '.htmlspecialchars($blog['title']).'" '. 20 'href="'.$defaultURL.'/rss/comment/'.$entry['id'].'" />'.CRLF; 22 'title="Responses : '.htmlspecialchars($entry['title']).' - '.htmlspecialchars($blog['title']).'" '. 23 'href="'.$defaultURL.'/rss/response/'.$entry['id'].'" />'.CRLF; 21 24 } 22 25 if( getBlogSetting('useFOAF',1) && rtrim( $suri['url'], '/' ) == $pathURL ) { … … 114 117 dress('article_rep_rp_rssurl', $defaultURL.'/rss/comment/'.$entry['id'], $entryView); 115 118 dress('article_rep_tb_rssurl', $defaultURL.'/rss/trackback/'.$entry['id'], $entryView); 119 dress('article_rep_response_rssurl', $defaultURL.'/rss/response/'.$entry['id'], $entryView); 116 120 dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])), $entryView); 117 121 // 사용자가 작성한 본문은 lib/piece/blog/end.php의 removeAllTags() 다음에 처리하기 위한 조치. -
trunk/skin/coolant/skin.html
r5256 r5376 6 6 <meta http-equiv="Keywords" content="[##_meta_http_equiv_keywords_##]" /> 7 7 <link rel="alternate" type="application/rss+xml" title="[##_title_##]" href="[##_rss_url_##]" /> 8 <link rel="alternate" type="application/rss+xml" title="[##_title_##] : comment" href="[##_comment_rss_url_##]" /> 9 <link rel="alternate" type="application/rss+xml" title="[##_title_##] : trackback" href="[##_trackback_rss_url_##]" /> 8 <link rel="alternate" type="application/rss+xml" title="[##_title_##] : responses" href="[##_response_rss_url_##]" /> 10 9 <link rel="stylesheet" media="screen" type="text/css" href="./style.css" /> 11 10 <link rel="stylesheet" media="print" type="text/css" href="./styles/print.css" /> … … 302 301 </a> 303 302 </dd> 303 <dt class="response"><abbr title="Really Simple Syndication">RSS</dbbr> : </dt> 304 <dd> 305 [##_article_rep_response_rssurl_##] 306 </dd> 304 307 </dl> 305 308 </div> … … 310 313 <div class="trackback"> 311 314 <p class="url"><dfn>Trackback <abbr title="Uniform Resource Locator">URL</abbr></dfn> : [##_tb_address_##]</p> 312 <p class="url"><dfn>Trackback <abbr title="Really Simple Syndication">RSS</abbr></dfn> : [##_article_rep_tb_rssurl_##]</p>315 <!-- <p class="url"><dfn>Trackback <abbr title="Really Simple Syndication">RSS</abbr></dfn> : [##_article_rep_tb_rssurl_##]</p>--> 313 316 <s_tb_container> 314 317 … … 336 339 <h3>Comments List</h3> 337 340 <ol> 338 < li><span class="rssurl">Comment RSS : [##_article_rep_rp_rssurl_##]</span></li>341 <!--<li><span class="rssurl">Comment RSS : [##_article_rep_rp_rssurl_##]</span></li>--> 339 342 <s_rp_rep> 340 343 <li id="[##_rp_rep_id_##]" class="[##_rp_rep_class_##]"> … … 602 605 <a href="[##_rss_url_##]" class="rss" rel="alternate" type="application/rss+xml"> 603 606 Subscribe to <abbr title="Really Simple Syndication">RSS</abbr> articles</a><br /> 604 <a href="[##_comment_rss_url_##]" class="rss" rel="alternate" type="application/rss+xml">Subscribe to RSS comments</a> 605 <a href="[##_trackback_rss_url_##]" class="rss" rel="alternate" type="application/rss+xml">Subscribe to RSS trackbacks</a> 606 </div> 607 <a href="[##_response_rss_url_##]" class="rss" rel="alternate" type="application/rss+xml">Subscribe to RSS responses</a> 608 </div> 607 609 </s_sidebar_element> 608 610 </s_sidebar> -
trunk/skin/standard/skin.html
r5154 r5376 6 6 <meta http-equiv="Keywords" content="[##_meta_http_equiv_keywords_##]" /> 7 7 <link rel="alternate" type="application/rss+xml" title="[##_title_##]" href="[##_rss_url_##]" /> 8 <link rel="alternate" type="application/rss+xml" title="[##_title_##]" href="[##_comment_rss_url_##]" /> 8 <link rel="alternate" type="application/rss+xml" title="[##_title_##] : comments" href="[##_comment_rss_url_##]" /> 9 <link rel="alternate" type="application/rss+xml" title="[##_title_##] : trackbacks" href="[##_trackback_rss_url_##]" /> 10 <link rel="alternate" type="application/rss+xml" title="[##_title_##] : comments + trackbacks" href="[##_response_rss_url_##]" /> 9 11 <link rel="stylesheet" media="screen" type="text/css" href="./style.css" /> 10 12 <link rel="stylesheet" media="print" type="text/css" href="./images/print.css" /> … … 275 277 <a id="[##_article_rep_tb_cnt_id_##]" href="#tb" onclick="[##_article_rep_tb_link_##]"><s_tb_count> 트랙백 <span class="cnt">[##_article_rep_tb_cnt_##]</span>개</s_tb_count></a>, 276 278 <a id="[##_article_rep_rp_cnt_id_##]" href="#rp" onclick="[##_article_rep_rp_link_##]"><s_rp_count> 댓글 <span class="cnt">[##_article_rep_rp_cnt_##]</span>개가 달렸습니다.</s_rp_count></a> 279 <h3>댓글+트랙백 RSS :: [##_article_rep_response_rssurl_##]</h3> 277 280 </div> 278 281 … … 598 601 <img src="./images/rss.gif" alt="rss"/>트랙백</a> 599 602 </div> 603 <div class="botton"> 604 <a href="[##_response_rss_url_##]" onclick="window.open(this.href); return false"> 605 <img src="./images/rss.gif" alt="rss"/>댓글+트랙백</a> 606 </div> 600 607 </s_sidebar_element> 601 608 </s_sidebar>
