I have created a custom module chrome for my 3.3.1 website and it was working perfectly. I have just updated my website to 3.3.3 and my module.php got overriden in the process (promise, it won't happen again!). The module.php seems to be coded in a slightly different way so I have adapted the chrome php to reflect this change, but I can't make my module chrome work.
Thanks a lot for your help! (sorry for all the code below, I cut it down to the specific part concerning the module chrome)
This is in template/index.php
<jdoc:include type="modules" name="user1" style="megarounded"/>
The template/html/module.php I had in my Joomla 3.3.1
<?php
defined('_JEXEC') or die;
?>
<?php
function modChrome_megarounded($module, &$params, &$attribs)
{ ?>
<div class="megamod module<?php echo $params->get('moduleclass_sfx'); ?>">
<div class="megabox">
<div class="megaboxouter">
<div class="megaboxinner">
<?php if ($module->showtitle != 0) : ?>
<h6><?php echo $module->title; ?></h6>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
</div>
</div>
</div>
<?php
}
?>
The template/html/module.php I have now in my Joomla 3.3.3
<?php
defined('_JEXEC') or die;
function modChrome_megarounded($module, &$params, &$attribs)
{
if ($module->content)
{
echo "<div class=\"megamod" . htmlspecialchars($params->get('moduleclass_sfx')) . "\">";
echo "<div class=\"megabox\">";
echo "<div class=\"megaboxouter\">";
echo "<div class=\"megaboxinner\">";
if ($module->showtitle)
{
echo "<h6>" . $module->title . "</h6>";
}
echo $module->content;
echo "</div>";
echo "</div>";
echo "</div>";
echo "</div>";
}
}
?>
My website is here: you can see the module chrome style I want on the right column around The RSC in brief
(I have added the class directly in the index.php so for this module I didn't use the correct way of adding the module chrome). I am supposed to have this chrome apply to the user-1 position also (around all the greyish rectangles of Last articles
).
Any idea why my chrome isn't working? Thanks a lot!
I am seen this, but I didn't help me much
Update: based on Beez5 I have tried this but still no success:
function modChrome_megarounded($module, &$params, &$attribs)
{
if ($module->content)
{?>
<div class="megamod <?php echo htmlspecialchars($params->get('moduleclass_sfx'));?>">
<div class="megabox">
<div class="megaboxouter">
<div class="megaboxinner">
<?php if ($module->showtitle) : ?>
<h6><?php echo $module->title; ?></h6>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
</div>
</div>
</div>
<?php }
}