- Posts: 159
- Thank you received: 8
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.
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
15 years 2 months ago - 15 years 2 months ago #85841
by guerilla
[hack] Related posts for 1.6 was created by guerilla
open view.php file and paste thiscode to bottom:
run phpmyadmin and run theese codes:
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.
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
Please Log in or Create an account to join the conversation.
15 years 2 months ago #85856
by sozzled
Blue Eagle vs. Crypsis reference guide
Read my blog and
Replied by sozzled on topic Re: [hack] relative posts for 1.6
Do you mean related posts?
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
15 years 2 months ago #85857
by guerilla
yes indeed
Replied by guerilla on topic Re: [hack] relative posts for 1.6
sozzled wrote: Do you mean related posts?
yes indeed
The following user(s) said Thank You: tsetsoo
Please Log in or Create an account to join the conversation.
15 years 2 months ago #85860
by sozzled
Blue Eagle vs. Crypsis reference guide
Read my blog and
Replied by sozzled on topic Re: [hack] Related posts for 1.6
Good idea!
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
15 years 2 months ago #85877
by ChaosHead
Replied by ChaosHead on topic Re: [hack] Related posts for 1.6
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?
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.
15 years 2 months ago #85881
by ariaji86
Thanks for all the hard works
Replied by ariaji86 on topic Re: [hack] Related posts for 1.6
error when i run the sql.
#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
Code:ALTER TABLE jos_kunena_messages ADD FULLTEXT(subject) ALTER TABLE jos_kunena_messages_text ADD FULLTEXT(message)
Thanks for all the hard works
Please Log in or Create an account to join the conversation.
Time to create page: 0.451 seconds