$skin->replace('base_domain', $_SERVER['HTTP_HOST'].$servicePath); $skin->replace('bloglounge_name', BLOGLOUNGE); $skin->replace('bloglounge_version', BLOGLOUNGE_NAME); $skin->replace('random_blog', $service['path'].'/random'); $skin->replace('position', empty($accessInfo['controller'])?'index':$accessInfo['controller']); // ** 갯수 정보 $skin->replace('feed_count', Feed::getFeedCount()); $skin->replace('feeditem_count', FeedItem::getFeedItemCount()); $skin->replace('tag_count', Tag::getTagCount()); // *** 로고 $s_logo = $skin->cutSkinTag('logo_image'); $s_logo = $skin->parseTag('logo_url', $servicePath.'/cache/logo/'.$config->logo, $s_logo); $skin->dress('logo_image', $s_logo); if(!empty($config->logo) && file_exists(ROOT.'/cache/logo/'.$config->logo)) { $skin->replace('logo_image_exist', 'logo_image_exist'); } else { $skin->replace('logo_image_exist', 'logo_image_nonexistence'); } $s_logo = $skin->cutSkinTag('logo_text'); $skin->dress('logo_text', $s_logo); // *** 회원 메뉴 영역 if (!isLoggedIn()) { // 로그인 되어있지 않은 비회원(손님) $s_guest = $skin->cutSkinTag('guest');
function pretty_dress($view) { global $blogid, $blog, $database, $service, $stats, $skinSetting; $context = Model_Context::getInstance(); /* local static */ global $pd_category, $pd_categoryXhtml, $pd_archive, $pd_calendar, $pd_tags, $pd_notices, $pd_recentEntry; global $pd_recentComment, $pd_recentTrackback, $pd_link, $pd_authorList; if (isset($_REQUEST['safe'])) { // safe mode return '<div class="coverpage-element-safebox">…</div>'; } if (isset($_REQUEST['tag'])) { // safe mode return '<div class="coverpage-element-safebox"><p>' . nl2br(htmlspecialchars($view, ENT_QUOTES)) . '</p></div>'; } $writer = User::getBlogOwnerName($blogid); $pageTitle = _t('페이지 제목'); dress('page_title', htmlspecialchars($pageTitle), $view); dress('blogger', htmlspecialchars($writer), $view); dress('title', htmlspecialchars($context->getProperty('blog.title')), $view); dress('desc', htmlspecialchars($context->getProperty('blog.description')), $view); if ($context->getProperty('blog.logo') != null) { dress('image', $context->getProperty('service.path') . "/attach/{$blogid}/" . $context->getProperty('blog.logo'), $view); } else { dress('image', $context->getProperty('service.path') . "/resources/image/spacer.gif", $view); } dress('blog_link', $context->getProperty('uri.blog') . "/", $view); dress('keylog_link', $context->getProperty('uri.blog') . "/keylog", $view); dress('localog_link', $context->getProperty('uri.blog') . "/location", $view); dress('taglog_link', $context->getProperty('uri.blog') . "/tag", $view); dress('guestbook_link', $context->getProperty('uri.blog') . "/guestbook", $view); list($view, $searchView) = Skin::cutSkinTag($view, 'search'); dress('search_name', 'search', $searchView); dress('search_text', isset($search) ? htmlspecialchars($search) : '', $searchView); dress('search_onclick_submit', 'searchBlog()', $searchView); dress('search', '<form id="TTSearchForm" action="' . parseURL($context->getProperty('uri.blog') . '/search/') . '" method="get" onsubmit="return searchBlog()">' . $searchView . '</form>', $view); dress('category', $pd_category, $view); dress('category_list', $pd_categoryXhtml, $view); dress('count_total', $stats['total'], $view); dress('count_today', $stats['today'], $view); dress('count_yesterday', $stats['yesterday'], $view); list($view, $archiveView) = Skin::cutSkinTag($view, 'archive_rep'); dress('archive_rep', getArchivesView($pd_archive, $archiveView), $view); dress('calendar', $pd_calendar, $view); list($view, $randomView) = Skin::cutSkinTag($view, 'random_tags'); dress('random_tags', getRandomTagsView($pd_tags, $randomView), $view); list($view, $recentNoticeItem) = Skin::cutSkinTag($view, 'rct_notice_rep'); list($view, $noticeView) = Skin::cutSkinTag($view, 'rct_notice'); $notices = $pd_notices; if (sizeof($notices) == 0) { $notices = array(array('title' => _t('공지 제목'), 'id' => -1)); } if (sizeof($notices) > 0) { $itemsView = ''; foreach ($notices as $notice) { $itemView = $recentNoticeItem; dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', Utils_Unicode::lessenAsEm($notice['title'], $skinSetting['recentNoticeLength']), $notice['id'])), $itemView); dress('notice_rep_link', "{$context->getProperty}('uri.blog')/notice/{$notice['id']}", $itemView); $itemsView .= $itemView; } dress('rct_notice_rep', $itemsView, $noticeView); dress('rct_notice', $noticeView, $view); } list($view, $authorList) = Skin::cutSkinTag($view, 'author_rep'); dress('author_rep', getAuthorListView($pd_authorList, $authorList), $view); list($view, $recentEntry) = Skin::cutSkinTag($view, 'rctps_rep'); dress('rctps_rep', getRecentEntriesView($pd_recentEntry, null, $recentEntry), $view); list($view, $recentComments) = Skin::cutSkinTag($view, 'rctrp_rep'); dress('rctrp_rep', getRecentCommentsView($pd_recentComment, null, $recentComments), $view); list($view, $recentTrackback) = Skin::cutSkinTag($view, 'rcttb_rep'); dress('rcttb_rep', getRecentTrackbacksView($pd_recentTrackback, null, $recentTrackback), $view); list($view, $s_link_rep) = Skin::cutSkinTag($view, 'link_rep'); dress('link_rep', getLinksView($pd_link, $s_link_rep), $view); dress('rss_url', "{$context->getProperty}('uri.blog')/rss", $view); dress('owner_url', "{$context->getProperty}('uri.blog')/owner", $view); dress('textcube_name', TEXTCUBE_NAME, $view); dress('textcube_version', TEXTCUBE_VERSION, $view); $tagSearches = array('@<a @i', '@</a *>@i', '@ id *= *".*"@isU', '@ onkey(down|up|press) *="@i', '@ on(click|load|unload) *="@i', '@<input +@i', '@<script.*</script *>@siU', '@<form @siU', '@</form>@siU'); $tagReplaces = array('<span ', '</span>', '', ' onnothing="', ' onnothing="', '<input disabled="disabled" ', '', '<div ', '</div>'); $view = preg_replace($tagSearches, $tagReplaces, $view); return correctCoverpageImage($view); }
<?php /// Copyright (c) 2004-2016, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) $IV = array('POST' => array('skinCode' => array('string'), 'currentCode' => array('string', 'mandatory' => false), 'currentTag' => array('string'), 'nextTag' => array('string'))); require ROOT . '/library/preprocessor.php'; importlib('blogskin'); requireStrictRoute(); if ($_POST['currentTag'] != 'all') { list($refCode, $inner) = Skin::cutSkinTag($_POST['skinCode'], $_POST['currentTag'], '<s_' . $_POST['currentTag'] . '>' . $_POST['currentCode'] . '</s_' . $_POST['currentTag'] . '>'); } else { $refCode = $_POST['currentCode']; } if ($_POST['nextTag'] != 'all') { list($outer, $inner) = Skin::cutSkinTag($refCode, $_POST['nextTag']); } else { $inner = $refCode; } $result = array("error" => "0", "code" => $inner, 'skinCode' => $refCode); Respond::PrintResult($result);