function vapor_twitter_card() { $twitter = site_meta('twitter_account'); if ($twitter != '' || $twitter != NULL) { $title = article_id() ? article_title() : site_name(); $description = article_id() ? article_description() : site_description(); echo '<meta name="twitter:card" content="summary" /> <meta name="twitter:site" content="@' . str_replace('@', '', $twitter) . '" /> <meta name="twitter:title" content="' . $title . '" /> <meta name="twitter:description" content="' . $description . '" />'; } }
<?php theme_include('header'); ?> <div class="box"> <section class="content wrap" id="article-<?php echo article_id(); ?> "> <h1><?php echo article_title(); ?> </h1> <small class="muted"> <time datetime="<?php echo date(DATE_W3C, article_time()); ?> "><?php echo article_date(); ?> </time> </small> <article> <?php echo article_markdown(); ?> </article> </section>
"> <h1><?php echo article_title(); ?> </h1> <article> <?php echo article_markdown(); ?> </article> <section class="footnote"> <!-- Unfortunately, CSS means everything's got to be inline. --> <p>This article is my <?php echo numeral(article_number(article_id()), true); ?> oldest. It is <?php echo count_words(article_markdown()); ?> words long<?php if (comments_open()) { ?> , and it’s got <?php echo total_comments() . pluralise(total_comments(), ' comment'); ?> for now.<?php } ?> <?php echo article_custom_field('attribution');
/** * Return the number of the article * @return int */ function article_number() { return Post::where(Base::table('posts.status'), '=', 'published')->where(Base::table('posts.id'), '<=', article_id())->count(); }
?> <li> <h3><?php echo article_title(); ?> </h3> <p><?php echo article_description(); ?> </p> <?php if (user_authed()) { ?> <p><a class="quiet" href="<?php echo admin_url('posts/edit/' . article_id()); ?> ">Edit this article</a></p> <?php } ?> <p><a class="btn" href="<?php echo article_url(); ?> " title="<?php echo article_title(); ?> ">Continue Reading</a></p> </li> <?php
echo article_id(); ?> "> <h1><?php echo article_title(); ?> </h1> <article> <?php echo article_markdown(); ?> </article> <?php $tags = get_tags_for_post(article_id()); if (count($tags) > 0) { ?> <section class="tags"> <?php foreach ($tags as $tag) { ?> <a href="/posts?tag=<?php echo $tag; ?> "><?php echo $tag; ?> </a> <?php
<?php if (comments_open()) { ?> <?php if (has_comments()) { ?> <section class="content"> <p><strong>Comments</strong></p> <?php if (user_authed()) { ?> <p class="edit"><a href="<?php echo admin_url('posts/edit/' . article_id() . '#comments'); ?> ">Moderate comments</a></p> <?php } ?> <?php while (comments()) { ?> <p><strong><?php echo comment_name(); ?> posted <?php echo relative_time(comment_time()); ?>
<?php echo comment_form_input_text(); ?> </label></p> <p><?php echo comment_form_button(); ?> </p> </form> </section> <?php } ?> <section class="footnote"> <p>This article is my <?php echo numeral(article_id() + 1); ?> oldest. It is <?php echo count_words(article_html()); ?> words long. <?php echo article_custom_field('attribution'); ?> </p> </section>
/** * Get the url to an adjacent article * @param number of articles desired * @return object array */ function related_posts($n) { $posts = Post::get(Base::table('posts'), '=', 'published'); $postarr = array(); foreach ($posts as $post) { if ($post->id != article_id()) { if ($post->category == article_category_id()) { array_push($postarr, $post); } } } shuffle($postarr); $postarr = array_slice($postarr, 0, $n); return $postarr; }
<?php echo article_markdown(); ?> <?php if (user_authed() && user_authed_role() == 'administrator') { echo "<a href='/admin/posts/edit/" . article_id() . "' target='_blank'>Edit Article</a>"; } ?> </article> <?php if (has_comments()) { ?> <section id="comments"> <h2><?php echo total_comments(article_id()); ?> comments</h2> <ul class="commentlist"> <?php $i = 0; while (comments()) { $i++; ?> <li> <header> <h2 data-id="<?php echo $i; ?> "><?php echo comment_name();
<h1><?php echo article_title(); ?> </h1> <article> <?php echo article_html(); ?> </article> </section> <?php include 'includes/comment_form.php'; ?> <section class="footnote"> <p>This article is my <?php echo numeral(article_id()); ?> oldest. It is <?php echo count_words(article_html()); ?> words long. <?php echo article_custom_field('attribution'); ?> </p> </section>