Kunena 6.3.0 released

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

This category contains miscellaneous, uncategorised user contributions, (templates, modules, plugins and hacks) relating to older versions of Kunena that are no longer supported.

The topics in this category are for historical interest only. Owing to the structural changes that occurred in K 1.7, many of the ideas in these topics will not work with later versions and, for that reason, the topics are locked.

Question [hack] Related posts for 1.6

More
13 years 2 months ago - 13 years 2 months ago #1 by guerilla
open view.php file and paste thiscode to bottom:
Code:
<!-- B: RELATIVE POSTS HACK BY GOLGE --><?php //similar posts hack by guerilla $percent=4; //similarity percentage, increase for sensitive matching. for example 10 is 10% match, 50 is 50% match, 100 is one o one $limit = 5; //set number of relative messages $query= "SELECT id, subject, name, time as zaman, catid, userid, MATCH(t1.subject) AGAINST ('$this->kunena_topic_title') AS oran FROM #__kunena_messages as t1 "; $query.= "WHERE MATCH(t1.subject) AGAINST('$this->kunena_topic_title') >= $percent AND id<> $this->thread "; $query.= "ORDER BY oran DESC LIMIT $limit;"; $sim_message = $this->db->setQuery($query); $sim_message = $this->db->loadObjectList(); echo mysql_error(); if (count($sim_message)> 0) { echo '<div class="kblock"><div class="kheader"><h2><span>Relative Posts</span></h2></div></div><div class= "klist-bottom"><table width="100%"><thead>'; echo '<tr><td><b>Subject</b></td><td><b>Author</b></td><td align="right"><b>Date</b></td><td align="right"><b>Similarity</b></td></tr>'; foreach ($sim_message as $sonuc) { echo '<tr><td><a href="index.php?option=com_kunena&Itemid='.$sonuc->id.'&func=view&catid=' . $sonuc->catid . '&id=' . $sonuc->id. '">' . $sonuc->subject . '</a></td>'; echo '<td>' . $sonuc->name . '</td>'; echo '<td align="right">' . CKunenaTimeformat::showDate($sonuc->zaman, 'config_post_dateformat') . '</td>'; echo '<td align="right">%' . (int)$sonuc->oran . '</td></tr>'; } echo "</table></div>"; } //similar posts hack by gerilla ?><!-- F: RELATIVE POSTS HACK BY GOLGE -->


run phpmyadmin and run theese codes:
Code:
ALTER TABLE jos_kunena_messages ADD FULLTEXT(subject) ALTER TABLE jos_kunena_messages_text ADD FULLTEXT(message)

you can change $limit=5 value to increase or decrease list count. to change match percentage you can change $percent=4 value to your own value.
Last edit: 13 years 2 months ago by sozzled. Reason: Changed subject to reflect better the issues
The following user(s) said Thank You: ChaosHead, tsetsoo

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

More
13 years 2 months ago #2 by sozzled
Do you mean related posts? :unsure:

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

More
13 years 2 months ago #3 by guerilla

sozzled wrote: Do you mean related posts? :unsure:


yes indeed :)
The following user(s) said Thank You: tsetsoo

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

More
13 years 2 months ago #4 by sozzled

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

More
13 years 2 months ago #5 by ChaosHead
Thanks, guerilla. But I had questions.
Many related posts are from that topic which is already displayed. How to eliminate them?
Or how to search for related topics, instead of related posts?

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

More
13 years 2 months ago #6 by ariaji86
error when i run the sql.

Code:
ALTER TABLE jos_kunena_messages ADD FULLTEXT(subject) ALTER TABLE jos_kunena_messages_text ADD FULLTEXT(message)

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE jos_kunena_messages_text ADD FULLTEXT(message)' at line 3

Thanks for all the hard works

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

More
13 years 2 months ago #7 by ChaosHead
First run
Code:
ALTER TABLE jos_kunena_messages ADD FULLTEXT(subject)
and than
Code:
ALTER TABLE jos_kunena_messages_text ADD FULLTEXT(message)

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

More
13 years 2 months ago - 13 years 2 months ago #8 by ariaji86
Code:
#1214 - The used table type doesn't support FULLTEXT indexes
i got this error
#1214 - The used table type doesn't support FULLTEXT indexes
Code:
ALTER TABLE jos_kunena_messages_text ADD FULLTEXT(message)
#1214 - The used table type doesn't support FULLTEXT indexes

i`m using kunena 1.6.3 & joomla 1.6

Thanks for all the hard works
Last edit: 13 years 2 months ago by ariaji86.

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

More
13 years 2 months ago - 13 years 2 months ago #9 by ChaosHead
I have replaced
Code:
$query= "SELECT id, subject, name, time as zaman, catid, userid, MATCH(t1.subject) AGAINST ('$this->kunena_topic_title') AS oran FROM #__kunena_messages as t1 "; $query.= "WHERE MATCH(t1.subject) AGAINST('$this->kunena_topic_title') >= $percent AND id<> $this->thread ";
with
Code:
$query= "SELECT id, thread, subject, name, time as zaman, catid, userid, hold, MATCH(t1.subject) AGAINST ('$this->kunena_topic_title') AS oran FROM #__kunena_messages as t1 "; $query.= "WHERE MATCH(t1.subject) AGAINST('$this->kunena_topic_title') >= $percent AND thread<> $this->thread AND hold= 0 ";
Now posts from a viewed topic and deleted posts won't be displayed among the similar.
Last edit: 13 years 2 months ago by ChaosHead.

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

More
12 years 6 months ago #10 by sunnyjey
This is one of the most important features lacking in the Kunena. The related posts increase stay of visitors as well as increases forum activity.

Do our Kunena Team has any plans to implement this features in near next releases?

Is this hack is still working on latest Kunena, as this post is 8 month old?

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

Time to create page: 0.550 seconds