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

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
15 years 2 months ago - 15 years 2 months ago #85841 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: 15 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
15 years 2 months ago #85856 by sozzled
Do you mean related posts? :unsure:

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

More
15 years 2 months ago #85857 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
15 years 2 months ago #85860 by sozzled

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

More
15 years 2 months ago #85877 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
15 years 2 months ago #85881 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.

Time to create page: 0.242 seconds