b2evolution PHP Cross Reference Blogging Systems

Source: /skins_adm/evo/_adminUI.class.php - 203 lines - 4531 bytes - Summary - Text - Print

Description: This file implements the Admin UI class for the evo skin. This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the Admin UI class for the evo skin.
   4   *
   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.
   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
  10   *
  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  12   *
  13   * {@internal Open Source relicensing agreement:
  14   * Daniel HAHLER grants Francois PLANQUE the right to license
  15   * Daniel HAHLER's contributions to this file and the b2evolution project
  16   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  17   * }}
  18   *
  19   * @package admin-skin
  20   * @subpackage evo
  21   *
  22   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  23   * @author blueyed: Daniel HAHLER
  24   *
  25   * @version $Id: _adminUI.class.php 6136 2014-03-08 07:59:48Z manuel $
  26   */
  27  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  28  
  29  /**
  30   * Includes
  31   */
  32  require_once dirname(__FILE__).'/../_adminUI_general.class.php';
  33  
  34  
  35  /**
  36   * We'll use the default AdminUI templates etc.
  37   *
  38   * @package admin-skin
  39   * @subpackage evo
  40   */
  41  class AdminUI extends AdminUI_general
  42  {
  43  
  44      /**
  45       * This function should init the templates - like adding Javascript through the {@link add_headline()} method.
  46       */
  47  	function init_templates()
  48      {
  49          global $Hit;
  50          // This is included before controller specifc require_css() calls:
  51          require_css( 'basic_styles.css', 'rsc_url' ); // the REAL basic styles
  52          require_css( 'basic.css', 'rsc_url' ); // Basic styles
  53          require_css( 'results.css', 'rsc_url' ); // Results/tables styles
  54          require_css( 'item_base.css', 'rsc_url' ); // Default styles for the post CONTENT
  55          require_css( 'fileman.css', 'rsc_url' ); // Filemanager styles
  56          require_css( 'admin.global.css', 'rsc_url' ); // Basic admin styles
  57          require_css( 'skins_adm/evo/rsc/css/style.css', true );
  58  
  59          if ( $Hit->is_IE() )
  60          {
  61              require_css( 'admin_global_ie.css', 'rsc_url' );
  62          }
  63          // CSS for IE9
  64          add_headline( '<!--[if IE 9 ]>' );
  65          require_css( 'ie9.css', 'rsc_url' );
  66          add_headline( '<![endif]-->' );
  67  
  68          require_js( '#jquery#', 'rsc_url' );
  69          require_js( 'jquery/jquery.raty.min.js', 'rsc_url' );
  70      }
  71  
  72  
  73      /**
  74       * Get the top of the HTML <body>.
  75       *
  76       * @uses get_page_head()
  77       * @return string
  78       */
  79  	function get_body_top()
  80      {
  81          global $Messages;
  82  
  83          $r = '';
  84  
  85          $r .= $this->get_page_head();
  86  
  87          // Display MAIN menu:
  88          $r .= $this->get_html_menu().'
  89  
  90          <div id="panelbody" class="panelbody">
  91          ';
  92  
  93          $r .= '
  94  
  95          <div id="payload">
  96          ';
  97  
  98          $r .= $this->get_bloglist_buttons();
  99  
 100          // Display info & error messages
 101          $r .= $Messages->display( NULL, NULL, false, 'action_messages' );
 102  
 103          return $r;
 104      }
 105  
 106  
 107      /**
 108       * Close open div(s).
 109       *
 110       * @return string
 111       */
 112  	function get_body_bottom()
 113      {
 114          global $rsc_url;
 115  
 116          $r = '';
 117  
 118          $r .= "\n\t</div>";
 119  
 120          $r .= "</div>\n";    // Close right col.
 121  
 122          $r .= get_icon( 'pixel' );
 123  
 124          return $r;
 125      }
 126  
 127  
 128      /**
 129       * GLOBAL HEADER - APP TITLE, LOGOUT, ETC.
 130       *
 131       * @return string
 132       */
 133  	function get_page_head()
 134      {
 135          $r = '
 136          <div id="header">
 137              <h1>'.$this->get_title_for_titlearea().'</h1>
 138          </div>
 139          ';
 140  
 141          return $r;
 142      }
 143  
 144      /**
 145       * Get a template by name and depth.
 146       *
 147       * @param string The template name ('main', 'sub').
 148       * @return array
 149       */
 150  	function get_template( $name, $depth = 0 )
 151      {
 152          switch( $name )
 153          {
 154              case 'main':
 155                  // main level
 156                  global $app_shortname, $app_version;
 157  
 158                  $r = parent::get_template( $name, $depth );
 159                  $r['after'] = "</ul>\n<p class=\"center\">$app_shortname v <strong>$app_version</strong></p>\n</div>";
 160                  return $r;
 161                  break;
 162  
 163  
 164              case 'CollectionList':
 165                  // Template for a list of Collections (Blogs)
 166                  return array(
 167                          'before' => '<div id="TitleArea">',
 168                          'after' => '</div>',
 169                          'select_start' => '<div class="collection_select">',
 170                          'select_end' => '</div>',
 171                          'buttons_start' => '',
 172                          'buttons_end' => '',
 173                          'beforeEach' => '',
 174                          'afterEach' => '',
 175                          'beforeEachSel' => '',
 176                          'afterEachSel' => '',
 177                      );
 178  
 179  
 180              default:
 181                  // Delegate to parent class:
 182                  return parent::get_template( $name, $depth );
 183          }
 184      }
 185  
 186      /**
 187       * Get colors for page elements that can't be controlled by CSS (charts)
 188       */
 189  	function get_color( $what )
 190      {
 191          switch( $what )
 192          {
 193              case 'payload_background':
 194                  return 'fbfbfb';
 195                  break;
 196          }
 197          debug_die( 'unknown color' );
 198      }
 199  
 200  
 201  }
 202  
 203  ?>

title

Description

title

Description

title

Description

title

title

Body