[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/admin/styles/default/ -> style.php (source)

   1  <?php
   2  /**
   3   * This is an example style file for Admin CP styles.
   4   *
   5   * It allows you to override our existing layout generation
   6   * classes with your own to further customise the Admin CP
   7   * layout beyond CSS.
   8   *
   9   * Your class name      Should extend
  10   * ---------------      -------------
  11   * Page                 DefaultPage
  12   * SidebarItem          DefaultSidebarItem
  13   * PopupMenu            DefaultPopupMenu
  14   * Table                DefaultTable
  15   * Form                 DefaultForm
  16   * FormContainer        DefaultFormContainer
  17   *
  18   * For example, to output your own custom header:
  19   *
  20   * class Page extends DefaultPage
  21   * {
  22   *   function output_header($title)
  23   *   {
  24   *      echo "<h1>{$title}</h1>";
  25   *   }
  26   * }
  27   *
  28   */
  29  
  30  // Disallow direct access to this file for security reasons
  31  if(!defined("IN_MYBB"))
  32  {
  33      die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
  34  }
  35  
  36  #[AllowDynamicProperties]
  37  class Page extends DefaultPage
  38  {
  39  	function _generate_breadcrumb()
  40      {
  41          if(!is_array($this->_breadcrumb_trail))
  42          {
  43              return false;
  44          }
  45          $trail = "";
  46          foreach($this->_breadcrumb_trail as $key => $crumb)
  47          {
  48              if(!empty($this->_breadcrumb_trail[$key+1]))
  49              {
  50                  $trail .= "<a href=\"".$crumb['url']."\">".$crumb['name']."</a>";
  51                  if(!empty($this->_breadcrumb_trail[$key+2]))
  52                  {
  53                      $trail .= " &raquo; ";
  54                  }
  55              }
  56              else
  57              {
  58                  $trail .= " &raquo; <span class=\"active\">".$crumb['name']."</span>";
  59              }
  60          }
  61          return $trail;
  62      }
  63  }
  64  
  65  #[AllowDynamicProperties]
  66  class SidebarItem extends DefaultSidebarItem
  67  {
  68  }
  69  
  70  #[AllowDynamicProperties]
  71  class PopupMenu extends DefaultPopupMenu
  72  {
  73  }
  74  
  75  #[AllowDynamicProperties]
  76  class Table extends DefaultTable
  77  {
  78  }
  79  
  80  #[AllowDynamicProperties]
  81  class Form extends DefaultForm
  82  {
  83  }
  84  
  85  #[AllowDynamicProperties]
  86  class FormContainer extends DefaultFormContainer
  87  {
  88  }


2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref