PDA

View Full Version : Similar threads - how to improve ?


mario1973
03-14-2015, 09:32 AM
I would like to modify the code similar threads. I would like to add another condition.
I intend to in this section have been shown only threads that contain more than one post. Is it possible?

kh99
03-14-2015, 09:54 AM
I think this should work: create a plugin using hook search_similarthreads_fulltext and code like this:
$hook_query_where .= ' AND thread.replycount > 0 ';


but I didn't actually test it, because I can never get similar threads to show up on my test forum and I never get around to figuring out why.

mario1973
03-15-2015, 11:46 AM
Thank you very much .
I do not know on creating plugins so I made corrections ' AND thread.replycount > 0 ' in showthread.php section : get similar threads
And can tell you how to make a plugin?

kh99
03-15-2015, 11:59 AM
Well, if you're going to add it to the code instead of making a plugin (which is easy, if you want to try), then it should go in includes/functions_search.php. That is if you want all the similar threads to have more than one post.

But if you meant that you only want to have a similar threads section displayed on threads that have more than one post, then you probably would do that in showthread.php.