dispatch_get('/topic/:tid/:tname/:page', function ($tid, $tname, $page) { if ($page == null) { $page = 1; } $forum = new \Controller\forum(); $forum->topic((int) $tid, $page); CODOF\Smarty\Layout::load($forum->view, $forum->css_files, $forum->js_files); }); dispatch_get('/new_topic', function () { $forum = new \Controller\forum(); $forum->manage_topic(); CODOF\Smarty\Layout::load($forum->view, $forum->css_files, $forum->js_files); }); dispatch_get('/tags/:tag/:page', function ($tag, $page = 1) { if (!isset($tag)) { return \CODOF\Smarty\Layout::not_found(); } CODOF\Store::set('meta:robots', 'noindex, follow'); $clean_tag = strip_tags($tag); $forum = new Controller\forum(); $forum->listTaggedTopics($clean_tag, $page); CODOF\Smarty\Layout::load($forum->view, $forum->css_files, $forum->js_files); }); //-------------INDEX------------------------------------------------------------ dispatch_get('/', function () { global $installed; if (!$installed) { $url = str_replace("index.php?u=/", "", RURI); header("Location: " . $url . "install/index.php"); } $forum = new \Controller\forum();