echo Asset::javascript(File::D(__DIR__) . DS . 'assets' . DS . 'sword' . DS . 'do.js'); } function do_response_reply_x($post) { global $config, $speak, $parent; $s = Asset::loaded($config->protocol . ICON_LIBRARY_PATH) ? '<i class="fa fa-times-circle"></i> ' : ""; echo ' <a href="' . $post->url . '" class="btn btn-reject btn-reject-reply"' . ($parent === false ? ' style="display:none;"' : "") . '>' . $s . $speak->cancel . '</a>'; } Weapon::add('comment_footer', 'do_response_reply', 20.1); Weapon::add('comment_form_button_after', 'do_response_reply_x'); Weapon::add('shell_before', 'do_response_reply_css'); Weapon::add('SHIPMENT_REGION_BOTTOM', 'do_response_reply_js'); // No JavaScript if ($parent !== false) { Guardian::memorize('parent', $parent); if ($response = Get::commentAnchor($parent)) { Weapon::add('chunk_before', function ($G) use($speak, $parent, $response) { if (File::N($G['data']['path']) === 'comment.form') { $prefix = File::B(File::D($response->path)); $to = Config::speak($prefix . '_reply_to_', Cell::a('#' . $prefix . '-' . $parent, $response->name)); echo Cell::h4($to); } }); } } // Error if ($s = Request::post('parent', false)) { Filter::add('guardian:kick', function ($url) use($config, $s) { if (!Notify::errors()) { return $url; }