Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Module style over-rides not working

More
11 years 8 months ago #1 by gwmbox
Hi guys, I wanted to edit the template for the mod_kunenalatest, however if I do make changes and place it in my template html folder (within a mod_kunenalatest folder) like every other mod and content item make changes to it causes issues with the wrong content being displayed. Is the module able to have an over-ride via the sites template?

Thanks

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #2 by sozzled
The easiest way to make custom CSS changes is to read How do I change the colours of my template in Kunena? in the FAQs page and add the custom CSS to the end of your Joomla site template CSS file.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #3 by gwmbox
Where did I say I wanted to make any css changes?

I am wanting to add some additional html to the module template, but when I do and place it in my templates html folder the module content is not working as it should, even just add a basic h2 title causes it to fail.

So for example the default.php file located in \modules\mod_kunenalatest\tmpl is
Code:
<?php /** * Kunena Latest Module * @package Kunena.mod_kunenalatest * * @copyright (C) 2008 - 2012 Kunena Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ defined ( '_JEXEC' ) or die (); ?> <div class="<?php echo $this->params->get ( 'moduleclass_sfx' )?> klatest <?php echo $this->params->get ( 'sh_moduleshowtype' )?>"> <ul class="klatest-items"> <?php if (empty ( $this->topics )) : ?> <li class="klatest-item"><?php echo JText::_('MOD_KUNENALATEST_NO_MESSAGE') ?></li> <?php else : ?> <?php $this->displayRows (); ?> <?php endif; ?> </ul> <?php if ($this->topics && $this->params->get ( 'sh_morelink' )): ?> <p class="klatest-more"><?php echo JHtml::_('kunenaforum.link', $this->params->get ( 'moreuri' ), JText::_ ( 'MOD_KUNENALATEST_MORE_LINK' ) ); ?></p> <?php endif; ?> </div>

Now if I want to add a h2 title for example so it is now
Code:
<?php /** * Kunena Latest Module * @package Kunena.mod_kunenalatest * * @copyright (C) 2008 - 2012 Kunena Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ defined ( '_JEXEC' ) or die (); ?> <div class="<?php echo $this->params->get ( 'moduleclass_sfx' )?> klatest <?php echo $this->params->get ( 'sh_moduleshowtype' )?>"> <h2>Latest Forum Discussions</h2> <ul class="klatest-items"> <?php if (empty ( $this->topics )) : ?> <li class="klatest-item"><?php echo JText::_('MOD_KUNENALATEST_NO_MESSAGE') ?></li> <?php else : ?> <?php $this->displayRows (); ?> <?php endif; ?> </ul> <?php if ($this->topics && $this->params->get ( 'sh_morelink' )): ?> <p class="klatest-more"><?php echo JHtml::_('kunenaforum.link', $this->params->get ( 'moreuri' ), JText::_ ( 'MOD_KUNENALATEST_MORE_LINK' ) ); ?></p> <?php endif; ?> </div>

Then save that in my \templates\mysitetemnplate\html\mod_kunenalatest folder

It fails. But if I save over the default.php file in the module folder (original) at \modules\mod_kunenalatest\tmpl it works fine. So it appears as tough over-rides are not possible for the module.

Thanks
Last edit: 11 years 8 months ago by gwmbox. Reason: Clearer details - hopefully

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #4 by sozzled
Make your custom CSS changes to the end of your Joomla site template CSS file. That is the easiest way to make your changes. If you want to do it another way, that's OK, but that's not what I was suggesting.

Module style overrides sounds like CSS to me - well, up to a certain point they can be thought of like that ;) But seriously, I'm not that familiar with template overrides, or how many Joomla modules are equipped to deal with them, or whether the Kunena Latest module per se can work with such overrides (in the strict Joomla sense of the word).
Last edit: 11 years 8 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #5 by gwmbox
I am not sure we are seeing the same page here.... :P

Let me give another example. The login module (Joomla default) which is located in modules/mod_login. within that is a tmpl folder which has a default.php file in it. Instead of me editing that file directly I place a copy in my Joomla template html folder, i.e. in templates/mytemplate/html/mod_login and place the copy of default.php in there.

I then make some structural and formatting changes within that file and now Joomla loads that modified file in place of (or instead of) the original file. This way I am able to make edits without editing any core files.

Yes CSS edits can do other changes but I am talking about structure as well.

Now what I was saying in my first post is that if I follow the same principle with mod_kunenalatest by using the same process of using an over-ride in my template the template file is not used and thus template over-rides for mod_kunenalatest do not work.

Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.359 seconds