function __do_response_reply_count($response)
{
    global $config, $speak, $segment;
    $e = File::E($response->path);
    $replies = count(glob(COMMENT . DS . '*_*_' . Date::slug($response->id) . '.{txt,hold}', GLOB_NOSORT | GLOB_BRACE));
    $t = Jot::icon('reply-all') . ' ' . $replies;
    $tt = array('title' => $replies . ' ' . ($replies === 1 ? $speak->{$segment[0] . '_reply'} : $speak->{$segment[0] . '_replies'}));
    echo ($e === 'hold' || $replies === 0 ? Cell::span($t, $tt) : Cell::a($config->manager->slug . '/' . $segment[0] . '?filter=parent%3A' . $response->id, $t, null, $tt)) . ' · ';
}
示例#2
0
</p>
<?php 
}
?>
<p><time class="text-fade" datetime="<?php 
echo $page->date->W3C;
?>
"><?php 
echo Jot::icon('clock-o') . ' ' . $page->date->FORMAT_3;
?>
</time><?php 
if (isset($page->total_comments)) {
    $t = Jot::icon('comments') . ' ' . $page->total_comments;
    ?>
 &middot; <?php 
    echo $page->total_comments === 0 ? Cell::span($t) : Cell::a($config->manager->slug . '/comment?filter=post%3A' . $page->id, $t);
}
?>
</p>
<?php 
if ($page->css) {
    ?>
<pre><code><?php 
    echo substr(Text::parse($page->css, '->encoded_html'), 0, $config->excerpt->length);
    if (strlen($page->css) > $config->excerpt->length) {
        echo $config->excerpt->suffix;
    }
    ?>
</code></pre>
<?php 
}
示例#3
0
// Title
if (!$config->manager->title) {
    $config->manager->title = $speak->manager->title_manager;
    Config::set('manager.title', $speak->manager->title_manager);
}
/**
 * Footer Link(s)
 * --------------
 */
// Add default article footer link(s)
Weapon::add('article_footer', function ($article) use($config, $speak) {
    $e = File::E($article->path);
    $comments = count(glob(COMMENT . DS . Date::slug($article->id) . '_*_*.{txt,hold}', GLOB_NOSORT | GLOB_BRACE));
    $t = Jot::icon('comments') . ' ' . $comments;
    $tt = array('title' => $comments . ' ' . ($comments === 1 ? $speak->comment : $speak->comments));
    $comments = ($e === 'draft' || $comments === 0 ? Cell::span($t, $tt) : Cell::a($config->manager->slug . '/comment?filter=post%3A' . $article->id, $t, null, $tt)) . ' &middot; ';
    $status = Mecha::alter($e, array('draft' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->draft) . ' &middot; ', 'archive' => Jot::span('info', Jot::icon('history') . ' ' . $speak->archive) . ' &middot; '), "");
    echo $comments . $status . Cell::a($config->manager->slug . '/article/repair/id:' . $article->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/article/kill/id:' . $article->id, $speak->delete);
}, 20);
// Add default page footer link(s)
Weapon::add('page_footer', function ($page) use($config, $speak) {
    $status = Mecha::alter(File::E($page->path), array('draft' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->draft) . ' &middot; ', 'archive' => Jot::span('info', Jot::icon('history') . ' ' . $speak->archive) . ' &middot; '), "");
    echo $status . Cell::a($config->manager->slug . '/page/repair/id:' . $page->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/page/kill/id:' . $page->id, $speak->delete);
}, 20);
/**
 * Backend Route(s)
 * ----------------
 *
 * Load the routes.
 *
 */