×
Kunena 5.2 Beta 1 Released (24 Sep 2020)

The Kunena team is thrilled to announce the first public beta release of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.

The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 B1 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.

× 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
8 years 1 month 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
8 years 1 month 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
8 years 1 month ago - 8 years 1 month 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
<?php
/**
 * Kunena Latest Module
 * @package Kunena.mod_kunenalatest
 *
 * @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
 * @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link https://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
<?php
/**
 * Kunena Latest Module
 * @package Kunena.mod_kunenalatest
 *
 * @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
 * @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link https://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: 8 years 1 month ago by gwmbox. Reason: Clearer details - hopefully

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

More
8 years 1 month ago - 8 years 1 month 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: 8 years 1 month ago by sozzled.

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

More
8 years 1 month 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.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.117 seconds