[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/templates/ja_purity/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   * This is a file to add template specific chrome to module rendering.  To use it you would
  19   * set the style attribute for the given module(s) include in your template to use the style
  20   * for each given modChrome function.
  21   *
  22   * eg.  To render a module mod_test in the sliders style, you would use the following include:
  23   * <jdoc:include type="module" name="test" style="slider" />
  24   *
  25   * This gives template designers ultimate control over how modules are rendered.
  26   *
  27   * NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
  28   * two arguments.
  29   */
  30  
  31  /*
  32   * Module chrome for rendering the module in a slider
  33   */
  34  function modChrome_slider($module, &$params, &$attribs)
  35  {
  36      jimport('joomla.html.pane');
  37      // Initialize variables
  38      $sliders = & JPane::getInstance('sliders');
  39      $sliders->startPanel( JText::_( $module->title ), 'module' . $module->id );
  40      echo $module->content;
  41      $sliders->endPanel();
  42  }
  43  
  44  /*
  45   * Module chrome that allows for rounded corners by wrapping in nested div tags
  46   */
  47  function modChrome_jarounded($module, &$params, &$attribs)
  48  { ?>
  49          <div class="jamod module<?php echo $params->get('moduleclass_sfx'); ?>" id="Mod<?php echo $module->id; ?>">
  50              <div>
  51                  <div>
  52                      <div>
  53                          <?php if ($module->showtitle != 0) : ?>
  54                          <?php
  55                          if(isset($_COOKIE['Mod'.$module->id])) $modhide = $_COOKIE['Mod'.$module->id];
  56                          else $modhide = 'show';
  57                          ?>
  58                          <h3 class="<?php echo $modhide; ?>"><span><?php echo $module->title; ?></span></h3>
  59                          <?php endif; ?>
  60                          <div class="jamod-content"><?php echo $module->content; ?></div>
  61                      </div>
  62                  </div>
  63              </div>
  64          </div>
  65      <?php
  66  }
  67  ?>


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