PageRenderTime 38ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/joomla/administrator/templates/system/html/modules.php

https://github.com/reechalee/joomla1.6
PHP | 77 lines | 52 code | 6 blank | 19 comment | 9 complexity | 7d825b6433ab198e866d2f8fcc183d2b MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause, JSON
  1. <?php
  2. /**
  3. * @version $Id: modules.php 20411 2011-01-23 06:15:49Z infograf768 $
  4. * @package Joomla.Administrator
  5. * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
  6. * @license GNU General Public License version 2 or later; see LICENSE.txt
  7. */
  8. // no direct access
  9. defined('_JEXEC') or die;
  10. /*
  11. * none (output raw module content)
  12. */
  13. function modChrome_none($module, &$params, &$attribs)
  14. {
  15. echo $module->content;
  16. }
  17. /*
  18. * xhtml (divs and font header tags)
  19. */
  20. function modChrome_xhtml($module, &$params, &$attribs)
  21. {
  22. $content = trim($module->content);
  23. if (!empty ($content)) : ?>
  24. <div class="module<?php echo htmlspecialchars($params->get('moduleclass_sfx')); ?>">
  25. <?php if ($module->showtitle != 0) : ?>
  26. <h3><?php echo $module->title; ?></h3>
  27. <?php endif; ?>
  28. <?php echo $content; ?>
  29. </div>
  30. <?php endif;
  31. }
  32. /*
  33. * allows sliders
  34. */
  35. function modChrome_sliders($module, &$params, &$attribs)
  36. {
  37. $content = trim($module->content);
  38. if (!empty($content))
  39. {
  40. if ($params->get('automatic_title','0')=='0') {
  41. echo JHtml::_('sliders.panel', $module->title, 'module'.$module->id);
  42. }
  43. elseif (method_exists('mod'.$module->name.'Helper','getTitle')) {
  44. echo JHtml::_('sliders.panel', call_user_func_array(array('mod'.$module->name.'Helper','getTitle'), array($params)), 'module'.$module->id);
  45. }
  46. else {
  47. echo JHtml::_('sliders.panel', JText::_('MOD_'.$module->name.'_TITLE'), 'module'.$module->id);
  48. }
  49. echo $content;
  50. }
  51. }
  52. /*
  53. * allows tabs
  54. */
  55. function modChrome_tabs($module, &$params, &$attribs)
  56. {
  57. $content = trim($module->content);
  58. if (!empty($content))
  59. {
  60. if ($params->get('automatic_title','0')=='0') {
  61. echo JHtml::_('tabs.panel', $module->title, 'module'.$module->id);
  62. }
  63. elseif (method_exists('mod'.$module->name.'Helper','getTitle')) {
  64. echo JHtml::_('tabs.panel', call_user_func_array(array('mod'.$module->name.'Helper','getTitle'), array($params)), 'module'.$module->id);
  65. }
  66. else {
  67. echo JHtml::_('tabs.panel', JText::_('MOD_'.$module->name.'_TITLE'), 'module'.$module->id);
  68. }
  69. echo $content;
  70. }
  71. }