Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] 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

Question help for jomsocial fireboard module to kunena

More
17 years 3 months ago #49 by aniphreak
can you please help me on this? im trying to figure out fireboard module to work with kuneba... im just changing the main compnent's direction (com_kunena to com_kunena)
i cannot make it to work... it says
Code:
Warning: require_once(/home2/obra/public_html/components/com_kunena/sources/fb_config.class.php) [function.require-once]: failed to open stream: No such file or directory in /home2/obra/public_html/modules/mod_fblatest/helper.php on line 5 Fatal error: require_once() [function.require]: Failed opening required '/home2/obra/public_html/components/com_kunena/sources/fb_config.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/obra/public_html/modules/mod_fblatest/helper.php on line 5

here is the helper.php of the fireboard module by perfectdesigning:
Code:
<?php // no direct access defined('_JEXEC') or die('Restricted access'); require_once (JPATH_SITE.DS.'components'.DS.'com_kunena'.DS.'sources'.DS.'fb_config.class.php'); global $fbConfig; $fbConfig = new fb_config(); $fbConfig->load(); require_once (JPATH_SITE.DS.'components'.DS.'com_kunena'.DS.'class.fireboard.php'); require_once (JPATH_SITE.DS.'components'.DS.'com_kunena'.DS.'sources'.DS.'fb_link.class.php'); require_once (JPATH_SITE.DS.'components'.DS.'com_kunena'.DS.'template'.DS.'default'.DS.'smile.class.php'); class modFBLatestHelper { function getAvatar($userid, $avatar_height) { $jspath = JPATH_BASE.DS.'components'.DS.'com_community'; include_once($jspath.DS.'libraries'.DS.'core.php'); // Get CUser object $user =& CFactory::getUser($userid); $avatarUrl = $user->getThumbAvatar(); $link = CRoute::_('index.php?option=com_community&view=profile&userid='.$userid); $avatar = "<a href=\"$link\"><img class=\"hasTip\" style=\"border:1px solid #cccccc; float: left; margin: 3px 3px 3px 3px; padding:2px; height: $avatar_height;\" src=\"$avatarUrl\" alt=\"$user->name\" title=\"$user->name\" /></a>"; return $avatar; } function getLatestPosts($params) { global $fbConfig, $row, $avatar_height; $db = &JFactory::getDBO(); $user = &JFactory::getUser(); $posts = $params->get('posts', 10); $show_pub = $params->get('show_pub', 1); $show_reg = $params->get('show_reg', 0); $show_spe = $params->get('show_spe', 0); $cat_limit = $params->get('cat_limit' , 0); $cat_child = $params->get('cat_child', 1); $latest = $params->get('latest', 0); $more_text = $params->get('more_text', 'More...'); $more_time = $params->get('more_time', 168); $unread = $params->get('unread', 1); $unread_text = $params->get('unread_text', '!'); $subject = $params->get('subject', 40); $message = $params->get('message', 200); $name_link = $params->get('name_link', 1); $item_format = $params->get('item_format', '%R %S<br /><small>%N %D</small>'); $tooltip_format = $params->get('tooltip_format', '%F > %L'); $date_format = $params->get('date_format', 'j.n.Y G:i'); $avatar_height = $params->get('avatar_height', '48px'); //new indicator if ($user->id != 0) { $db->setQuery("SELECT * FROM #__fb_sessions WHERE userid = {$user->id}"); $session = $db->loadObjectList(); if ($session) { $lasttime = $session[0]->lasttime; $readtopics = $session[0]->readtopics; } else { $lasttime = time() - 1314000; // 1 year $readtopics = ''; } } else { $lasttime = 0; $readtopics = ''; } // new indicator if ($readtopics) // user have session $sql_new = ", (m.time > $lasttime AND m.thread NOT IN ($readtopics)) AS unread"; elseif ($lasttime) // user don't have session $sql_new = ", (m.time > $lasttime) AS unread"; else // no user $sql_new = ", 0 AS unread"; // access levels $i = $show_pub + 2 * $show_reg + 4 * $show_spe; switch ($i) { case 0: $sql_access = 'AND c.pub_access == 999999'; break; case 1: $sql_access = 'AND c.pub_access = 0'; break; case 2: $sql_access = 'AND c.pub_access < 0'; break; case 3: $sql_access = 'AND c.pub_access <= 0'; break; case 4: $sql_access = 'AND c.pub_access > 0'; break; case 5: $sql_access = 'AND c.pub_access >= 0'; break; case 6: $sql_access = 'AND c.pub_access != 0'; break; default: $sql_access = ''; } // categories $sql_cat = ''; if ($cat_limit) { $cats = explode(',', $cat_limit); foreach ($cats as $i => $cat) { $cats[$i] = (int)$cat; if ($cat == -1) $cats[$i] = $params->get('catid', 0); if ($cat == 0) unset($cats[$i]); } $cat_limit = implode(',', $cats); if ($cat_limit) { if ($cat_child) $sql_cat = "AND (c.id IN ($cat_limit) OR c.parent IN ($cat_limit))"; else $sql_cat = "AND c.id IN ($cat_limit)"; } } switch ($latest) { case 0: // Show all posts from a thread $query = " SELECT l.id, l.time, l.thread, n.hits, count(m.id) AS `count`, l.subject, l.userid, l.name, l.catid, l.catname, l.unread, t.message FROM (SELECT m.time, m.thread, m.id, m.catid, m.userid, m.name, m.subject, c.name AS catname $sql_new FROM #__fb_messages AS m JOIN #__fb_categories AS c ON m.catid = c.id WHERE c.published = 1 AND m.hold = 0 AND m.moved = 0 $sql_access $sql_cat ORDER BY m.id DESC LIMIT $posts) AS l JOIN #__fb_messages AS m ON l.thread = m.thread JOIN #__fb_messages AS n ON l.thread = n.id JOIN #__fb_messages_text AS t ON l.id = t.mesid WHERE l.time >= m.time AND m.hold = 0 AND m.moved = 0 GROUP BY l.id ORDER BY l.id DESC"; break; case 1: // Show only first post from a thread $query = " SELECT m.id, m.time, m.thread, m.hits, 1 AS `count`, m.subject, m.userid, m.name, m.catid, c.name AS catname, t.message $sql_new FROM #__fb_messages AS m JOIN #__fb_categories AS c ON m.catid = c.id JOIN #__fb_messages_text AS t ON m.id = t.mesid WHERE c.published = 1 AND m.hold = 0 AND m.moved = 0 AND m.parent = 0 $sql_access $sql_cat ORDER BY m.id DESC LIMIT $posts"; break; case 2: // Show only last post from a thread $query = " SELECT q.maxid AS id, m.time, m.thread, n.hits, q.countid AS `count`, m.subject, m.userid, m.name, m.catid, q.catname, t.message $sql_new FROM (SELECT max(m.id) AS maxid, count(m.id) AS countid, c.name AS catname FROM #__fb_messages AS m JOIN #__fb_categories as c ON m.catid = c.id WHERE c.published = 1 AND m.hold = 0 AND m.moved = 0 $sql_access $sql_cat GROUP BY m.thread ORDER BY max(m.id) DESC LIMIT $posts) AS q JOIN #__fb_messages AS m ON q.maxid = m.id JOIN #__fb_messages AS n ON m.thread = n.id JOIN #__fb_messages_text AS t ON q.maxid = t.mesid "; break; } $db->setQuery($query); $rows = $db->loadObjectList(); if (!count($rows)) return; $items = array(); foreach ($rows as $row) { $item = ''; $item->subject = (stripslashes($row->subject)) ? stripslashes($row->subject) : 'No subject'; $item->subject_short = (JString::strlen($item->subject) > $subject) ? JString::substr($item->subject, 0, $subject - 4) . '...' : $item->subject; $item->message = str_replace('"', '', smile::purify($row->message)); $item->message_short = (JString::strlen($item->message) > $message) ? JString::substr($item->message, 0, $message - 4) . '...' : $item->message; //$item->postname = ($name_link > 0 && $row->userid > 0) ? fb_link::GetProfileLink($row->userid, $row->name) : $row->name; $item->postname = ($name_link > 0 && $row->userid > 0) ? '<a href="'.JRoute::_('index.php?option=com_community&view=profile&userid='.$row->userid.'&Itemid=8').'">'.$row->name.'</a>' : $row->name; $item->date = '<span style="white-space: nowrap">' . date($date_format, FBTools::fbGetInternalTime($row->time)) . '</span>'; $item->more = fb_link::GetShowLatestThreadsLink($more_time, $more_text, $rel='nofollow'); $s = $item_format; $s = str_replace('%S', fb_link::GetThreadPageLink('view', $row->catid, $row->thread, ceil($row->count / $fbConfig->messages_per_page), $fbConfig->messages_per_page, $item->subject_short, $row->id), $s); $s = str_replace('%L', fb_link::GetThreadPageLink('view', $row->catid, $row->thread, ceil($row->count / $fbConfig->messages_per_page), $fbConfig->messages_per_page, $item->subject, $row->id), $s); $s = str_replace('%M', $item->message_short, $s); $s = str_replace('%T', $item->message, $s); $s = str_replace('%N', $item->postname, $s); $s = str_replace('%D', $item->date, $s); $s = str_replace('%F', $row->catname, $s); $s = str_replace('%H', $row->hits, $s); $s = str_replace('%C', $row->count - 1, $s); $s = str_replace('%R', ($row->unread) ? $unread_text : '', $s); $s = (strpos($s, '%A') === false) ? $s : str_replace('%A', modFBLatestHelper::getAvatar($row->userid, $avatar_height), $s); $item->title = $s; $s = $tooltip_format; $s = str_replace('%S', $item->subject_short, $s); $s = str_replace('%L', $item->subject, $s); $s = str_replace('%M', $item->message_short, $s); $s = str_replace('%T', $item->message, $s); $s = str_replace('%N', $item->postname, $s); $s = str_replace('%D', $item->date, $s); $s = str_replace('%F', $row->catname, $s); $s = str_replace('%H', $row->hits, $s); $s = str_replace('%C', $row->count - 1, $s); $s = str_replace('%R', ($row->unread) ? $unread_text : '', $s); $item->tooltip = $s; $items[] = $item; } return $items; } }

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

