$q = str_replace('&', '&', HTTP::query(array('parent' => $response->id, 'post' => $response->post))); echo (Weapon::exist($segment[0] . '_footer') ? ' / ' : "") . Cell::a($config->manager->slug . '/' . $segment[0] . '/ignite' . $q, $speak->reply); } // Show total comment repl(y|ies) 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)) . ' · '; } if (Route::is($config->manager->slug . '/' . $segment[0] . '/ignite') && ($parent = Request::get('parent', false))) { if ($response = call_user_func('Get::' . $segment[0], $parent)) { Weapon::add('tab_content_1_before', function () use($segment, $response) { $post = call_user_func('Get::' . $segment[1] . 'Anchor', $response->post); echo Cell::h3($response->name . ($post ? ' » ' . Cell::a($response->permalink, $post->title, '_blank') : "")) . $response->message . Cell::hr() . Cell::h4(Config::speak($segment[0] . '_reply_to_', $response->name)); }, 0.1); } Weapon::add('shield_before', function () use($config, $segment, $parent) { $to = call_user_func('Get::' . $segment[0] . 'Anchor', $parent); $to = $to !== false ? $to->name : $parent; $to_text = Config::speak($segment[0] . '_reply_to_', $to); Config::set('page_title', $to_text . $config->title_separator . Config::get('page_title')); }); } // Apply `__do_response_reply` weapon Weapon::add($segment[0] . '_footer', '__do_response_reply', 20.1); // Apply `__do_response_reply_count` weapon Weapon::add($segment[0] . '_footer', '__do_response_reply_count');