?> </a></span> on <time datetime="<?php echo $post->date('Y-m-d'); ?> "><?php echo $post->date(c::get('posts-date-format')); ?> </time> </div> <?php echo getCoverImage($post, array('class' => 'img-responsive')); ?> </header> <div class="post-content col-xs-12"> <?php echo getPostExcerpt($post); ?> </div> <?php snippet('post-footer', array('post' => $post, 'author' => true, 'tags' => true, 'category' => true, 'comments' => c::get('comments'), 'class' => 'post-footer col-xs-12')); ?> </article> <?php } ?> <?php snippet('nav-pagination'); ?> </section>
?> "><?php echo getAuthorName((string) $result->author()); ?> </a></span> on <time datetime="<?php echo $result->date('Y-m-d'); ?> "><?php echo $result->date(c::get('posts-date-format')); ?> </time> </div> </header> <div class="post-content col-xs-12"> <?php echo getPostExcerpt($result); ?> </div> <?php snippet('post-footer', array('post' => $result, 'author' => true, 'tags' => true, 'category' => true, 'comments' => c::get('comments'), 'class' => 'post-footer col-xs-12')); ?> <?php } else { ?> <header class="col-xs-12"> <h2> Page: <a href="<?php echo $result->url(); ?>
$preview = ''; $dom = DOMDocument::loadHTML($html); // creates DOCTYPE, <html>, and <body> $dom->removeChild($dom->firstChild); // DOCTYPE $node = $dom->firstChild->firstChild->firstChild; while (strlen($preview) < $num_chars) { $preview .= $dom->saveHTML($node); $node = $node->nextSibling; } } return $preview; } } $post_content = $post['content']; $post_excerpt = getPostExcerpt($post_content, 500); ?> <!-- Title --> <h2> <a href="post.php?id=<?php echo $post['id']; ?> "><?php echo $post['title']; ?> </a> <?php if (isset($_SESSION['user']) && $_SESSION['user']['role'] == "Administrator") { ?> <a class="btn btn-xs btn-primary" href="admin/edit_post.php?post_id=<?php