- Posts: 1
- Thank you received: 0
Kunena 6.3.8 Released
The Kunena team has announce the arrival of Kunena 6.3.8 [K 6.3.8] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x/5.2.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 and issues discovered during the last development stages of K 6.3
Note: Please go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated.
Question Small issue but im unable to find solution
you see what my problem is..
runing kunena 1.5.14 and latest Joomla 1.5 release i think 1.5.22
i noticed that the problem is in my flat.php file but was unable to fix it... i will provide the code of my flat.php file (it is customised a lot)
<?php
/**
* @version $Id: flat.php 684 2009-05-06 01:28:53Z mahagr $
* Kunena Component
* @package Kunena
*
* @Copyright (C) 2008 - 2009 Kunena Team All rights reserved
* @license www.gnu.org/copyleft/gpl.html GNU/GPL
* @link www.kunena.com
*
* Based on FireBoard Component
* @Copyright (C) 2006 - 2007 Best Of Joomla All rights reserved
* @license www.gnu.org/copyleft/gpl.html GNU/GPL
* @link www.bestofjoomla.com
*
* Based on Joomlaboard Component
* @copyright (C) 2000 - 2004 TSMF / Jan de Graaff / All Rights Reserved
* @license www.gnu.org/copyleft/gpl.html GNU/GPL
* @author TSMF & Jan de Graaff
* edited for kunena/ja_sanidine_ii by Tiezeman
**/
// Dont allow direct linking
defined( '_JEXEC' ) or die('Restricted access');
$fbConfig =& CKunenaConfig::getInstance();
global $is_Moderator;
$kunena_my = &JFactory::getUser();
// Func Check
if (strtolower($func) == 'latest' || strtolower($func) == '')
{
$funclatest = 1;
}
else
{
$funclatest = 0;
}
if (strtolower($func) == 'mylatest')
{
$funcmylatest = 1;
}
else
{
$funcmylatest = 0;
}
// topic emoticons
$topic_emoticons = array ();
$topic_emoticons[0] = KUNENA_URLEMOTIONSPATH . 'default.gif';
$topic_emoticons[1] = KUNENA_URLEMOTIONSPATH . 'exclam.gif';
$topic_emoticons[2] = KUNENA_URLEMOTIONSPATH . 'question.gif';
$topic_emoticons[3] = KUNENA_URLEMOTIONSPATH . 'arrow.gif';
$topic_emoticons[4] = KUNENA_URLEMOTIONSPATH . 'love.gif';
$topic_emoticons[5] = KUNENA_URLEMOTIONSPATH . 'grin.gif';
$topic_emoticons[6] = KUNENA_URLEMOTIONSPATH . 'shock.gif';
$topic_emoticons[7] = KUNENA_URLEMOTIONSPATH . 'smile.gif';
// url of current page that user will be returned to after login
if ($query_string = JRequest::getVar('QUERY_STRING', '')) {
$Breturn = 'index.php?' . $query_string;
}
else {
$Breturn = 'index.php';
}
$Breturn = str_replace('&', '&', $Breturn);
$tabclass = array
(
"sectiontableentry1",
"sectiontableentry2"
);
$st_count = 0;
if (count($messages[0]) > 0)
{
foreach ($messages[0] as $leafa)
{
if (($leafa->ordering > 0 && !$funcmylatest) || ($leafa->myfavorite && $funcmylatest))
{
$st_count++;
}
}
}
if (count($messages[0]) > 0)
{
?>
<div class="<?php echo $boardclass; ?>_bt_cvr1">
<div class="<?php echo $boardclass; ?>_bt_cvr2">
<div class="<?php echo $boardclass; ?>_bt_cvr3">
<div class="<?php echo $boardclass; ?>_bt_cvr4">
<div class="<?php echo $boardclass; ?>_bt_cvr5">
<form action = "index.php" method = "post" name = "fbBulkActionForm">
<table class = "fb_blocktable<?php echo $objCatInfo->class_sfx; ?>" id = "fb_flattable" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
<?php if ($funclatest || $funcmylatest){ } else { ?>
<thead>
<tr>
<th colspan = "<?php echo ($is_Moderator?"6":"5");?>"> <div class = "fb_title_cover fbm"> <span class = "fb_title fbl"><b><?php echo _KUNENA_THREADS_IN_FORUM; ?>:</b> <?php echo '' . stripslashes($objCatInfo->name) . ''; ?></span> </div>
<!-- FORUM TOOLS -->
<?php
//(JJ) BEGIN: RECENT POSTS
if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/forumtools/forumtools.php')) {
include (KUNENA_ABSTMPLTPATH . '/plugin/forumtools/forumtools.php');
}
else {
include (KUNENA_PATH_TEMPLATE_DEFAULT .DS. 'plugin/forumtools/forumtools.php');
}
//(JJ) FINISH: RECENT POSTS
?>
<!-- /FORUM TOOLS -->
</th>
</tr>
</thead>
<?php } ?>
<tbody>
<tr class = "fb_sth fbs ">
<th class = "th-0 <?php echo $boardclass ?>sectiontableheader" width="1%"> </th>
<th class = "th-1 <?php echo $boardclass ?>sectiontableheader" align="left"><?php echo _GEN_TOPICS; ?></th>
<th class = "th-2 <?php echo $boardclass ?>sectiontableheader" width="5%" align="center"><?php echo _GEN_REPLIES; ?></th>
<th class = "th-3 <?php echo $boardclass ?>sectiontableheader" width="5%" align="center"><?php echo _GEN_HITS; ?></th>
<th class = "th-4 <?php echo $boardclass ?>sectiontableheader" width="20%" align="left"><?php echo _GEN_LAST_POST; ?></th>
<?php
if ($is_Moderator)
{
?>
<th class = "th-7 <?php echo $boardclass ?>sectiontableheader" width="1%" align="center">[X]</th>
<?php
}
?>
</tr>
<?php
$k = 0;
$st_c = 0;
$st_occured = 0;
foreach ($messages[0] as $leaf)
{
$k = 1 - $k; //used for alternating colours
$leaf->name = htmlspecialchars(stripslashes($leaf->name));
$leaf->email = htmlspecialchars(stripslashes($leaf->email));
?>
<?php
if ($st_c == 0 && $st_occured != 1 && $st_count != 0 && $funclatest == 0)
{
?>
<tr>
<td class = "<?php echo $boardclass ?>contentheading fbm" id = "fb_spot" colspan = "<?php echo ($is_Moderator?"5":"4");?>" align="left"><span>
<?php if(!$funcmylatest) {echo _KUNENA_SPOTS;} else {echo _USER_FAVORITES;} ?>
</span></td>
</tr>
<?php
}
if ($st_c == $st_count && $st_occured != 1 && $st_count != 0 && $funclatest == 0)
{
$st_occured = 1;
$k = 0;
?>
<tr>
<td class = "<?php echo $boardclass ?>contentheading fbm" id = "fb_fspot" colspan = "<?php echo ($is_Moderator?"5":"4");?>" align="left"><span>
<?php if(!$funcmylatest) {echo _KUNENA_FORUM;} else {echo _KUNENA_MY_DISCUSSIONS_DETAIL;} ?>
</span></td>
</tr>
<?php
}
?>
<tr class = "<?php
echo $boardclass.$tabclass[$k];
if ($leaf->ordering != 0 || ($leaf->myfavorite && $funcmylatest))
{echo '_stickymsg'; $topicSticky=1; }
?>">
<?php
if ($leaf->moved == 0)
{
// Need to add +1 as we only have the replies in the buffer
$totalMessages = $thread_counts[$leaf->id] + 1;
$curMessageNo = $totalMessages - ($last_read[$leaf->id]->unread ? $last_read[$leaf->id]->unread-1 : 0);
$threadPages = ceil($totalMessages / $fbConfig->messages_per_page);
$unreadPage = ceil($curMessageNo / $fbConfig->messages_per_page);
?>
<td class = "td-0" align="center"><?php echo CKunenaLink::GetSimpleLink($id);
echo $leaf->topic_emoticon == 0 ? '<img src="' . KUNENA_URLEMOTIONSPATH . 'default.png" border="0" alt="" />' : "<img src=\"" . $topic_emoticons[$leaf->topic_emoticon] . "\" alt=\"emo\" border=\"0\" />"; ?></td>
<?php
if ($leaf->ordering == 0) {
echo "<td class=\"td-3\">";
}
else
{
echo "<td class=\"td-3\">";
}
?>
<?php
//(JJ) ATTACHMENTS ICON
if ($leaf->attachmesid > 0) {
echo isset($fbIcons) ? '<img class="attachicon" src="' . KUNENA_URLICONSPATH
. $fbIcons . '" border="0" alt="' . _KUNENA_ATTACH . '" />' : '<img class="attachicon" src="' . KUNENA_URLEMOTIONSPATH . 'attachment.png" alt="' . _KUNENA_ATTACH . '" title="' . _KUNENA_ATTACH . '" />';
}
?>
<div class = "fb-topic-title-cover"> <?php echo CKunenaLink::GetThreadLink('view', $leaf->catid, $leaf->id, htmlspecialchars(stripslashes($leaf->subject)), htmlspecialchars(stripslashes($messagetext[$leaf->id])) , 'follow', 'fb-topic-title fbm');?> <span class="fbs">
<?php
if ($leaf->name)
{
echo '<span class="topic_by">';
echo _GEN_BY.' '.CKunenaLink::GetProfileLink($fbConfig, $leaf->userid, $leaf->name);
echo '</span>';
}
?>
<?php if (strtolower($func) != 'showcat' ){ ?>
<!-- Category -->
<span class="topic_category"> <?php echo _KUNENA_CATEGORY.' '.CKunenaLink::GetCategoryLink('showcat', $leaf->catid, stripslashes($leaf->catname)); ?> </span>
<!-- /Category -->
<?php } ?>
<?php if ($leaf->locked != 0) {?>
<!-- Locked -->
<span class="topic_locked"> <?php echo $fbIcons ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _GEN_LOCKED_TOPIC . '" />' : '<img src="' . KUNENA_URLEMOTIONSPATH . 'lock.gif" alt="' . _GEN_LOCKED_TOPIC . '" title="' . _GEN_LOCKED_TOPIC . '" />';
$topicLocked = 1; ?> </span>
<!-- /Locked -->
<?php } ?>
</span>
<!-- Favourite -->
<?php
if ($fbConfig->allowfavorites && array_key_exists($leaf->id, $favthread))
{
if ($leaf->myfavorite) {
echo $fbIcons ? '<img class="favoritestar" src="' . KUNENA_URLICONSPATH . $fbIcons
. '" border="0" alt="' . _KUNENA_FAVORITE . '" />' : '<img class="favoritestar" src="' . KUNENA_URLEMOTIONSPATH . 'favoritestar.gif" alt="' . _KUNENA_FAVORITE . '" title="' . _KUNENA_FAVORITE . '" />';
} else if (array_key_exists('favoritestar_grey', $fbIcons))
{
echo $fbIcons ? '<img class="favoritestar" src="' . KUNENA_URLICONSPATH . $fbIcons
. '" border="0" alt="' . _KUNENA_FAVORITE . '" />' : '<img class="favoritestar" src="' . KUNENA_URLEMOTIONSPATH . 'favoritestar.gif" alt="' . _KUNENA_FAVORITE . '" title="' . _KUNENA_FAVORITE . '" />';
}
}
?>
<!-- /Favorite -->
<?php
if ($fbConfig->shownew && $kunena_my->id != 0)
{
if (($prevCheck < $last_reply[$leaf->id]->time) && !in_array($last_reply[$leaf->id]->thread, $read_topics)) {
//new post(s) in topic
echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->id, $unreadPage, $fbConfig->messages_per_page, '<sup><span class="newchar"> (' . $last_read[$leaf->id]->unread . ' ' . stripslashes($fbConfig->newchar) . ')</span></sup>', $last_read[$leaf->id]->lastread);
}
}
?>
<?php
if ($totalMessages > $fbConfig->messages_per_page)
{
echo ("<span class=\"jr-showcat-perpage\">[");
echo _PAGE.' '.CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->id, 1, $fbConfig->messages_per_page, 1);
if ($threadPages > 3)
{
echo ("...");
$startPage = $threadPages - 2;
}
else
{
echo (",");
$startPage = 2;
}
$noComma = true;
for ($hopPage = $startPage; $hopPage <= $threadPages; $hopPage++)
{
if ($noComma) {
$noComma = false;
}
else {
echo (",");
}
echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, $hopPage, $fbConfig->messages_per_page, $hopPage);
}
echo ("]</span>");
}
?>
</div>
<?php
}
else
{
$threadPages = 0;
$unreadPage = 0;
//this thread has been moved, get the new location
$newURL = ""; //init
$kunena_db->setQuery("SELECT `message` FROM #__fb_messages_text WHERE `mesid`='" . $leaf->id . "'");
$newURL = $kunena_db->loadResult();
// split the string and separate catid and id for proper link assembly
parse_str($newURL, $newURLParams);
?>
<td class = "td-2"><?php echo CKunenaLink::GetSimpleLink($id);?> <img src = "<?php echo KUNENA_URLEMOTIONSPATH ;?>arrow.gif" alt = "emo"/></td>
<td class = "td-3"><div class = "fb-topic-title-cover"> <?php echo CKunenaLink::GetThreadLink('view', $newURLParams, $newURLParams, htmlspecialchars(stripslashes($leaf->subject)), htmlspecialchars(stripslashes($leaf->subject)), 'follow', 'fb-topic-title fbm');?> </div>
<?php
}
?></td>
<td class = "td-0 fbm" align="center"><?php echo (int)$thread_counts[$leaf->id]; ?></td>
<td class = "td-7 fbm" align="center"><?php echo (int)(int)$hits[$leaf->id]; ?></td>
<td class = "td-6 fbs" ><div style="position:relative">
<!-- Sticky -->
<?php if ($leaf->ordering != 0) { ?>
<span class="topic_sticky"> <?php echo $fbIcons ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _GEN_ISSTICKY . '" />': '<img class="stickyicon" src="' . KUNENA_URLEMOTIONSPATH . 'pushpin.gif" alt="' . _GEN_ISSTICKY . '" title="' . _GEN_ISSTICKY . '" />';
$topicSticky = 1; ?> </span>
<?php }?>
<!-- /Sticky -->
<!-- Avatar -->
<?php // (JJ) AVATAR
if ($fbConfig->avataroncat > 0) { ?>
<span class="topic_latest_post_avatar">
<?php
if ($fbConfig->avatar_src == "jomsocial" && $leaf->userid)
{
// Get CUser object
$user =& CFactory::getUser($last_reply[$leaf->id]->userid);
$useravatar = '<img class="fb_list_avatar" src="' . $user->getThumbAvatar() . '" alt=" " />';
echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, $useravatar);
}
else if ($fbConfig->avatar_src == "cb")
{
$useravatar = $kunenaProfile->showAvatar($last_reply[$leaf->id]->userid, 'fb_list_avatar');
echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, $useravatar);
} else {
$javatar = $last_reply[$leaf->id]->avatar;
if ($javatar!='') {
echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, '<img class="fb_list_avatar" src="'.(!file_exists(KUNENA_PATH_UPLOADED .DS. 'avatars/s_' . $javatar)?KUNENA_LIVEUPLOADEDPATH.'/avatars/'.$javatar:KUNENA_LIVEUPLOADEDPATH.'/avatars/s_'.$javatar) .'" alt="" />');
} else {
echo CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, '<img class="fb_list_avatar" src="'.KUNENA_LIVEUPLOADEDPATH.'/avatars/s_nophoto.jpg" alt="" />');
}
}?>
</span>
<?php } ?>
<!-- /Avatar -->
<!-- Latest Post -->
<span class="topic_latest_post">
<?php
if ($fbConfig->default_sort == 'asc')
{
echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, $threadPages, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
}
else
{
echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, 1, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
}
if ($leaf->name)
echo ' '._GEN_BY. ' '.CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, $last_reply[$leaf->id]->name, 'nofollow', 'topic_latest_post_user'); ?>
</span>
<!-- /Latest Post -->
<br />
<!-- Latest Post Date -->
<span class="topic_date"> <?php echo time_since($last_reply[$leaf->id]->time , time() + ($fbConfig->board_ofset * 3600)); ?> <?php echo _KUNENA_AGO ?> </span>
<!-- /Latest Post Date -->
</div></td>
<?php
if ($is_Moderator)
{
?>
<td class = "td-7" align="center"><input type = "checkbox" name = "fbDelete[<?php echo $leaf->id?>]" value = "1"/></td>
<?php
}
?>
</tr>
<?php
$st_c++;
}
?>
<?php
if ($is_Moderator)
{
?>
<tr class = "<?php echo $boardclass ?>sectiontableentry1">
<td colspan = "7" align = "right" class = "td-1 fbs"><script type = "text/javascript">
jQuery(document).ready(function()
{
jQuery('#fbBulkActions').change(function()
{
var myList = jQuery(this);
if (jQuery(myList).val() == "bulkMove")
{
jQuery("#KUNENA_AvailableForums").removeAttr('disabled');
}
else
{
jQuery("#KUNENA_AvailableForums").attr('disabled', 'disabled');
}
});
});
</script>
<select name = "do" id = "fbBulkActions" class = "inputbox fbs">
<option value = ""> </option>
<option value = "bulkDel"><?php echo _KUNENA_DELETE_SELECTED ; ?></option>
<option value = "bulkMove"><?php echo _KUNENA_MOVE_SELECTED ; ?></option>
</select>
<?php
CKunenaTools::showBulkActionCats();
?>
<input type = "submit" name = "fbBulkActionsGo" class = "fb_button fbs" value = "<?php echo _KUNENA_GO ; ?>"/></td>
</tr>
<?php
}
?>
</tbody>
</table>
<input type = "hidden" name = "Itemid" value = "<?php echo KUNENA_COMPONENT_ITEMID;?>"/>
<input type = "hidden" name = "option" value = "com_kunena"/>
<input type = "hidden" name = "func" value = "bulkactions" />
<input type = "hidden" name = "return" value = "<?php echo JRoute::_( $Breturn ); ?>" />
</form>
</div>
</div>
</div>
</div>
</div>
<?php
}
else {
echo "<p align=\"center\">" . _VIEW_NO_POSTS . "</p>";
}
?>
Please Log in or Create an account to join the conversation.