Skip to content

Commit

Permalink
refs #1443
Browse files Browse the repository at this point in the history
  * Skin-markup added (similar to notice -related commands)
  * TODO
   * BodyId check
   * TTXML import / export
  • Loading branch information
inureyes committed Dec 30, 2010
1 parent f76fd41 commit 45d9f37
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 6 deletions.
1 change: 0 additions & 1 deletion framework/id/textcube/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@
$service['debug_rewrite_module'] = false;
$service['useNumericURLonRSS'] = false;
$service['forceinstall'] = false;
$service['adminskin'] = 'canon';
?>
34 changes: 33 additions & 1 deletion interface/blog/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,37 @@
/// Copyright (c) 2004-2010, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/interface/blog/notice.php';
require ROOT . '/library/preprocessor.php';

if (isset($suri['id']) || (isset($suri['value']) && strlen($suri['value']) > 0)) {
if (!isset($suri['id']) || (Setting::getBlogSettingGlobal('useSloganOnPost',1) == 1)) {
list($entries, $paging) = getEntryWithPagingBySlogan($blogid, $suri['value'], true);
} else {
list($entries, $paging) = getEntryWithPaging($blogid, $suri['id'], true);
}
fireEvent('OBStart');
require ROOT . '/interface/common/blog/begin.php';

if (empty($entries)) {
header('HTTP/1.1 404 Not Found');
if (empty($skin->pageError)) {
dress('article_rep', '<div class="TCwarning">' . _text('존재하지 않는 페이지입니다.') . '</div>', $view);
} else {
dress('article_rep', NULL, $view);
dress('page_error', $skin->pageError, $view);
}
unset($paging);
} else {
require ROOT . '/interface/common/blog/entries.php';
}
require ROOT . '/interface/common/blog/end.php';
fireEvent('OBEnd');
} else {
list($entries, $paging) = getEntriesWithPagingByPage($blogid, $suri['page'], $blog['entriesOnPage']);
fireEvent('OBStart');
require ROOT . '/interface/common/blog/begin.php';
require ROOT . '/interface/common/blog/entries.php';
require ROOT . '/interface/common/blog/end.php';
fireEvent('OBEnd');
}
?>
15 changes: 15 additions & 0 deletions interface/common/blog/entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
dress('notice_rep_author_link', $blogURL."/author/".rawurlencode(User::getName($entry['userid'])), $entryView);
$entriesView .= $entryView;

} else if ($entry['category'] == - 3) { // This is page
$entryView = $skin->pageItem;
dress('page_rep_microformat_published', Timestamp::getISO8601($entry['published']), $entryView);
dress('page_rep_microformat_updated', Timestamp::getISO8601($entry['modified']), $entryView);
dress('page_rep_date', fireEvent('ViewNoticeDate', Timestamp::format5($entry['published']), $entry['published']), $entryView);
dress('page_rep_date_modified', fireEvent('ViewNoticeDate', Timestamp::format5($entry['modified']), $entry['modified']), $entryView);
dress('page_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', $entry['title'], $entry['id'])), $entryView);
dress('page_rep_link', $permalink, $entryView);

