Beispiel #1
0
function printPostRSS($post)
{
    $parseDown = new ParsedownExtra();
    echo "    <item>\n";
    echo "      <title>" . $post['title'] . "</title>\n";
    echo "      <link>http://fisherevans.com/blog/post/" . $post['title_slug'] . "</link>\n";
    echo "      <guid>http://fisherevans.com/blog/post/" . $post['title_slug'] . "</guid>\n";
    echo "      <pubDate>" . date("D, d M Y H:i:s O", strtotime($post['posted_date'])) . "</pubDate>\n";
    echo "      <content:encoded><![CDATA[" . fixRelativeLinks($parseDown->text($post['content'])) . "]]></content:encoded>\n";
    echo "    </item>\n";
}
<?php

$parseDown = new ParsedownExtra();
?>
<div class="section" itemscope itemtype="http://schema.org/<?php 
echo $staticContent['itemtype'];
?>
">
  <h1 itemprop="name"><?php 
echo $staticContent['name'];
?>
</h1>
  <div itemprop="text">
    <?php 
echo fixRelativeLinks($parseDown->text($staticContent['content']));
?>
  </div>
</div>
Beispiel #3
0
    <div class="postIntro" itemprop="description">
      <?php 
echo $parsedown->text($post['intro']);
?>
    </div>
    <img class="postPhoto" src="<?php 
echo $url;
echo str_replace("site:", "/", $post['image']);
?>
" alt="<?php 
echo $post['title'];
?>
 Banner Image" itemprop="image"/>
    <div class="postContent" itemprop="articleBody">
      <?php 
echo fixRelativeLinks($parsedown->text($post['content']));
?>
    </div>
  </div>
  <p class="centered noBottomMargin">Like this content? Think about <a href="http://eepurl.com/bowcor" target="_blank" title="Subcribe to my blog">subscribing</a>.</p>
</div>
<div class="section blogDiscussion">
  <div id="disqus_thread"></div>
</div>
<script type="text/javascript">
  var disqus_shortname = 'fisherevans';
  var disqus_identifier = '<?php 
echo $post['title_slug'];
?>
';
  var disqus_title = '<?php 
Beispiel #4
0
$collection = collection('Blog Posts');
$posts = $collection->find(['published' => true])->sort(["posted_date" => -1])->toArray();
$lastYear = null;
$lastMonth = null;
foreach ($posts as $post) {
    $postDate = new DateTime("@" . strtotime($post['posted_date']));
    $thisYear = $postDate->format('Y');
    $thisMonth = $postDate->format('F');
    if ($thisYear != $lastYear || $thisMonth != $lastMonth) {
        if ($lastYear != null) {
            echo "</div>";
        }
        echo "<h3 class='archivedPostHeader'>" . $thisMonth . ", " . $thisYear . "</h3><div class='archivedPosts'>";
    }
    echo "<div class='archivedPost' itemprop='blogPosts' itemscope itemtype='http://schema.org/BlogPosting'><a class='archiveTitle fadeColors' href='" . $url;
    $this->route("/blog/post/" . $post['title_slug']);
    echo "'><h4 class='archiveTitleHeader fadeColors' itemprop='name'>{$post['title']}</h4></a>";
    include 'snippets/postInfo.php';
    echo '<div class="archiveIntro" itemprop="description">' . fixRelativeLinks($parsedown->text($post['intro'])) . '<a class="archiveReadMore" href="' . $url;
    $this->route("/blog/post/" . $post['title_slug']);
    echo '">Read more...</a></div>';
    echo "</div>";
    $lastYear = $thisYear;
    $lastMonth = $thisMonth;
}
if ($lastYear != null) {
    echo "</div>";
}
?>
  </div>
</div>
Beispiel #5
0
          <a href="<?php 
        echo $url;
        echo $this->route("/blog/post/" . $post['title_slug']);
        ?>
">
            <h3 class="fadeColors" itemprop="name headline"><?php 
        echo $post['title'];
        ?>
</h3>
          </a>
          <?php 
        include 'snippets/postInfo.php';
        ?>
          <div class="postListIntro" itemprop="description">
            <?php 
        echo fixRelativeLinks($parsedown->text($post['intro']));
        ?>
          </div>
        </div><!--
          <?php 
        $left = !$left;
        $first = false;
    }
}
?>
    -->
  </div>
  <?php 
if ($pages > 0) {
    ?>
    <div class="paginationLabel">Page Selection</div>