Exemple #1
0
function printMobileCommentView($entryId)
{
    global $blogURL;
    $comments = getComments($entryId);
    if (count($comments) == 0) {
        ?>
		<div class="comment">
			<?php 
        echo _text('댓글이 없습니다');
        ?>
		</div>
		<hr />
		<?php 
    } else {
        foreach ($comments as $commentItem) {
            ?>
		<div class="comment">
			<div class="name">
				<?php 
            if (!empty($commentItem['name'])) {
                ?>
<strong><?php 
                echo htmlspecialchars($commentItem['name']);
                ?>
</strong><?php 
            }
            ?>
				<a href="<?php 
            echo $blogURL;
            ?>
/comment/comment/<?php 
            echo $commentItem['id'];
            ?>
">RE</a>
				<a href="<?php 
            echo $blogURL;
            ?>
/comment/delete/<?php 
            echo $commentItem['id'];
            ?>
">DEL</a><br />
				(<?php 
            echo Timestamp::format5($commentItem['written']);
            ?>
)
			</div>
			<div class="body"><?php 
            echo ($commentItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . _t('비밀 댓글') . ' &gt;&gt;</div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentItem['comment'])));
            ?>
</div>
			<?php 
            foreach (getCommentComments($commentItem['id']) as $commentSubItem) {
                ?>
			<blockquote>
				<div class="name">
					<?php 
                if (!empty($commentSubItem['name'])) {
                    ?>
<strong><?php 
                    echo htmlspecialchars($commentSubItem['name']);
                    ?>
</strong><?php 
                }
                ?>
					<a href="<?php 
                echo $blogURL;
                ?>
/comment/delete/<?php 
                echo $commentSubItem['id'];
                ?>
">DEL</a><br />
					(<?php 
                echo Timestamp::format5($commentSubItem['written']);
                ?>
)
				</div>
				<div class="body"><?php 
                echo ($commentSubItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . _t('비밀 댓글') . ' &gt;&gt;</div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentSubItem['comment'])));
                ?>
</div>
			</blockquote>
			<?php 
            }
            ?>
		</div>
		<hr />
		<?php 
        }
    }
    printMobileCommentFormView($entryId);
}
Exemple #2
0
<?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)
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
printMobileHTMLHeader();
printMobileHTMLMenu('', 'comment');
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 
printMobileCommentFormView($suri['id'], _text('댓글에 답글 달기'), 'comment/comment');
?>
	<fieldset class="navi margin-top10">
	<?php 
printMobileNavigation($entry);
?>
	</fieldset>
</div>
<?php 
printMobileHTMLFooter();
Exemple #3
0
<?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_MOBILE__', true);
require ROOT . '/library/preprocessor.php';
requireView('mobileView');
list($entryId) = getCommentAttributes($blogid, $suri['id'], 'entry');
list($entries, $paging) = getEntryWithPaging($blogid, $entryId);
$entry = $entries ? $entries[0] : null;
printMobileHtmlHeader();
?>
<div id="content">
<h2><?php 
echo _text('댓글에 댓글을 작성합니다.');
?>
</h2>
<?php 
printMobileCommentFormView($suri['id']);
?>
</div>
<?php 
printMobileNavigation($entry);
printMobileHtmlFooter();
Exemple #4
0
function printMobileCommentView($entryId, $page = null, $mode = null)
{
    $context = Model_Context::getInstance();
    $blogid = $context->getProperty('blog.id');
    global $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) {
        ?>
		<div class="center ui-bar ui-bar-e"><?php 
        echo $entryId == 0 ? _text('방명록이 없습니다') : _text('댓글이 없습니다');
        ?>
</div>
		<?php 
    } else {
        foreach ($comments as $commentItem) {
            ?>
		<ul data-role="listview" data-inset="true" id="comment_<?php 
            echo $commentItem['id'];
            ?>
" class="comment">
			<li class="group">
				<p class="left">
					<?php 
            if (!empty($commentItem['name'])) {
                ?>
<strong><?php 
                echo htmlspecialchars($commentItem['name']);
                ?>
</strong><?php 
            }
            ?>
				</p>
				<p class="ui-li-aside">
					<?php 
            echo Timestamp::format5($commentItem['written']);
            ?>
				</p>
				<p class="right">
					<div class="comment_button" data-role="controlgroup" data-type="horizontal">
						<a href="<?php 
            echo $context->getProperty('uri.blog');
            ?>
/comment/comment/<?php 
            echo $commentItem['id'];
            ?>
" data-role="button" data-icon="plus" data-iconpos="notext"><?php 
            echo $entryId == 0 ? _text('방명록에 댓글 달기') : _text('댓글에 댓글 달기');
            ?>
</a> 
						<a href="<?php 
            echo $context->getProperty('uri.blog');
            ?>
/comment/delete/<?php 
            echo $commentItem['id'];
            ?>
" data-role="button" data-icon="delete" data-iconpos="notext"><?php 
            echo _text('지우기');
            ?>
</a>
					</div>
				</p>
			</li>
			<li class="body">
				<?php 
            echo ($commentItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . ($entryId == 0 ? _text('비밀 방명록') : _text('비밀 댓글')) . ' &gt;&gt;</div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentItem['comment'])));
            ?>
			</li>
			<?php 
            foreach (getCommentComments($commentItem['id']) as $commentSubItem) {
                ?>
			<li class="groupSub">
				<p class="left">Re :
					<?php 
                if (!empty($commentSubItem['name'])) {
                    ?>
<strong><?php 
                    echo htmlspecialchars($commentSubItem['name']);
                    ?>
</strong><?php 
                }
                ?>
				</p>
				<p class="ui-li-aside">
					<?php 
                echo Timestamp::format5($commentSubItem['written']);
                ?>
				</p>
				<p class="right">
					<div class="comment_button" data-role="controlgroup" data-type="horizontal">
						<a href="<?php 
                echo $context->getProperty('uri.blog');
                ?>
/comment/delete/<?php 
                echo $commentSubItem['id'];
                ?>
" data-role="button" data-icon="delete" data-inline="true" data-iconpos="notext"><?php 
                echo _text('지우기');
                ?>
</a>
					</div>
				</p>
			</li>
			<li class="body">
				<?php 
                echo ($commentSubItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . _t('비밀 댓글') . ' &gt;</div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentSubItem['comment'])));
                ?>
			</li>
			<?php 
            }
            ?>
		</ul>
		<?php 
        }
    }
    if ($mode != 'recent') {
        printMobileCommentFormView($entryId, $entryId == 0 ? _text('방명록 쓰기') : _text('댓글 쓰기'), 'comment');
    }
    return array($comments, $paging);
}