// 사용자가 작성한 본문은 interface/common/blog/end.php의 removeAllTags() 다음에 처리하기 위한 조치.
$contentContainer["page_{$entry['id']}"] = getEntryContentView($blogid, $entry['id'], $entry['content'], $entry['contentformatter'], getKeywordNames($blogid), 'Page');
dress('page_rep_desc', setTempTag("page_{$entry['id']}"), $entryView);
dress('page_rep_author', User::getName($entry['userid']), $entryView);
dress('page_rep_author_link', $blogURL."/author/".rawurlencode(User::getName($entry['userid'])), $entryView);
$entriesView .= $entryView;
} else if (doesHaveOwnership() || ($entry['visibility'] >= 2) || (isset($_COOKIE['GUEST_PASSWORD']) && (trim($_COOKIE['GUEST_PASSWORD']) == trim($entry['password'])))) { // This is post
$entryView = $skin->entry;
$entryView = '<a id="entry_'.$entry['id'].'"></a>'.CRLF.$entryView;
Expand Down
2 changes: 2 additions & 0 deletions library/blog.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Skin {
var $noticeItem;
var $recentNotice;
var $recentNoticeItem;
var $pageItem;
var $locative;
var $locativeSpot;
var $locativeEntry;
Expand Down Expand Up @@ -227,6 +228,7 @@ function __construct($name, $previewMode = false) {
list($sval, $this->keyword) = $this->cutSkinTag($sval, 'keyword');

list($sval, $this->noticeItem) = $this->cutSkinTag($sval, 'notice_rep');
list($sval, $this->pageItem) = $this->cutSkinTag($sval, 'page_rep');
list($sval, $this->keylogItem) = $this->cutSkinTag($sval, 'keylog_rep');
list($sval, $this->recentNoticeItem) = $this->cutSkinTag($sval, 'rct_notice_rep');
list($sval, $this->recentNotice) = $this->cutSkinTag($sval, 'rct_notice');
Expand Down
1 change: 0 additions & 1 deletion library/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
}
if(isset($service['codecache'])
&& $service['codecache'] == true && $codeCacheRead == false) {
requireComponent('Needlworks.Cache.PageCache');
$libCode = new CodeCache();
$libCode->name = $codeName;
$libCode->save();
Expand Down
2 changes: 0 additions & 2 deletions library/preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@
if($browser->isMobile()) {
$context->setProperty('panel.skin', "/skin/admin/mobile");
} else {

if(!is_null($context->getProperty('service.adminskin'))) {
$context->setProperty('panel.skin',"/skin/admin/".$context->getProperty('service.adminskin'));
} else {
Expand Down Expand Up @@ -254,7 +253,6 @@
else if($blogVisibility == 1) requireMembership();
}
}

if(in_array($context->getProperty('uri.interfaceType'), array('owner','reader'))) {
requireOwnership(); // Check access control list
if(!empty($_SESSION['acl'])) {
Expand Down
2 changes: 1 addition & 1 deletion skin/blog/coolant/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<skin>
<information>
<name>Coolant (textcube ver.)</name>
<version>3.0.3</version>
<version>3.1.0</version>
<description>
<![CDATA[본문 이미지 최대 가로 사이즈: 450px
]]>
Expand Down
17 changes: 17 additions & 0 deletions skin/blog/coolant/skin.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ <h1><a href="[##_blog_link_##]">[##_title_##]</a></h1>
<ul>
<li class="tab_home"><a href="[##_blog_link_##]">Home</a></li>
<li class="tab_cover"><a href="[##_blog_link_##]cover">Cover</a></li>
<li class="tab_post"><a href="[##_blog_link_##]entry">Posts</a></li>
<li class="tab_page"><a href="[##_blog_link_##]page">Pages</a></li>
<li class="tab_notice"><a href="[##_blog_link_##]notice">Notice</a></li>
<li class="tab_tag"><a href="[##_taglog_link_##]">Tag List</a></li>
<li class="tab_location"><a href="[##_localog_link_##]">Location Log</a></li>
Expand Down Expand Up @@ -245,6 +247,21 @@ <h2>[##_keylog_rep_title_##]</h2>
<div class="article">[##_keylog_rep_desc_##]</div>
</div>
</s_keylog_rep>
<s_page_rep>
<div class="entry page">
<div class="subject">
<h2><a href="[##_page_rep_link_##]">[##_page_rep_title_##]</a></h2>
<ul class="postInfo">
<li class="infoDate"><dfn>Posted</dfn> at [##_page_rep_date_##]</li>
<li class="infoCategory">Static page</li>
</ul>
</div>
<div class="article">
[##_page_rep_desc_##]
<p class="infoAuthor"><span><dfn>Posted</dfn> by</span> <cite>[##_page_rep_author_##]</cite></p>
</div>
</div>
</s_page_rep>
<s_notice_rep>
<div class="entry">
<div class="subject">
Expand Down

0 comments on commit 45d9f37

Please # to comment.