function printIphoneCommentView($entryId, $page = null, $mode = null) { global $blogURL, $blogid, $skinSetting, $paging; if ($mode == 'recent') { // Recent comments list($comments, $paging) = getCommentsWithPaging($blogid, $page, 10, null, '?page='); } else { if (!is_null($page)) { // Guestbook list($comments, $paging) = getCommentsWithPagingForGuestbook($blogid, $page, $skinSetting['commentsOnGuestbook']); } else { // Comments related to specific article $comments = getComments($entryId); } } if (count($comments) == 0) { ?> <p> <?php echo $entryId == 0 ? _text('방명록이 없습니다') : _text('댓글이 없습니다'); ?> </p> <?php } else { foreach ($comments as $commentItem) { ?> <ul id="comment_<?php echo $commentItem['id']; ?> " class="comment"> <li class="group"> <span class="left"> <?php if (!empty($commentItem['name'])) { ?> <strong><?php echo htmlspecialchars($commentItem['name']); ?> </strong><?php } ?> (<?php echo Timestamp::format5($commentItem['written']); ?> ) </span> <span class="right"> <a href="<?php echo $blogURL; ?> /comment/comment/<?php echo $commentItem['id']; ?> "><?php echo $entryId == 0 ? _text('방명록에 댓글 달기') : _text('댓글에 댓글 달기'); ?> </a> : <a href="<?php echo $blogURL; ?> /comment/delete/<?php echo $commentItem['id']; ?> "><?php echo _text('지우기'); ?> </a> </span> </li> <li class="body"> <?php echo ($commentItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . ($entryId == 0 ? _text('비밀 방명록') : _text('비밀 댓글')) . ' >></div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentItem['comment']))); ?> </li> <?php foreach (getCommentComments($commentItem['id']) as $commentSubItem) { ?> <li class="groupSub"> <span class="left"> Re : <?php if (!empty($commentSubItem['name'])) { ?> <strong><?php echo htmlspecialchars($commentSubItem['name']); ?> </strong><?php } ?> (<?php echo Timestamp::format5($commentSubItem['written']); ?> ) </span> <span class="right"> <a href="<?php echo $blogURL; ?> /comment/delete/<?php echo $commentSubItem['id']; ?> ">DEL</a><br /> </span> </li> <li class="body"> <?php echo ($commentSubItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . _t('Secret Comment') . ' >></div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentSubItem['comment']))); ?> </li> <?php } ?> </ul> <?php } } if ($mode != 'recent') { printIphoneCommentFormView($entryId, $entryId == 0 ? _text('방명록 쓰기') : _text('댓글 쓰기'), 'comment'); } }
<?php /// Copyright (c) 2004-2011, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) define('__TEXTCUBE_IPHONE__', true); require ROOT . '/library/preprocessor.php'; requireView('iphoneView'); list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry'); list($entries, $paging) = getEntryWithPaging($blogid, $entryId); $entry = $entries ? $entries[0] : null; ?> <div id="comment_reply_<?php echo $suri['id'] . "_" . time(); ?> " title="Comment reply" selected="false"> <?php printIphoneCommentFormView($suri['id'], _text('댓글에 답글 달기'), 'comment/comment'); ?> <fieldset class="navi margin-top10"> <?php printIphoneNavigation($entry); ?> </fieldset> </div>