• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Check for similar thread before posting a new one 1.0

No permission to download

vinavb

Active member
#1
vinavb submitted a new resource:

Check for similar thread before posting a new one (version 1.0) - Check for similar thread before posting a new one

Features:
- indicated if you already subscribed to one or more similar threads
- hover over the title and it gives a little preview of the thread's content
- no edits whatsoever needed, just import the product file, enable the Add-on and it works (well, it should )
- it can be translated
- don't it anymore? Remove the product and you'll never see that...
Read more about this resource...
 

Rob

Well-known member
#3
I'm just reading the mod features and Im puzzled.
Does this only show threads you are already subscribed to that are similar? If so, then this is not quite as useful as I thought it was going to be.

I hope that it also shows similar threads I am not subscribed to?
 

Rob

Well-known member
#5
I dont want to try it unless it shows me all similar threads - that is threads im subscribed to AND threads im not. I dont see the point in only showing subscribed threads.
 

gldtn

Well-known member
#7
vinavb,

Can you please phrase your add-on so it's easier for us to translate? There are two hard coded phrase in the check_similar_threads template

Also; "hover over the title and it gives a little preview of the thread's content" doesn't seem to be working here on my end, tested both on firefox and chrome.
 

Paul

Well-known member
#8
Seems to work fine for me. Does it work with user permissions (i.e. can users only see threads from the forums they have access to??)
 

Marcus

Well-known member
#9
This is a very important addon! Thanks for sharing your great product. There are two suggestions:

1. It currently does not work not on my xenforo enhanced search forum.

2. Currently it adds the required javascript to all forum pages, not only the thread create page where it is needed. Quick Fix: Replace in Listener.php
PHP:
if($templateName=='thread_create')
{
$content = str_replace('data-previewUrl', 'id="checkST" data-previewUrl', $content);
$content = str_replace('<dl class="ctrlUnit fullWidth">', '<dl class="ctrlUnit fullWidth" id="checkST-result"></dl><dl class="ctrlUnit fullWidth"><script type="text/javascript" src="js/xenforo/check.js"></script>', $content);
}
/* if ($templateName=='PAGE_CONTAINER')
{
$content = str_replace('<!--XenForo_Require:JS-->', '<script type="text/javascript" src="js/xenforo/check.js"></script>'."\n<!--XenForo_Require:JS-->", $content);
}
*/
 

Rob

Well-known member
#10
There appears to be a little language barrier with the mod creator so, does anyone know if this shows all similar threads or only those you are subscribed to (it kinda alludes to that in the description). I am trying to understand before I actually install this.
 

Veer

Well-known member
#11
There appears to be a little language barrier with the mod creator so, does anyone know if this shows all similar threads or only those you are subscribed to (it kinda alludes to that in the description). I am trying to understand before I actually install this.
I tested it on localhost and it shows all similar threads, and it seems that it do nothing with subscribed or not subscribed.
 

Kent

Active member
#15
This mod appears to display threads the user doesn't have access to, though only the title (and ID) of the threads are exposed.
 
#17
This mod appears to display threads the user doesn't have access to, though only the title (and ID) of the threads are exposed.
Haha, well that's no good... we'll have to figure out a fix for that.

Here's a quick fix for excluding forum nodes from the results.
Edit the library/Check/Main.php file with the metadata changes below.
Change the number for each _md_node_10 and add additional rows if desired.
PHP:
            $threads = $db->fetchAll("
                SELECT search_index.content_id AS thread_id, search_index.title,
                thread.user_id, thread.username, thread.node_id, forum.title AS ftitle,
                MATCH(search_index.title) AGAINST ('$safetitle' IN BOOLEAN MODE) AS score
                FROM xf_search_index AS search_index
                INNER JOIN xf_thread AS thread ON (thread.thread_id=search_index.content_id)
                INNER JOIN xf_node AS forum ON (forum.node_id=thread.node_id)
                WHERE MATCH(search_index.title) AGAINST ('$safetitle' IN BOOLEAN MODE)
                AND search_index.metadata NOT LIKE '%_md_node_10%'
                AND search_index.metadata NOT LIKE '%_md_node_11%'
                AND search_index.content_type='thread' HAVING score >= 1
                ORDER BY search_index.content_id DESC
                LIMIT {$options->checkst_max_results}
            ");
 

Veer

Well-known member
#19
thank you all for feedback, this add-on now just work only with forum without enhanced search. Also, it *only* check the similar thread title, whether or not subscribed, I will add option to choose filter subscribed or not.

Special thanks to Wulfspider for your fix, I will update it into next version.
I don't think there's a need of the option to check subscribed/watched threads, instead you can add option to check "Users own created threads". Otherwise it is fine as it work now. :)