Ejemplo n.º 1
0
    $date_to = $year . '-12-31 23:59:59';
    $title_date_format = '%Y';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
        $title_date_format = '%B, %Y';
    }
    echo '<h2 class="page-title">Archive of: ' . strftime($title_date_format, strtotime($date_from)) . '</h2>';
    perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
    $posts_displayed = true;
}
/* --------------------------- POSTS BY AUTHOR --------------------------- */
if (perch_get('author')) {
    echo '<h2 class="page-title">Posts by ' . perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true) . '</h2>';
    perch_blog_custom(array('author' => perch_get('author'), 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
    $posts_displayed = true;
}
/* --------------------------- DEFAULT: ALL POSTS --------------------------- */
if ($posts_displayed == false) {
    // No other options have been used; no posts have been displayed yet.
    // So display all posts.
    echo '<h2 class="page-title">Archive</h2>';
    perch_blog_custom(array('template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order, 'paginate' => true, 'page-links' => true, 'page-link-style' => 'all'));
}
?>
            </main>
            <?php 
perch_layout('sidebar');
?>
Ejemplo n.º 2
0
    $date_to = $year . '-12-31 23:59:59';
    $title_date_format = '%Y';
    // Month and Year?
    if (perch_get('month')) {
        $month = intval(perch_get('month'));
        $date_from = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-01 00:00:00';
        $date_to = $year . '-' . str_pad($month, 2, '0', STR_PAD_LEFT) . '-31 23:59:59';
        $title_date_format = '%B, %Y';
    }
    echo '<h1>Archive of: ' . strftime($title_date_format, strtotime($date_from)) . '</h1>';
    perch_blog_custom(array('filter' => 'postDateTime', 'match' => 'eqbetween', 'value' => $date_from . ',' . $date_to, 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order));
    $posts_displayed = true;
}
/* --------------------------- POSTS BY AUTHOR --------------------------- */
if (perch_get('author')) {
    echo '<h1>Posts by ' . perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true) . '</h1>';
    perch_blog_custom(array('author' => perch_get('author'), 'template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order));
    $posts_displayed = true;
}
/* --------------------------- DEFAULT: ALL POSTS --------------------------- */
if ($posts_displayed == false) {
    // No other options have been used; no posts have been displayed yet.
    // So display all posts.
    echo '<h1>Archive</h1>';
    perch_blog_custom(array('template' => $template, 'count' => $posts_per_page, 'sort' => $sort_by, 'sort-order' => $sort_order));
}
?>
	    </div>
		<nav class="sidebar">
		    <h2>Filter archive</h2>
		    <!--  By category listing -->
Ejemplo n.º 3
0
        <?php 
    } else {
        if (perch_get('author')) {
            ?>
            <h1><span class="arrow detail">Author</span> <nobr><?php 
            print perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true);
            ?>
</nobr></h1>
            <section class="bio">
                <?php 
            print perch_blog_author(perch_get('author'));
            ?>
            </section>
            <section>
                <h2>Beiträge von <?php 
            echo perch_blog_author(perch_get('author'), array('template' => 'author_name.html'), true);
            ?>
</h2>
                <?php 
            perch_blog_custom(array('author' => perch_get('author'), 'template' => 'post_in_list.html', 'sort' => 'postDateTime', 'sort-order' => 'DESC'));
            ?>
            </section>
        <?php 
        } else {
            if (perch_get('year')) {
                $year = intval(perch_get('year'));
                $date_from = $year . '-01-01 00:00:00';
                $date_to = $year . '-12-31 23:59:59';
                ?>
            <h1><span class="arrow detail">Jahr</span> <?php 
                print strftime('%Y', strtotime($date_from));