<h3><a href="<?php $this->url('/blog/article/' . $article['slug']); ?> " title="Permanent Link to <?php echo $article['name']; ?> "> <?php echo $article['name']; ?> </a></h3> <!-- text --> <p><?php $article['text'] = Fari_Escape::text(Fari_Textile::toHTML($article['text'])); echo strlen($article['text']) <= BLOG_PREVIEW ? $article['text'] : substr($article['text'], 0, BLOG_PREVIEW) . ' [...]'; ?> </p> <!-- details --> <div class="details"> Posted at <?php echo date("F j, Y, G:i", $article['published']); ?> | <span class="read-on"> <a href="<?php $this->url('/blog/article/' . $article['slug']); ?> ">read more</a>
public function rss() { if (!Fari_User::isAuthenticated('realname')) { // cache public articles $this->view->cache('rss', 'application/rss+xml'); $articles = Fari_Db::select('articles', 'name, text, published, slug', array('status' => 1), 'published DESC', BLOG_RSS); } else { $articles = Fari_Db::select('articles', 'name, text, published, slug', 'status != 2', 'published DESC', BLOG_RSS); } // convert Textile to HTML foreach ($articles as &$article) { $article['text'] = Fari_Textile::toHTML($article['text']); } $feed = new Fari_RSS('name', 'slug', 'text', 'published'); $items = $this->view->feed = $feed->create(BLOG_TITLE . ' RSS Feed', '/blog/rss/', 'A feed of all the articles on this blog', $articles); $this->view->display('rss', 'application/rss+xml'); }
" href="<?php $this->url('/text/star/' . $row['slug']); ?> "> </a> <a href="<?php $this->url('/text/view/' . $row['slug']); ?> "> <?php echo $row['title']; ?> </a></h3> <p class="preview"> <?php echo substr(Fari_Escape::text(Fari_Textile::toHTML($row['text'])), 0, 300); ?> …</p> <div class="description"> <?php if ($browse == 'category') { ?> <a href="<?php $this->url('/browse/source/' . $row['sourceSlug']); ?> "> <?php echo $row['source']; ?> <?php } elseif ($browse == 'source') {
echo BLOG_TITLE; ?> </a></h2> <p class="description">A blog that never gets tired</p> </div> </div> <div id="primary" class="single-post"> <div class="inside"> <div class="primary"> <h1 class="title"><?php echo $article['name']; ?> </h1> <?php echo Fari_Textile::toHTML($article['text']); ?> </div> <hr class="hide" /> <div class="secondary"> <h2>About this entry</h2> <div class="featured"> <p>You’re currently reading “<?php echo $article['name']; ?> ” an entry on <?php echo BLOG_TITLE; ?>
<input id="q" name="q" type="text" class="text" onFocus="searchFocus();" onBlur="searchBlur();" value="Search Knowledgebase" /> <input class="button" type="submit" value="Search" onClick="search();return false;" /> </form> </div> <div id="text" class="push-1 span-22 last"> <div class="span-22 last"> <h2><?php echo $text['title']; ?> <input class="button" type="button" value="Edit" onClick="edit();" /></h2> </div> <div id="view" class="span-17"> <?php echo Fari_Textile::toHTML($text['text']); ?> </div> <div id="details" class="span-5 last"> <br /> <div class="span-5 last"> <label>Category:</label><br /> <a href="<?php $this->url('/browse/category/' . $text['categorySlug']); ?> " ><?php echo $text['category']; ?> </a> </div>