Kunena 7.0.11 & Kunena 6.4.16 – Security Updates Released and K7.1 in RC1 2

The Kunena team has announce the arrival of three simultaneous security release : K6.4.16, K7.0.11 and K7.1 RC2. Just a reminder K6.4.16 receives only securities fixes untill end of 2026, so it's advised for users to upgrade to K7.0.11. K7.0.11 is the last release of the K7.0 because it's replaced by K7.1 branch with the stable release in the corner. The translations for K7.1 on crowdin.com/project/kunena-forum-7-1 needs to be checked or improved becasue it has been generated by TM (Translation Machine).

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 8 months ago - 15 years 8 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 8 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 8 months ago #85856 by sozzled

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

More
15 years 8 months ago #85857 by guerilla
The following user(s) said Thank You: tsetsoo

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

More
More
15 years 8 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 8 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: 1.690 seconds