[ Index ] |
PHP Cross Reference of MyBB 1.8.38 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * MyBB 1.8 4 * Copyright 2014 MyBB Group, All Rights Reserved 5 * 6 * Website: http://www.mybb.com 7 * License: http://www.mybb.com/about/license 8 * 9 */ 10 11 // Disallow direct access to this file for security reasons 12 if(!defined("IN_MYBB")) 13 { 14 die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined."); 15 } 16 17 /** 18 * @return bool true 19 */ 20 function forum_meta() 21 { 22 global $page, $lang, $plugins; 23 24 $sub_menu = array(); 25 $sub_menu['10'] = array("id" => "management", "title" => $lang->forum_management, "link" => "index.php?module=forum-management"); 26 $sub_menu['20'] = array("id" => "announcements", "title" => $lang->forum_announcements, "link" => "index.php?module=forum-announcements"); 27 $sub_menu['30'] = array("id" => "moderation_queue", "title" => $lang->moderation_queue, "link" => "index.php?module=forum-moderation_queue"); 28 $sub_menu['40'] = array("id" => "attachments", "title" => $lang->attachments, "link" => "index.php?module=forum-attachments"); 29 30 $sub_menu = $plugins->run_hooks("admin_forum_menu", $sub_menu); 31 32 $page->add_menu_item($lang->forums_and_posts, "forum", "index.php?module=forum", 20, $sub_menu); 33 34 return true; 35 } 36 37 /** 38 * @param string $action 39 * 40 * @return string 41 */ 42 function forum_action_handler($action) 43 { 44 global $page, $plugins; 45 46 $page->active_module = "forum"; 47 48 $actions = array( 49 'moderation_queue' => array('active' => 'moderation_queue', 'file' => 'moderation_queue.php'), 50 'announcements' => array('active' => 'announcements', 'file' => 'announcements.php'), 51 'attachments' => array('active' => 'attachments', 'file' => 'attachments.php'), 52 'management' => array('active' => 'management', 'file' => 'management.php') 53 ); 54 55 $actions = $plugins->run_hooks("admin_forum_action_handler", $actions); 56 57 if(isset($actions[$action])) 58 { 59 $page->active_action = $actions[$action]['active']; 60 return $actions[$action]['file']; 61 } 62 else 63 { 64 $page->active_action = "management"; 65 return "management.php"; 66 } 67 } 68 69 /** 70 * @return array 71 */ 72 function forum_admin_permissions() 73 { 74 global $lang, $plugins; 75 76 $admin_permissions = array( 77 "management" => $lang->can_manage_forums, 78 "announcements" => $lang->can_manage_forum_announcements, 79 "moderation_queue" => $lang->can_moderate, 80 "attachments" => $lang->can_manage_attachments, 81 ); 82 83 $admin_permissions = $plugins->run_hooks("admin_forum_permissions", $admin_permissions); 84 85 return array("name" => $lang->forums_and_posts, "permissions" => $admin_permissions, "disporder" => 20); 86 } 87
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |