[ 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 style_meta() 21 { 22 global $page, $lang, $plugins; 23 24 $sub_menu = array(); 25 $sub_menu['10'] = array("id" => "themes", "title" => $lang->themes, "link" => "index.php?module=style-themes"); 26 $sub_menu['20'] = array("id" => "templates", "title" => $lang->templates, "link" => "index.php?module=style-templates"); 27 28 $sub_menu = $plugins->run_hooks("admin_style_menu", $sub_menu); 29 30 $page->add_menu_item($lang->templates_and_style, "style", "index.php?module=style", 40, $sub_menu); 31 return true; 32 } 33 34 /** 35 * @param string $action 36 * 37 * @return string 38 */ 39 function style_action_handler($action) 40 { 41 global $page, $plugins; 42 43 $page->active_module = "style"; 44 45 $actions = array( 46 'templates' => array('active' => 'templates', 'file' => 'templates.php'), 47 'themes' => array('active' => 'themes', 'file' => 'themes.php') 48 ); 49 50 $actions = $plugins->run_hooks("admin_style_action_handler", $actions); 51 52 if(isset($actions[$action])) 53 { 54 $page->active_action = $actions[$action]['active']; 55 return $actions[$action]['file']; 56 } 57 else 58 { 59 $page->active_action = "themes"; 60 return "themes.php"; 61 } 62 } 63 64 /** 65 * @return array 66 */ 67 function style_admin_permissions() 68 { 69 global $lang, $plugins; 70 71 $admin_permissions = array( 72 "themes" => $lang->can_manage_themes, 73 "templates" => $lang->can_manage_templates, 74 ); 75 76 $admin_permissions = $plugins->run_hooks("admin_style_permissions", $admin_permissions); 77 78 return array("name" => $lang->templates_and_style, "permissions" => $admin_permissions, "disporder" => 40); 79 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |