b2evolution PHP Cross Reference Blogging Systems

Source: /skins/_toolbar.inc.php - 111 lines - 2585 bytes - Text - Print

Description: This is the Evo Toolbar include template. For a quick explanation of b2evo 2.0 skins, please start here: {@link http://b2evolution.net/man/skin-structure}

   1  <?php
   2  /**
   3   * This is the Evo Toolbar include template.
   4   *
   5   * For a quick explanation of b2evo 2.0 skins, please start here:
   6   * {@link http://b2evolution.net/man/skin-structure}
   7   *
   8   * This is meant to be included in a page template.
   9   *
  10   * @todo dh> with disabled JavaScript the expanded submenu boxes
  11   *           for "Customize" do not get moved to the correct
  12   *           place/screen offset.
  13   *           I think the display of the submenus should get done
  14   *           only with JS in this case (and not with hover).
  15   *
  16   * @package evoskins
  17   */
  18  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  19  
  20  if( ! is_logged_in() )
  21  {
  22      return;
  23  }
  24  
  25  /**
  26   * @var User
  27   */
  28  global $current_User;
  29  
  30  if( !$current_User->check_perm( 'admin', 'toolbar' ) )
  31  { // don't show toolbar for current User
  32      return;
  33  }
  34  
  35  global $Blog;
  36  
  37  global $Settings;
  38  
  39  global $is_admin_page, $localtimenow, $disp_detail;
  40  
  41  global $home_url, $admin_url, $debug, $seo_page_type, $robots_index;
  42  
  43  global $request_transaction_name;
  44  
  45  /**
  46   * @var Hit
  47   */
  48  global $Hit;
  49  
  50  global $Plugins;
  51  
  52  global $locale_from_get;
  53  
  54  load_class( '_core/ui/_menu.class.php', 'Menu' );
  55  
  56  /**
  57   * @global Menu Evobar menu on the top left (should be useed for content & system management features)
  58   */
  59  global $topleft_Menu;
  60  $topleft_Menu = new Menu();
  61  
  62  /**
  63   * @global Menu Evobar menu on the top right (should be used for current user's session, profile & prefs features)
  64   */
  65  global $topright_Menu;
  66  $topright_Menu = new Menu();
  67  
  68  
  69  // Switch to users locale (if not overridden via REQUEST):
  70  if( ! $locale_from_get )
  71  {
  72      locale_temp_switch($current_User->locale);
  73  }
  74  
  75  // Let the modules construct the menu:
  76  modules_call_method( 'build_evobar_menu' );
  77  
  78  // Call AdminAfterToolbarInit to notify Plugins that the toolbar menus are initialized. Plugins can add entries.
  79  $Plugins->trigger_event( 'AdminAfterEvobarInit' );
  80  
  81  ?>
  82  
  83  <div id="evo_toolbar" class="evo_toolbar_<?php echo $Hit->get_agent_name(); ?>">
  84      <div class="actions_right">
  85          <?php
  86              // Display evobar menu:
  87              echo $topright_Menu->get_html_menu( NULL, 'sf-menu-right' );
  88          ?>
  89      </div>
  90      <div class="actions_left">
  91          <?php
  92          if( $topleft_Menu->has_entires() )
  93          { // The Menu has entries, it means that current User has permission to at least one action
  94              // Display evobar menu:
  95              echo $topleft_Menu->get_html_menu( NULL, 'sf-menu-left' );
  96  
  97              if( $debug )
  98              {
  99                  echo '<div style="position:relative;left:5px;top:-7px;color:#999;z-index:-1;">'.$request_transaction_name.'</div>';
 100              }
 101          }
 102          ?>
 103      </div>
 104  </div>
 105  
 106  <?php
 107  if( ! $locale_from_get )
 108  {
 109      locale_restore_previous();
 110  }
 111  ?>

title

Description

title

Description

title

Description

title

title

Body