[ 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 config_meta() 21 { 22 global $page, $lang, $plugins; 23 24 $sub_menu = array(); 25 $sub_menu['10'] = array("id" => "settings", "title" => $lang->bbsettings, "link" => "index.php?module=config-settings"); 26 $sub_menu['20'] = array("id" => "banning", "title" => $lang->banning, "link" => "index.php?module=config-banning"); 27 $sub_menu['30'] = array("id" => "profile_fields", "title" => $lang->custom_profile_fields, "link" => "index.php?module=config-profile_fields"); 28 $sub_menu['40'] = array("id" => "smilies", "title" => $lang->smilies, "link" => "index.php?module=config-smilies"); 29 $sub_menu['50'] = array("id" => "badwords", "title" => $lang->word_filters, "link" => "index.php?module=config-badwords"); 30 $sub_menu['60'] = array("id" => "mycode", "title" => $lang->mycode, "link" => "index.php?module=config-mycode"); 31 $sub_menu['70'] = array("id" => "languages", "title" => $lang->languages, "link" => "index.php?module=config-languages"); 32 $sub_menu['80'] = array("id" => "post_icons", "title" => $lang->post_icons, "link" => "index.php?module=config-post_icons"); 33 $sub_menu['90'] = array("id" => "help_documents", "title" => $lang->help_documents, "link" => "index.php?module=config-help_documents"); 34 $sub_menu['100'] = array("id" => "plugins", "title" => $lang->plugins, "link" => "index.php?module=config-plugins"); 35 $sub_menu['110'] = array("id" => "attachment_types", "title" => $lang->attachment_types, "link" => "index.php?module=config-attachment_types"); 36 $sub_menu['120'] = array("id" => "mod_tools", "title" => $lang->moderator_tools, "link" => "index.php?module=config-mod_tools"); 37 $sub_menu['130'] = array("id" => "spiders", "title" => $lang->spiders_bots, "link" => "index.php?module=config-spiders"); 38 $sub_menu['140'] = array("id" => "calendars", "title" => $lang->calendars, "link" => "index.php?module=config-calendars"); 39 $sub_menu['150'] = array("id" => "warning", "title" => $lang->warning_system, "link" => "index.php?module=config-warning"); 40 $sub_menu['160'] = array("id" => "thread_prefixes", "title" => $lang->thread_prefixes, "link" => "index.php?module=config-thread_prefixes"); 41 $sub_menu['170'] = array("id" => "questions", "title" => $lang->security_questions, "link" => "index.php?module=config-questions"); 42 $sub_menu['180'] = array("id" => "report_reasons", "title" => $lang->report_reasons, "link" => "index.php?module=config-report_reasons"); 43 44 $sub_menu = $plugins->run_hooks("admin_config_menu", $sub_menu); 45 46 $page->add_menu_item($lang->configuration, "config", "index.php?module=config", 10, $sub_menu); 47 48 return true; 49 } 50 51 /** 52 * @param string $action 53 * 54 * @return string 55 */ 56 function config_action_handler($action) 57 { 58 global $page, $plugins; 59 60 $page->active_module = "config"; 61 62 $actions = array( 63 'plugins' => array('active' => 'plugins', 'file' => 'plugins.php'), 64 'smilies' => array('active' => 'smilies', 'file' => 'smilies.php'), 65 'banning' => array('active' => 'banning', 'file' => 'banning.php'), 66 'badwords' => array('active' => 'badwords', 'file' => 'badwords.php'), 67 'profile_fields' => array('active' => 'profile_fields', 'file' => 'profile_fields.php'), 68 'spiders' => array('active' => 'spiders', 'file' => 'spiders.php'), 69 'attachment_types' => array('active' => 'attachment_types', 'file' => 'attachment_types.php'), 70 'languages' => array('active' => 'languages', 'file' => 'languages.php'), 71 'post_icons' => array('active' => 'post_icons', 'file' => 'post_icons.php'), 72 'help_documents' => array('active' => 'help_documents', 'file' => 'help_documents.php'), 73 'calendars' => array('active' => 'calendars', 'file' => 'calendars.php'), 74 'warning' => array('active' => 'warning', 'file' => 'warning.php'), 75 'mod_tools' => array('active' => 'mod_tools', 'file' => 'mod_tools.php'), 76 'mycode' => array('active' => 'mycode', 'file' => 'mycode.php'), 77 'settings' => array('active' => 'settings', 'file' => 'settings.php'), 78 'thread_prefixes' => array('active' => 'thread_prefixes', 'file' => 'thread_prefixes.php'), 79 'questions' => array('active' => 'questions', 'file' => 'questions.php'), 80 'report_reasons' => array('active' => 'report_reasons', 'file' => 'report_reasons.php') 81 ); 82 83 $actions = $plugins->run_hooks("admin_config_action_handler", $actions); 84 85 if(isset($actions[$action])) 86 { 87 $page->active_action = $actions[$action]['active']; 88 return $actions[$action]['file']; 89 } 90 else 91 { 92 $page->active_action = "settings"; 93 return "settings.php"; 94 } 95 } 96 97 /** 98 * @return array 99 */ 100 function config_admin_permissions() 101 { 102 global $lang, $plugins; 103 104 $admin_permissions = array( 105 "settings" => $lang->can_manage_settings, 106 "banning" => $lang->can_manage_banned_accounts, 107 "profile_fields" => $lang->can_manage_custom_profile_fields, 108 "smilies" => $lang->can_manage_smilies, 109 "badwords" => $lang->can_manage_bad_words, 110 "mycode" => $lang->can_manage_custom_mycode, 111 "languages" => $lang->can_manage_language_packs, 112 "post_icons" => $lang->can_manage_post_icons, 113 "help_documents" => $lang->can_manage_help_documents, 114 "plugins" => $lang->can_manage_plugins, 115 "attachment_types" => $lang->can_manage_attachment_types, 116 "spiders" => $lang->can_manage_spiders_bots, 117 "calendars" => $lang->can_manage_calendars, 118 "warning" => $lang->can_manage_warning_system, 119 "mod_tools" => $lang->can_manage_mod_tools, 120 "thread_prefixes" => $lang->can_manage_thread_prefixes, 121 "questions" => $lang->can_manage_security_questions, 122 "report_reasons" => $lang->can_manage_report_reasons 123 ); 124 125 $admin_permissions = $plugins->run_hooks("admin_config_permissions", $admin_permissions); 126 127 return array("name" => $lang->configuration, "permissions" => $admin_permissions, "disporder" => 10); 128 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |