[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/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   * Module chrome that wraps the module in a table
  27   */
  28  function modChrome_table($module, &$params, &$attribs)
  29  { ?>
  30      <table cellpadding="0" cellspacing="0" class="moduletable<?php echo $params->get('moduleclass_sfx'); ?>">
  31      <?php if ($module->showtitle != 0) : ?>
  32          <tr>
  33              <th valign="top">
  34                  <?php echo $module->title; ?>
  35              </th>
  36          </tr>
  37      <?php endif; ?>
  38          <tr>
  39              <td>
  40                  <?php echo $module->content; ?>
  41              </td>
  42          </tr>
  43          </table>
  44      <?php
  45  }
  46  
  47  /*
  48   * Module chrome that wraps the tabled module output in a <td> tag of another table
  49   */
  50  function modChrome_horz($module, &$params, &$attribs)
  51  { ?>
  52      <table cellspacing="1" cellpadding="0" border="0" width="100%">
  53          <tr>
  54              <td valign="top">
  55                  <?php modChrome_table($module, $params, $attribs); ?>
  56              </td>
  57          </tr>
  58      </table>
  59      <?php
  60  }
  61  
  62  /*
  63   * xhtml (divs and font headder tags)
  64   */
  65  function modChrome_xhtml($module, &$params, &$attribs)
  66  {
  67      if (!empty ($module->content)) : ?>
  68          <div class="moduletable<?php echo $params->get('moduleclass_sfx'); ?>">
  69          <?php if ($module->showtitle != 0) : ?>
  70              <h3><?php echo $module->title; ?></h3>
  71          <?php endif; ?>
  72              <?php echo $module->content; ?>
  73          </div>
  74      <?php endif;
  75  }
  76  
  77  /*
  78   * Module chrome that allows for rounded corners by wrapping in nested div tags
  79   */
  80  function modChrome_rounded($module, &$params, &$attribs)
  81  { ?>
  82          <div class="module<?php echo $params->get('moduleclass_sfx'); ?>">
  83              <div>
  84                  <div>
  85                      <div>
  86                          <?php if ($module->showtitle != 0) : ?>
  87                              <h3><?php echo $module->title; ?></h3>
  88                          <?php endif; ?>
  89                      <?php echo $module->content; ?>
  90                      </div>
  91                  </div>
  92              </div>
  93          </div>
  94      <?php
  95  }
  96  
  97  /*
  98   * Module chrome that add preview information to the module
  99   */
 100  function modChrome_outline($module, &$params, &$attribs)
 101  {
 102      $doc =& JFactory::getDocument();
 103      $css  = ".mod-preview-info { padding: 2px 4px 2px 4px; border: 1px solid black; position: absolute; background-color: white; color: red;opacity: .80; filter: alpha(opacity=80); -moz-opactiy: .80; }";
 104      $css .= ".mod-preview-wrapper { background-color:#eee;  border: 1px dotted black; color:#700; opacity: .50; filter: alpha(opacity=50); -moz-opactiy: .50;}";
 105      $doc->addStyleDeclaration($css);
 106  
 107      ?>
 108      <div class="mod-preview">
 109          <div class="mod-preview-info"><?php echo $module->position."[".$module->style."]"; ?></div>
 110          <div class="mod-preview-wrapper">
 111              <?php echo $module->content; ?>
 112          </div>
 113      </div>
 114      <?php
 115  }
 116  ?>


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