Kunena 7.0.5 & Kunena 6.4.11 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.0.5 [K 7.0.5] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.

The Kunena team is also pleased to announce the eleventh version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.

Before posting in this category, please read sticky topics and, as general background, My Joomla site template makes a mess of Kunena .

If you have questions about third-party templates, please use the User-written Templates category or contact the author directly. This category should only be used for questions about templates developed and supported by the Kunena project.

Question Top of page button on every post

More
15 years 4 months ago #78470 by leletto
Hi, I need to modify the messages viewing by adding a button on every post, for example under the avatar image, that link to the top of the thread. I know there's one button for the same purpose on the bottom of the thread, but I think that a button on every post can help people that don't use the mouse.

Can someone suggest me some usefull information for doing that?

P.s.: sorry for my english.

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

More
15 years 4 months ago - 15 years 4 months ago #78477 by leletto
Sorry for double posting, but I made this modification by myself. But it didn't work very well. The "go to top" button didn't really get the top of the page, it goes to the first message. The "go to bottom" it only jumps by 1 or 2 messages down. I know is due to my knowledge in joomla/kunena/html programming that is very poor, but maybe someone can point me to the right direction.

So...here's the modification I maded:

First I've simply copied the "thread.action.php" to "message.links.php" under the folder /template/default/view/

The message.link.php files contains the following code:
Code:
<?php /** * @version $Id: thread.actions.php 3864 2010-11-05 16:23:40Z fxstein $ * Kunena Component * @package Kunena * * @Copyright (C) 2008 - 2010 Kunena Team All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org **/ // Dont allow direct linking defined ( '_JEXEC' ) or die (); ?> <!-- B: Message link --> <?php echo $this->goto ?> <!-- F: Message link -->

I've added a class under the displayThreadActions in the file /funcs/view.php called displayMessageLinks:
Code:
function displayMessageLinks($location=0) { static $locations = array('top', 'bottom'); $this->goto = ''; $location ^= 1; $this->goto .= CKunenaLink::GetSamePageAnkerLink ( 'forum'.$locations[$location], CKunenaTools::showIcon ( 'kforum'.$locations[$location], JText::_('COM_KUNENA_GEN_GOTO'.$locations[$location] ) ), 'nofollow', 'kbuttongoto'); CKunenaTools::loadTemplate('/view/message.links.php'); }

Then I've modified the file /template/default/view/view.php and I've replaced this code:
Code:
<div class="kcontainer"> <div class="kbody"> <?php foreach ( $this->messages as $message ) $this->displayMessage($message)?> </div> </div>


with this one:
Code:
<div class="kcontainer"> <div class="kbody"> <?php foreach ( $this->messages as $message ) { $this->displayMessage($message); $this->displayMessageLinks(1); $this->displayMessageLinks(0); } ?> </div> </div>


Edit: I've found the solution for the link that don't goes totally up or down. It was in the class "displaymessageLink". Now it works fine.
Last edit: 15 years 4 months ago by leletto.

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

Time to create page: 0.241 seconds