diff -r 2b2084ca1e60 -r 0b3a0aedfd53 plugins/Decir.php --- a/plugins/Decir.php Wed Jun 13 16:59:00 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -attachHook('acl_rule_init', 'decir_early_init($this, $session);'); -$plugins->attachHook('base_classes_initted', ' - $paths->add_page(Array( - \'name\'=>\'Forum\', - \'urlname\'=>\'Forum\', - \'namespace\'=>\'Special\', - \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', - )); - '); - -function decir_early_init(&$paths, &$session) -{ - $paths->addAdminNode('Decir forum configuration', 'General settings', 'DecirGeneral'); - $paths->nslist['DecirForum'] = $paths->nslist['Special'] . 'Forum/ViewForum/'; - $paths->nslist['DecirPost'] = $paths->nslist['Special'] . 'Forum/Post/'; - $paths->nslist['DecirTopic'] = $paths->nslist['Special'] . 'Forum/Topic/'; - - $session->register_acl_type('decir_see_forum', AUTH_ALLOW, 'See forum in index', Array('read'), 'DecirForum'); - $session->register_acl_type('decir_view_forum', AUTH_ALLOW, 'View forum', Array('decir_see_forum'), 'DecirForum'); - $session->register_acl_type('decir_post', AUTH_ALLOW, 'Post new topics', Array('decir_view_forum'), 'DecirForum'); - $session->register_acl_type('decir_reply', AUTH_ALLOW, 'Reply to topics', Array('decir_post'), 'DecirTopic'); -} - -function page_Special_Forum() -{ - global $db, $session, $paths, $template, $plugins; // Common objects - - if ( getConfig('decir_version') != ENANO_DECIR_VERSION || isset($_POST['do_install_finish']) ) - { - require(DECIR_ROOT . '/install.php'); - } - - $act = strtolower( ( $n = $paths->getParam(0) ) ? $n : 'Index' ); - - $curdir = getcwd(); - chdir(DECIR_ROOT); - - switch($act) - { - case 'index': - default: - require('forum_index.php'); - break; - case 'viewforum': - require('viewforum.php'); - break; - case 'topic': - case 'post': - case 'viewtopic': - require('viewtopic.php'); - break; - case 'new': - require('posting.php'); - break; - } - - chdir($curdir); - -} - -function page_Admin_DecirGeneral() -{ - global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { header('Location: '.makeUrl($paths->nslist['Special'].'Administration'.urlSeparator.'noheaders')); die('Hacking attempt'); } - echo 'Hello world!'; -} - -?>