Kunena 6.2.5 & module Kunena Latest 6.0.7 released

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

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

This category may also contain a few topics relating to K 1.6 that may have been moved here possibly by mistake.

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

Question relative posts hack 0.1 beta

More
14 years 7 months ago - 14 years 7 months ago #1 by guerilla
open view.php and find this:
Code:
<!-- F: List Actions Bottom -->

and paste this after:
Code:
<?php //similar posts hack by guerilla $percent=5; //similarity percentage, increase for sensitive matching. for example 10 is 10% match, 50 is 50% match, 100 is one o one $topics_only=0; //set 1 if you wanna show only topics, set 0 to show relative messages directly $limit = 5; //set number of relative messages if ($topics_only = 1) { $parent =" AND parent=0 "; } $query=("SELECT id, subject, name, time as zaman, catid, userid, MATCH(t1.message) AGAINST('$this_message->subject') as oran1, MATCH(t2.subject) AGAINST('$this_message->subject') as oran2 FROM #__fb_messages_text as t1 INNER JOIN #__fb_messages as t2 ON t2.id = t1.mesid WHERE (MATCH(t1.message) AGAINST('$this_message->subject') > $percent OR MATCH(t2.subject) AGAINST('$this_message->subject') > $percent) AND t2.id <>" . $this_message->id . $parent . " ORDER BY oran2 DESC, oran1 DESC LIMIT $limit;"); $sim_message=$kunena_db->setQuery($query); $sim_message = $kunena_db->loadObjectList(); echo mysql_error(); if (count($sim_message)> 0) { echo '<table class = "fb_blocktable' . $objCatInfo->class_sfx . '" id="fb_views" border = "0" cellspacing = "0" cellpadding = "5" width="100%"><thead><tr><th colspan="4"><div class = "fb_title_cover fbm">'; echo '<span class = "fb_title fbl"><b>Relative Posts</b></span></div></th></tr></thead>'; echo '<tr class = "fb_sth"><td class = "view-th ' . $boardclass . 'sectiontableheader"><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) { if ($sonuc->oran1 > $sonuc->oran2) { $oran = $sonuc->oran1; } else { $oran=$sonuc->oran2; } echo "<tr><td><a href=\"index.php?option=com_kunena&Itemid=" . KUNENA_COMPONENT_ITEMID . "&func=view&catid=" . $sonuc->catid . "&id=" . $sonuc->id. "\">" . $sonuc->subject . "</a></td>"; echo "<td>" . CKunenaLink::GetProfileLink($fbConfig, $sonuc->userid, $sonuc->name) . "</td>"; echo "<td align=\"right\">" . date(_DATETIME, $sonuc->zaman) . "</td>"; echo "<td align=\"right\">%" . (int)$oran . "</td></tr>"; } echo "</table>"; } //similar posts hack by gerilla ?>

finally open your phpmysqladmin and run this scripts:
Code:
ALTER TABLE jos_fb_messages ADD FULLTEXT(subject) ALTER TABLE jos_fb_messages_text ADD FULLTEXT(message)


thats all.

acknowledgements:
-to increase sensitivity of matching increase $percent=5; (for example $percent=10 ) value can between 0 to 100.

-$topics_only=0; //set this 1 if you wanna show only topics, set 0 to show all relatve posts directly (default is 0)
-$limit sets maximum number of relative posts showing, default is 5. you can set this what you want. 3, 8, 10 or 20 etc...

NOTE: DO NOT COPY CODES DIRECTLY FROM POST. PRESS QUOTE AND THEN COPY THE CODES FROM TEXT AREA.
Last edit: 14 years 7 months ago by guerilla.

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

More
14 years 7 months ago #2 by gonzaunit
good job, but i have a problem.

Parse error: parse error in C:\xampplite\htdocs\caco\components\com_kunena\template\default_ex\view.php on line 1238

;)

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

More
14 years 7 months ago #3 by guerilla
did you copy post directly? kunena adds unwanted spaces to code. press quote button and copy the code from textarea.

by the way i forgot to tell, you must add fultext to search fields. open your phpmysqladmin and run this scripts:

ALTER TABLE jos_fb_messages ADD FULLTEXT(subject)

ALTER TABLE jos_fb_messages_text ADD FULLTEXT(message)

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

More
14 years 7 months ago #4 by gonzaunit
thanks great hack..
can see , this work.
[IMG

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

More
14 years 6 months ago - 14 years 6 months ago #5 by FENIX
Sorry, but it doesn't work for me!
Please, help :(
When I enter any post (not topic) I see this - see the attachment

I have done everything correctly. I have made "tag hack" without any problems, so I know how to do that.
And I swithed on mistakes - nothing. I thought, I would see some syntax error at least. But nothing at all, so I do not really know where to look for that trouble to correct.
Attachments:
Last edit: 14 years 6 months ago by FENIX.

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

More
14 years 6 months ago #6 by guerilla
did you copy code from post directly? you must first click quote and copy the code from text area.

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

More
14 years 6 months ago #7 by FENIX
Well, a little bit better but still ...
See the picture, please
Attachments:

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

More
14 years 6 months ago #8 by guerilla
could you send me your view.php file?

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

More
14 years 6 months ago - 14 years 6 months ago #9 by FENIX
Yes, of course. Here you are.
Thank you in advance

File Attachment:

File Name: view2.zip
File Size:13 KB
Attachments:
Last edit: 14 years 6 months ago by FENIX.

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

More
14 years 6 months ago - 14 years 6 months ago #10 by guerilla
i removed related posts hack code and it still same. so, i guess you've changed something accidently, maybe a code or php signal, i dont know.

i offer try adding this hack to a new view.php file, so if it works move your other mods one by one to it.

good luck...
Last edit: 14 years 6 months ago by guerilla.

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

Time to create page: 0.349 seconds