function FullUrl() { return blog_link("/posts/" . $this->ID . "/" . $this->UrlTitle()); }
?> </h1> <h2><?php echo htmlspecialchars($model['blog']['description']); ?> </h2> <?php // ---------------- Command Bar----------------- ?> <p> <a href="<?php echo blog_link("/index"); ?> ">Articles</a> | <a href="<?php echo blog_link("/feed.rss"); ?> ">RSS Feed</a> <?php if (jabCanUser("author")) { ?> | <a href="/<?php echo $model['blog']['routePrefix']; ?> /drafts">Drafts</a> | <a href="/<?php echo $model['blog']['routePrefix']; ?> /edit/new">New Post</a> </p> <hr/>
?> <p><small>Posted by <?php echo htmlspecialchars($model['comment']->Name); if ($model['comment']->Email) { ?> (<?php echo htmlspecialchars($model['comment']->Email); ?> ) <?php } ?> </small></p> <p class="endpreview">End Comment</p> <p> <a href="http://<?php echo $_SERVER['HTTP_HOST'] . $model['article']->FullUrl(); ?> ">[View]</a> <a href="http://<?php echo $_SERVER['HTTP_HOST'] . blog_link("/comments/accept/") . $model['article']->ID . "/" . $model['comment']->ID; ?> ">[Accept]</a> <a href="http://<?php echo $_SERVER['HTTP_HOST'] . blog_link("/comments/delete/") . $model['article']->ID . "/" . $model['comment']->ID; ?> ">[Delete]</a> </p>
<?php jabRequire("forms"); $view['additional_head_tags'] .= " <link rel=\"alternate\" type=\"application/rss+xml\" title=\"Get RSS 2.0 Feed\" href=\"" . blog_link("/feed.rss") . "\" />\n"; $article = $model['article']; ?> <h1><?php echo htmlspecialchars($model['blog']['title']); ?> </h1> <h2><?php echo htmlspecialchars($model['blog']['description']); ?> </h2> <p>Really delete this article?</p> <form class="mainform" id="theform" method="post" action="<?php echo $_SERVER["REQUEST_URI_CLEAN"]; ?> "> <?php jabHtmlSubmitButton("Yes, delete it", "delete"); jabHtmlSubmitButton("No, keep it", "cancel"); ?> </form> <hr/> <div class="blog_article"> <h2><?php echo $article->Title;
if ($model['blog']['enableComments'] && !function_exists(jabRenderDisqusLink)) $article->LoadComments(jabCanUser("author")); if (sizeof($article->Comments)>0): ?> <div class="blog_comments"> <? foreach ($article->Comments as $comment): ?> <?php if (jabCanUser("author")): ?> <div class="blog_comment_actions"> <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>
?> ">Articles</a> | <a href="<?php echo blog_link("/feed.rss"); ?> ">RSS Feed</a> <?php if (jabCanUser("author")) { ?> | <a href="/<?php echo $model['blog']['routePrefix']; ?> /edit/new">New Post</a> </p> <hr/> <?php } ?> <h2>Drafts</h2> <?php if (sizeof($model['articles'])) { foreach ($model['articles'] as $article) { // Output paragraph echo "<p><a href=\"" . $article->FullUrl() . "\">[view]</a> - "; echo "<a href=\"" . blog_link("/edit/" . $article->ID) . "\">" . htmlspecialchars($article->Title) . "</a></p>"; } } else { echo "<p>No articles</p>"; }
function upgrade() { init_blog_db(); jabRedirect(blog_link("")); }