[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/templates/system/html/ -> modules.php (source)

   1  <?php
   2  /**
   3   * @version        $Id: modules.php 14401 2010-01-26 14:10:00Z louis $
   4   * @package        Joomla
   5   * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
   6   * @license        GNU/GPL, see LICENSE.php
   7   * Joomla! is free software. This version may have been modified pursuant
   8   * to the GNU General Public License, and as distributed it includes or
   9   * is derivative of works licensed under the GNU General Public License or
  10   * other free or open source software licenses.
  11   * See COPYRIGHT.php for copyright notices and details.
  12   */
  13  
  14  // no direct access
  15  defined('_JEXEC') or die('Restricted access');
  16  
  17  /*
  18   * none (output raw module content)
  19   */
  20  function modChrome_none($module, &$params, &$attribs)
  21  {
  22      echo $module->content;
  23  }
  24  
  25  /*
  26   * xhtml (divs and font headder tags)
  27   */
  28  function modChrome_xhtml($module, &$params, &$attribs)
  29  {
  30      if (!empty ($module->content)) : ?>
  31          <div class="module<?php echo $params->get('moduleclass_sfx'); ?>">
  32          <?php if ($module->showtitle != 0) : ?>
  33              <h3><?php echo $module->title; ?></h3>
  34          <?php endif; ?>
  35              <?php echo $module->content; ?>
  36          </div>
  37      <?php endif;
  38  }
  39  
  40  /*
  41   * allows for rounded corners
  42   */
  43  function modChrome_sliders($module, &$params, &$attribs)
  44  {
  45      jimport('joomla.html.pane');
  46      // Initialize variables
  47      $user = &JFactory::getUser();
  48      // TODO: allowAllClose should default true in J!1.6, so remove the array when it does.
  49      $sliders = &JPane::getInstance('sliders', array('allowAllClose' => true));
  50  
  51      $editAllComponents     = $user->authorize( 'administration', 'edit', 'components', 'all' );
  52  
  53      // special handling for components module
  54      if ( $module->module != 'mod_components' || ( $module->module == 'mod_components' && $editAllComponents ) ) {
  55          $sliders->startPanel( JText::_( $module->title ), 'module' . $module->id );
  56          echo $module->content;
  57          $sliders->endPanel();
  58      }
  59  }
  60  
  61  /*
  62   * allows for rounded corners
  63   */
  64  function modChrome_tabs($module, &$params, &$attribs)
  65  {
  66      jimport('joomla.html.pane');
  67      // Initialize variables
  68      $user    =& JFactory::getUser();
  69      $tabs    =& JPane::getInstance('tabs');
  70  
  71      $editAllComponents     = $user->authorize( 'administration', 'edit', 'components', 'all' );
  72  
  73      // special handling for components module
  74      if ( $module->module != 'mod_components' || ( $module->module == 'mod_components' && $editAllComponents ) ) {
  75              $tabs->startPanel( JText::_( $module->title ), 'module' . $module->id );
  76              echo $module->content;
  77              $tabs->endPanel();
  78      }
  79  }
  80  ?>


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1