<?php /// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) dress('guest', "<div id=\"entry0Comment\">" . getCommentView(null, $skin) . '</div>', $view);
} $skin = new Skin($context->getProperty('skin.skin')); printHtmlHeader(); ?> <script type="text/javascript"> //<![CDATA[ alert("<?php echo _text('댓글이 등록되었습니다.'); ?> "); <?php notifyComment(); $entry = array(); $entry['id'] = $comment['entry']; $entry['slogan'] = getSloganById($blogid, $entry['id']); $tempComments = revertTempTags(removeAllTags(getCommentView($entry, $skin))); $tempRecentComments = revertTempTags(getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem)); ?> if (opener == null) { loader = parent; } else { loader = opener; } try { var obj = loader.document.getElementById("entry<?php echo $comment['entry']; ?> Comment"); obj.innerHTML = "<?php echo str_innerHTML($tempComments); ?>
$pool->setQualifier('visibility', 'equals', 3); $pool->setQualifier('acceptcomment', 'equals', 1); $row = $pool->getAll('*'); if (!empty($row)) { sendCommentPing($entryId, $context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$row['slogan']}" : $entryId), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']); } } importlib('model.blog.skin'); $skin = new Skin($context->getProperty('skin.skin')); if ($entryId > 0) { $commentBlock = getCommentView($entry, $skin); dress('article_rep_id', $entryId, $commentBlock); $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock))); $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem))); $commentCount = getCommentCount($blogid, $entryId); $commentCount = $commentCount > 0 ? $commentCount : 0; list($tempTag, $commentView) = getCommentCountPart($commentCount, $skin); } else { $commentView = ''; $commentBlock = getCommentView($entry, $skin); dress('article_rep_id', $entryId, $commentBlock); $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock))); $commentCount = 0; $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), $skin->recentComment, $skin->recentCommentItem))); } Respond::PrintResult(array('error' => 0, 'commentView' => $commentView, 'commentCount' => $commentCount, 'commentBlock' => $commentBlock, 'recentCommentBlock' => $recentCommentBlock)); exit; } } } }
<?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) require ROOT . '/library/preprocessor.php'; importlib('model.blog.entry'); $context = Model_Context::getInstance(); $skin = new Skin($context->getProperty('skin.skin')); $entry = array(); $entry['id'] = $suri['id']; $entry['slogan'] = getSloganById($blogid, $entry['id']); $IV = array('POST' => array('page' => array('int', 1), 'listOnly' => array('int', 0, 1))); $result['error'] = 0; $result['commentBlock'] = revertTempTags(removeAllTags(getCommentView($entry, $skin, $_POST['listOnly'] ? false : true, $_POST['page'], 20, true))); Respond::PrintResult($result);
} else { if (doesHaveOwnership() || $entry['visibility'] >= 2 || isset($_COOKIE[$context->getProperty('service.cookie_prefix') . 'GUEST_PASSWORD']) && trim($_COOKIE[$context->getProperty('service.cookie_prefix') . 'GUEST_PASSWORD']) == trim($entry['password'])) { // This is post $entryView = $skin->entry; $entryView = '<a id="entry_' . $entry['id'] . '"></a>' . CRLF . $entryView; dress('tb', getTrackbacksView($entry, $skin, $entry['accepttrackback']), $entryView); if (!$context->getProperty('blog.showCommentBox', false) && $context->getProperty('blog.useAjaxComment', true) && !$context->getProperty('skin.expandComment', false)) { $commentBlockStyle = 'none'; } else { if ($context->getProperty('skin.expandComment', false) || ($context->getProperty('suri.directive', '/') == '/' || $context->getProperty('suri.directive', '/') == '/entry') && $context->getProperty('suri.value', '') != '') { $commentBlockStyle = 'block'; } else { $commentBlockStyle = 'none'; } } dress('rp', "<div id=\"entry{$entry['id']}Comment\" style=\"display:{$commentBlockStyle}\">" . ($commentBlockStyle == 'none' ? '' : getCommentView($entry, $skin)) . "</div>", $entryView); $tagLabelView = $skin->tagLabel; $entryTags = getTags($entry['blogid'], $entry['id']); if (sizeof($entryTags) > 0) { $tags = array(); $relTag = Setting::getBlogSettingGlobal('useMicroformat', 3) > 1 && (count($entries) == 1 || !empty($skin->hentryExisted)); foreach ($entryTags as $entryTag) { $tags[$entryTag['name']] = "<a href=\"" . $context->getProperty('uri.default') . "/tag/" . (Setting::getBlogSettingGlobal('useSloganOnTag', true) ? URL::encode($entryTag['name'], $service['useEncodedURL']) : $entryTag['id']) . '"' . ($relTag ? ' rel="tag"' : '') . '>' . htmlspecialchars($entryTag['name']) . '</a>'; array_push($totalTags, $entryTag['name']); } $tags = fireEvent('ViewTagLists', $tags, $entry['id']); dress('tag_label_rep', implode(",\r\n", array_values($tags)), $tagLabelView); dress('tag_label', $tagLabelView, $entryView); } if (doesHaveOwnership() && ($entry['userid'] == getUserId() || Acl::check('group.editors') === true)) { $managementView = $skin->management;
} 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; dress('tb', getTrackbacksView($entry, $skin, $entry['accepttrackback']), $entryView); if (!$context->getProperty('blog.showCommentBox', false) && $context->getProperty('blog.useAjaxComment', true)) { $style = 'none'; } else { if ($context->getProperty('skin.expandComment', true) || ($context->getProperty('suri.directive', '/') == '/' || $context->getProperty('suri.directive', '/') == '/entry') && $context->getProperty('suri.value', '') != '') { $style = 'block'; } else { $style = 'none'; } } dress('rp', "<div id=\"entry{$entry['id']}Comment\" style=\"display:{$style}\">" . (!$context->getProperty('blog.showCommentBox', false) && $context->getProperty('blog.useAjaxComment', true) ? '' : getCommentView($entry, $skin)) . "</div>", $entryView); $tagLabelView = $skin->tagLabel; $entryTags = getTags($entry['blogid'], $entry['id']); if (sizeof($entryTags) > 0) { $tags = array(); $relTag = Setting::getBlogSettingGlobal('useMicroformat', 3) > 1 && (count($entries) == 1 || !empty($skin->hentryExisted)); foreach ($entryTags as $entryTag) { $tags[$entryTag['name']] = "<a href=\"" . $context->getProperty('uri.default') . "/tag/" . (Setting::getBlogSettingGlobal('useSloganOnTag', true) ? URL::encode($entryTag['name'], $service['useEncodedURL']) : $entryTag['id']) . '"' . ($relTag ? ' rel="tag"' : '') . '>' . htmlspecialchars($entryTag['name']) . '</a>'; array_push($totalTags, $entryTag['name']); } $tags = fireEvent('ViewTagLists', $tags, $entry['id']); dress('tag_label_rep', implode(",\r\n", array_values($tags)), $tagLabelView); dress('tag_label', $tagLabelView, $entryView); } if (doesHaveOwnership() && ($entry['userid'] == getUserId() || Acl::check('group.editors') === true)) { $managementView = $skin->management;