Пример #1
0
<p>
<?php if ($comment->PendingReview): ?>
<a href="<?php echo blog_link("/comments/accept/".$article->ID."/".$comment->ID) ?>">[Accept]</a>
<?php else: ?>
<a href="<?php echo blog_link("/comments/reject/".$article->ID."/".$comment->ID) ?>">[Reject]</a>
<?php endif; ?>
<a href="<?php echo blog_link("/comments/delete/".$article->ID."/".$comment->ID) ?>" onClick="return confirm('Are you sure you want to delete this comment?')">[Delete]</a>
<a href="javascript:appendEmail('<?php echo htmlspecialchars($comment->Email) ?>')">[Reply]</a>
</p>
</div>
<?php endif ?>

<div class="blog_comment<?php echo $comment->ByAuthor ? " blog_authorcomment" : "" ?>">
<div class="blog_comment_gravatar"><img src="http://www.gravatar.com/avatar/<?php echo md5(strtolower($comment->Email)) ?>?s=60&d=<?php echo urlencode("http://".$_SERVER['HTTP_HOST']."/theme/default_gravatar_image.png")?>" width="60" height="60"></div>
<div class="blog_comment_content">
<span style="float:right"><small>Posted <?php echo formatRelativeTime($comment->TimeStamp)?></small></span>
<p class="blog_comment_title"><?php echo $comment->FormatNameLink() ?> says:</p>
<?php echo $comment->Format() ?>
</div>
<div class="clearer"></div>
</div>

<?php endforeach; ?>
</div>
<?php endif; ?>

<?php if ($model['blog']['enableComments'] && !function_exists(jabRenderDisqusLink)): ?>
<h3>Leave A Comment</h3>
<?php if ($model['preview']): ?>
<p class="startpreview">Preview</p>
<h2>Comment by <?php echo $model['comment']->Name?></h2>
Пример #2
0
        }
        ?>

<?php 
        // ---------------- Article -----------------
        ?>
<div class="blog_article">
<h2><?php 
        echo htmlspecialchars($article->Title);
        ?>
</h2>
<?php 
        echo $article->Format();
        ?>
<p><small>Posted <?php 
        echo formatRelativeTime($article->TimeStamp);
        ?>
</small></p>
<p>
<?php 
        if (function_exists(jabRenderShareLink)) {
            jabRenderShareLink($article->Title, "http://" . $_SERVER['HTTP_HOST'] . $article->FullUrl());
        }
        if ($model['blog']['enableComments']) {
            if (function_exists(jabRenderDisqusLink)) {
                jabRenderDisqusLink($article->FullUrl());
            } else {
                echo "<span class=\"blog_comment_button\"><a href=\"" . $article->FullUrl() . "\">Read or Leave Comments</a> (" . $article->GetCommentCount(jabCanUser("author")) . ")</span>\n";
            }
        } else {
            echo "<a href=\"" . $article->FullUrl() . "\">Permalink</a>\n";