function plugin_tb_action() { global $trackback, $vars; if ($trackback && isset($vars['url'])) { // Receive and save a TrackBack Ping (both GET and POST) $url = $vars['url']; $tb_id = isset($vars['tb_id']) ? $vars['tb_id'] : ''; list($error, $message) = plugin_tb_save($url, $tb_id); // Output the response plugin_tb_output_response($error, $message); exit; } else { if ($trackback && isset($vars['__mode']) && isset($vars['tb_id'])) { // Show TrackBacks received (and exit) switch ($vars['__mode']) { case 'rss': plugin_tb_output_rsslist($vars['tb_id']); break; case 'view': plugin_tb_output_htmllist($vars['tb_id']); break; } exit; } else { // Show List of pages that TrackBacks reached $pages = get_existpages(TRACKBACK_DIR, '.txt'); if (!empty($pages)) { return array('msg' => 'Trackback list', 'body' => page_list($pages, 'read', false)); } else { return array('msg' => '', 'body' => ''); } } } }
function plugin_tb_action() { global $vars, $trackback; if (isset($vars['url'])) { // Receive and save a TrackBack Ping (both GET and POST) $url = $vars['url']; $tb_id = isset($vars['tb_id']) ? $vars['tb_id'] : ''; plugin_tb_save($url, $tb_id); // Send a response (and exit) } else { if ($trackback && isset($vars['__mode']) && isset($vars['tb_id'])) { // Show TrackBacks received (and exit) switch ($vars['__mode']) { case 'rss': plugin_tb_mode_rss($vars['tb_id']); break; // case 'view': plugin_tb_mode_view($vars['tb_id']); break; // case 'view': plugin_tb_mode_view($vars['tb_id']); break; case 'view': return plugin_tb_mode_view($vars['tb_id']); } } // Show List of pages that TrackBacks reached $pages = auth::get_existpages(TRACKBACK_DIR, '.txt'); if (!empty($pages)) { return array('msg' => 'Trackback list', 'body' => page_list($pages, 'read', FALSE)); } else { return array('msg' => '', 'body' => ''); } } }