//No paramaters given, redirect to forum home header("Location:" . e_PLUGIN . "forum/forum.php"); exit; } else { $tmp = explode(".", e_QUERY); $thread_id = intval(varset($tmp[0], 0)); $topic_from = varset($tmp[1], 0); $action = varset($tmp[2]); if (!$thread_id) { header("Location:" . e_PLUGIN . "forum/forum.php"); exit; } } if ($topic_from === 'post') { if ($thread_id) { $post_num = $forum->thread_postnum($thread_id); $pages = ceil(($post_num['post_num'] + 1) / $pref['forum_postspage']); $topic_from = ($pages - 1) * $pref['forum_postspage']; if ($post_num['parent'] != $thread_id) { header("location: " . e_SELF . "?{$post_num['parent']}.{$topic_from}#post_{$thread_id}"); exit; } } else { header("Location:" . e_PLUGIN . "forum/forum.php"); exit; } } require_once e_PLUGIN . 'forum/forum_shortcodes.php'; if ($action == "track" && USER) { $forum->track($thread_id); header("location:" . e_SELF . "?{$thread_id}.{$topic_from}");