![]() |
|
|||||||
| General Discussions General vBulletin discussions. ie. "How do I do this in vBulletin?", "Can this product do this?", "What does this feature do?", etc. |
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
Floren, see this modification for vBulletin?
http://www.vbulletin.org/forum/showthread.php?p=1711430 It's VERY useful for helping our members to avoid posting similar threads but only IF the similar thread search brings up the best results. It currently uses jquery and the results are not brilliant. Is there any way we can get it to use Searchlight to return better results, please?
__________________
Stuart Wright, http://www.AVForums.com |
|
#2
|
|||
|
|||
|
I plan to write a product like that, once I'm done with the current project I work on.
Unfortunately, I cannot see the link but I presume that it will show you similar threads before you post one.
__________________
Floren Munteanu Axivo Inc. Please use the Requests Tracker, for sensitive data questions. |
|
#3
|
|||
|
|||
|
This hack works pretty well. Just go to start a new thread, type something into the title text box and then lose focus from it.
Ajax shows a box similar to the standard similar threads box. The query being used is: Code:
$thread['similar'] = fetch_similar_threads($vbulletin->GPC['title']);
if ($vbulletin->options['similarthreadcheckactive'] == '1' AND $thread['similar'])
{
// don't show similar threads from coventry
if ($coventry = fetch_coventry('string'))
{
$globalignore = "AND thread.postuserid NOT IN ($coventry)";
}
else
{
$globalignore = '';
}
$hook_query_fields = $hook_query_joins = $hook_query_where = '';
$simthrds = $db->query_read_slave("
SELECT thread.threadid, thread.forumid, thread.title, postusername, postuserid, thread.lastpost, thread.replycount, forum.title AS forumtitle
" . iif($vbulletin->options['threadpreview'], ",post.pagetext AS preview") . "
" . iif($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid'], ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed") . "
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
INNER JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
" . iif($vbulletin->options['threadpreview'], "LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)") . "
" . iif($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid'], " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = " . $vbulletin->userinfo['userid'] . " AND canview = 1)") . "
$hook_query_joins
WHERE thread.threadid IN ($thread[similar]) AND thread.visible = 1
" . iif (($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']) OR can_moderate($forumid), '', "AND forum.password = ''") . "
$globalignore
$hook_query_where
ORDER BY lastpost DESC
");
fetch_similar_threads() is a function in the functions_search.php script which we have been using every time someone views a thread, so it would be a huge advantage in both performance and the quality of the results to put this through Searchlight. I appreciate you are busy Floren and your implementation of this idea might be much nicer (I expect you might have a pop-up box like with the contextual search), but for the moment, is there a quick fix you can help me with to use Seachlight to perform the similar_threads query please? Thanks
__________________
Stuart Wright, http://www.AVForums.com |
|
#4
|
|||
|
|||
|
Ya, I want it to work like the current search keywords.
It will pop a dropdown list (like Google), the only difference is that it will make the line go directly to the thread. In this way the overall design is nicer. I saw it in action at precentral.net and I did not like the fact that is shifts everything below, forcing users to lose focus on what they are typing. Obviously, it will be way faster with Searchlight. Right now, it takes a while until it pops the results. By the time you finished the thread title, you start writing the message and BAM... the screen is shifted way below because the added table. As a side note, all fetch_similar_threads() related search queries are processed by Searchlight.
__________________
Floren Munteanu Axivo Inc. Please use the Requests Tracker, for sensitive data questions. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question about the Searchlight product | hornstar | Pre-Sale Inquiries | 4 | 03-27-2010 01:34 AM |