More
17 years 3 months ago #50 by Matias
Try to rename these:

sources/fb_config.class.php => lib/kunena.config.class.php
class.fireboard.php => class.kunena.php
sources/fb_link.class.php => lib/kunena.link.class.php

There may be others, too..

Ah, fb_link class is now CKunenaLinks.

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

More
17 years 3 months ago #51 by aniphreak
i replace all hou said...

im getting this:
Code:
Fatal error: Class 'CKunenaLinks' not found in /home2/obra/public_html/modules/mod_fblatest/helper.php on line 165

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

More
17 years 3 months ago #58 by fxstein
Looks like we broke the code tag display again. Need to fix that.

As for the JomSocial app integration. It is one our short term goals list (need it for this very same site). I had planned to create a version for Kunena this week. You guys beat us to it.

We have plans to change the database table names, coupled with an import from fb to make sure our installs don't interfere with existing fb installs. Part of that, we will have a simple start of an API to help developers of apps like this to focus on their logic and remove the need fro custom SQL statements in their code. That way things don't break when we change the database structures.

We have several database changes in the works that will speedup Kunena many times over the prior fb base. The code for these db changes is pretty much done, just not yet committed. The need for a simple API is one reason for this.

We love stars on the Joomla Extension Directory . :-)

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

More
17 years 3 months ago #60 by aniphreak
awww... too bad it will be a longer fix

i have no choice but just wait for that :( :(

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

More
17 years 3 months ago #64 by aniphreak
is there a quick fix for this?

i need to make it work badly...


its because i accidentaly installed kurena with the live site itself without looking at the adress tab (i acually taught i am on my local server.)

silly me :S :S

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

Time to create page: 0.446 seconds