Beispiel #1
0
function get_description($post)
{
    if (!$post['meta_description']) {
        return $post['title'] . ' ' . word_limiter(strip_tags($post['content']), 10, '') . ' ' . tr_date('d F Y', $post['created_at']->sec);
    }
    return $post['meta_description'];
}
Beispiel #2
0
 public function archive()
 {
     $posts = $this->mongo_db->post->find(array('status' => 'publish'))->sort(array('created_at' => -1));
     $data['posts'] = array();
     foreach ($posts as $post) {
         $data['posts'][tr_date('F Y', $post['created_at']->sec)][] = $post;
     }
     $this->template->set_keyword('Yazı Arşivi')->set_description('Yazı Arşivi', TRUE)->set_title('Yazı Arşivi')->add_breadcrumb('Yazı')->view('archive', $data)->render();
 }
Beispiel #3
0
<?php

foreach ($posts as $date => $data) {
    ?>
    <div class="title"><?php 
    echo $date;
    ?>
</div>
    <ul>
        <?php 
    foreach ($data as $post) {
        ?>
            <li> <?php 
        echo anchor($post['slug'], $post['title']);
        ?>
 (<?php 
        echo tr_date('d F Y', $post['created_at']->sec);
        ?>
)</li>
        <?php 
    }
    ?>
    </ul>
<?php 
}
Beispiel #4
0
    <div class="alert-message block-message warning">
        Bu yazı en son <?php 
    echo tr_date('d F Y', $last_update);
    ?>
 tarihinde düzenlenmiştir ve güncelliğini yitirmiş
        olabilir.
    </div>
    <?php 
}
?>
</div>

<div class="post post-info">
    <span class="date">
        <?php 
echo tr_date('d F Y', $created_at->sec);
?>
    </span>
    <span class="category">
        <?php 
echo categories($categories);
?>
    </span>
    <span class="tags">
        <?php 
echo tags($tags);
?>
    </span>
    <span class="read">
        <?php 
echo $counter;