Jump to content

Download: (SOS31) Similar Topics on Post Screen v1.0.0


Adriano Faria

Recommended Posts

Posted

File Name: (SOS31) Similar Topics on Post Screen v1.0.0
File Submitter: Adriano Faria
File Submitted: 23 Sep 2010
File Category: Hooks and Plugins

This hook will show similar topic titles and descriptions on post screen, after user types the new topic title. You can set forums, groups, number of topics in search results, etc.

Copyright Note

  • This hook is an upgrade of (V88)Similar Topics 1.3 mod, by Vince, from Invision Modding. This upgrade was authorized by Vince.


Click here to download this file
Posted

Hi Adriano,

I installed this today and the install went well, however I went to try it out and tried posting the same exact topic title as one in a forum and it did not pick it up? It does pick up a bunch of other topics but not the exact topic I posted a few hours ago.

I changed all the settings in the "search settings" in the hook but still it wont pick up a recent topic.

Is there something I am overlooking?

Posted

But it must use "full text" search. No?

Full text search on any site with over 1M posts is a huge resource hog.

Not to mention sites that are using InnoDB for their posts and topics tables (no full text search available).

  • 4 weeks later...
Posted

great mod, but please must fix this

if you create topic with only word for example "battle of" it show you topics where is this word uses, like battlefield, battleground. But it must show only topic where is only word "battle" not "battlexxxx". If you will not fix this, this mod is unuseful, becase it show you every topic not only topic with that word.

thanks

Posted

I see your point. But the hook searchs for %STRING%... everything before and after your string is considered. That's how IPB search works. If I change, another user will post: why this didn't search like that ?!?

Anyway, if you want to change it, open hooks/sos31_similartopics_function_***.php and find:

				$gKeywords[] = "LOWER(t.title) LIKE '%{$tmp_key}%'";

Change, for exemple, to:

				$gKeywords[] = "LOWER(t.title) LIKE '{$tmp_key}'";


But I won't change it on hook... I think that's the way it should be.

Posted

Could you add option to enable it for all current and future user groups and all current and future forums? On large forums with categories removed and added regularly it's easy to forget to update these sort of hooks.

Or maybe it would be better that the options chose which forums and user groups to exclude it from? What are your thoughts on this?



But it must use "full text" search. No? Full text search on any site with over 1M posts is a huge resource hog.Not to mention sites that are using InnoDB for their posts and topics tables (no full text search available).




Probably. I dont' use Sphinx on my live board.


We use Sphinx and InnoDB and have more than 1.2 million topics (16 million posts+) how do you think this would affect the resource use there? Could there be added some search limit options in the hook settings to make it use less resources? For example; "Limit the search to X days back in time" (using the "last post/activity date"-field). I'm not in the tech staff and have limited insight in whether these kinds of limitations would lower the resource use or not.
Posted

Could you add option to enable it for all current and future user groups and all current and future forums? On large forums with categories removed and added regularly it's easy to forget to update these sort of hooks.


No 'cause #SHOW_GROUPS# and #SHOW_FORUMS# doesn't allow this kind of thing.

Or maybe it would be better that the options chose which forums and user groups to exclude it from? What are your thoughts on this?


I have others hooks and when I added a setting to EXCLUDE forums, user ALWAYS though that has to be selected, 'cause that's the way IPS and everyone else do, so they are familiarized with it. Example ? http://community.invisionpower.com/files/file/3318-sos31-recent-topics-v200/
The setting says clearly to choose forums to be EXCLUDE! Now, if someone choose all, hook won't work, of course... and thousand of posts or support topic are opened.,


We use Sphinx and InnoDB and have more than 1.2 million topics (16 million posts+) how do you think this would affect the resource use there? Could there be added some search limit options in the hook settings to make it use less resources? For example; "Limit the search to X days back in time" (using the "last post/activity date"-field). I'm not in the tech staff and have limited insight in whether these kinds of limitations would lower the resource use or not.


Never used Sphinx... can't tell you how it's gonna be or can't adapt it for you.
Posted

No 'cause #SHOW_GROUPS# and #SHOW_FORUMS# doesn't allow this kind of thing.


Oh, I thought I've seen some pages in ACP where you can choose a checkbox with it, but this can't be accessed by hooks? I might be incorrect though. ;)


I have others hooks and when I added a setting to EXCLUDE forums, user ALWAYS though that has to be selected, 'cause that's the way IPS and everyone else do, so they are familiarized with it. Example ? http://community.invisionpower.com/files/file/3318-sos31-recent-topics-v200/


The setting says clearly to choose forums to be EXCLUDE! Now, if someone choose all, hook won't work, of course... and thousand of posts or support topic are opened.,


Oh.. Too bad. :/



Never used Sphinx... can't tell you how it's gonna be or can't adapt it for you.


I understand. But is the suggested option for limiting the search something you think you could add?
Posted

I decided to test this during an off-peak time, and I'm happy to report that it does appear to use Sphinx search. As long as you have Sphinx setup, and enabled as the default search. There were no performance issue, and results were very fast. :thumbsup:

Posted

Thanks Adriano ! :)



I only changed this :

				$gKeywords[] = "LOWER(t.title) LIKE '%{$tmp_key}%'";

with this :

				$gKeywords[] = "LOWER(t.title) LIKE '{$tmp_key} %'";

				$gKeywords[] = "LOWER(t.title) LIKE '% {$tmp_key}'";

				$gKeywords[] = "LOWER(t.title) LIKE '% {$tmp_key} %'";

				$gKeywords[] = "LOWER(t.title) LIKE '{$tmp_key}'";



I prefer, but everyone is different and it is not necessary because the hook works perfectly. :D

Posted

Also: it appears that hitting Preview causes an error where you're redirected to the forum index.





Top little hook and idea only issue I'm having with it is the same as the above. Could you fix it please cause it is a great mod :grin: but with the preview post kicking people back to the index it does annoy those who have just written a large post and lost the lot on trying to preview it.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...