Example #1
0
 /**
  * Implement event onRenderModule to include the module chrome provide by T3
  * This event is fired by overriding ModuleHelper class
  * Return false for continueing render module
  *
  * @param   object  &$module   A module object.
  * @param   array   $attribs   An array of attributes for the module (probably from the XML).
  *
  * @return  bool
  */
 function onRenderModule(&$module, $attribs)
 {
     static $chromed = false;
     // Detect layout path in T3 themes
     if (T3Common::detect()) {
         // Remove outline style which added when tp=1
         // T3 template provide an advanced tp mode which could show more information than the default
         if (JRequest::getCmd('t3info')) {
             $attribs['style'] = preg_replace('/\\s\\boutline\\b/i', '', $attribs['style']);
         }
         // fix JA Backlink
         if ($module->module == 'mod_footer') {
             $module->content = T3Common::fixJALink($module->content);
         }
         // Chrome for module
         if (!$chromed) {
             $chromed = true;
             // We don't need chrome multi times
             $chromePath = T3Path::getPath('html' . DS . 'modules.php', false);
             if (file_exists($chromePath)) {
                 include_once $chromePath;
             }
         }
     }
     return false;
 }