PDA

View Full Version : Find Topic: Existing Topics Check


calorie
01-27-2006, 10:00 PM
A permitted port of https://vborg.vbsupport.ru/showthread.php?t=59940


This hack will allow you and your members to check for existing topics, or similar ones, of the thread you plan to create when at newthread.php. This should help to prevent double topics that often appear from newbish members who neglect to use the search feature. It uses the exact functions as the "similar threads" feature, therefore has the same accuracy.

Screenshot: https://vborg.vbsupport.ru/attachment.php?attachmentid=15629

Thanks to Velocd for permitting the port. :up:

Velocd's Signature (https://vborg.vbsupport.ru/member.php?u=9503):

My OpenSource (as in do with them what you want no need to ask for permission) Scripts: 7/25/04 ? Article Bot 1.1, vB3 Member Album 2.0, BB Code Functions, Advanced Search w/Member Conditions, Eggdrop IRC Manager, IRC Manager for mIRC, Existing Topics Check

02 Feb 2006: fixed to prevent Array bit from showing atop the popup display results page
29 Jan 2006: some JavaScript tweaks to get this to work for Turkish and other languages
28 Jan 2006: fixed duplicate JavaScript function name causing Manage Attachments issue
28 Jan 2006: initial release of port

Lizard King
01-28-2006, 10:51 AM
Very nice idea and thanks for porting this hack :)

Edit : Calorie is it possible to change the mouse effect ? some users may not have chance to figure out if the image is a link or not.

calorie
01-28-2006, 11:14 AM
In the Find Topic newthread_form_complete plugin find:

document.findicon.style.cursor = \"default\";

And replace with the following to always have pointer:

document.findicon.style.cursor = \"pointer\";

bashy
01-28-2006, 11:16 AM
Hi

This has taken the option to choose a thread prefix away
If its mandatory to choose a prefix then you cant post the new thread!!

Turn off your product and the prefixes work fine again!

I turned off the thread prefixes....
I submitted a thread identical to another posted and nothing happened
it just posted the new post :(

Any ideas please?

calorie
01-28-2006, 12:04 PM
This mod is for viewing similar threads prior to submitting a new thread. Enter a title and then click the icon to see what it does. For the thread prefixes, see the attached.

Zelda-King
01-28-2006, 12:18 PM
I always liked this feature! :)

bashy
01-28-2006, 12:19 PM
Ah i see now :) I think im gonna make the icon stand out a little better
unless you have any ideas?

Other than that thanks for the updte on the plugin
all is working well now :)

Thanks alot

This mod is for viewing similar threads prior to submitting a new thread. Enter a title and then click the icon to see what it does. For the thread prefixes, see the attached.

Snake
01-28-2006, 12:24 PM
Nice addition to have! :)

bashy
01-28-2006, 12:27 PM
Just a quickie..sorry to be a pain...
How can i add some text just below the icon
saying sommat like "Please check for exsisting topic"
Or perhaps sommat a little short but to that effect?

TIA

klaush
01-28-2006, 12:33 PM
This mod is for viewing similar threads prior to submitting a new thread. Enter a title and then click the icon to see what it does. For the thread prefixes, see the attached.


Mhhh, thanks, but does not work here with the threadprefixes- 3.5.3.

Any idea?

bashy
01-28-2006, 12:45 PM
read post #5 ;)

Mhhh, thanks, but does not work here with the threadprefixes- 3.5.3.

Any idea?

bashy
01-28-2006, 01:08 PM
Help....

My manage attchments button now shows similar threads pmsl
oh well, all was fine :)

Whats ya thoughts calorie?

Zelda-King
01-28-2006, 04:11 PM
Manage Attachments issue confirmed.

GlitterKill
01-28-2006, 04:12 PM
Very nice! Installed. :)

Is there a way to change number of results when listing the threads? I would like it to show 10 instead of 5. Thanks for the nice hack!

bashy
01-28-2006, 04:20 PM
You change this in the findtopic.php that you uploaded

// ######################### SET LIMIT NUMBER ############################
$limit = 5; // Represents the max results to show.

I presume, i aint no coder thats for sure :nervous:

Very nice! Installed. :)

Is there a way to change number of results when listing the threads? I would like it to show 10 instead of 5. Thanks for the nice hack!

calorie
01-28-2006, 04:23 PM
FYI: fixed duplicate JavaScript function name causing Manage Attachments issue

Re-install the XML product, allowing overwrite, and if you're using 'thread prefixes' reapply the change.

To add text by the icon, look for ft_search_for_existing_topics in the Find Topic newthread_form_complete plugin.

GlitterKill
01-28-2006, 04:24 PM
Outstanding! Thanks for the quick response and the time saving hack. :)

EDIT // I changed that number to 10 in the file but it still shows only 5.

bashy
01-28-2006, 04:46 PM
Nice 1 calorie...Well done

I have not found any more issues with regards to this hack, all is working well thanks you!

GlitterKill
01-28-2006, 05:03 PM
Were you able to change the results number?

calorie
01-28-2006, 05:11 PM
Thanks for the thanks. :)

Five is the max you can get unless you go edit the fetch_similar_threads function in the /forum/includes/functions_search.php file and replace LIMIT 5 with LIMIT 10 (two spots inside the function) and then use $limit = 10; in the findtopic.php file.

Without the two edits to the fetch_similar_threads function in the functions_search.php file, $limit is good for zero to five. Anything less than zero would break the query, and without file edits anything over five gets ignored.

GlitterKill
01-28-2006, 05:26 PM
Works like a charm with 10 now. You rock. :)

klaush
01-28-2006, 05:39 PM
Yep! Thanks! Works without trouble on 3.5.3!

bashy
01-28-2006, 05:53 PM
I spose i was half way there lol
Like i said i aint no coder :ermm:

Cheers calorie for putting me right, works like a dream now :)

QUOTE=calorie]Thanks for the thanks. :)

Five is the max you can get unless you go edit the fetch_similar_threads function in the /forum/includes/functions_search.php file and replace LIMIT 5 with LIMIT 10 (two spots inside the function) and then use $limit = 10; in the findtopic.php file.

Without the two edits to the fetch_similar_threads function in the functions_search.php file, $limit is good for zero to five. Anything less than zero would break the query, and without file edits anything over five gets ignored.[/QUOTE]

Zachariah
01-28-2006, 06:01 PM
Thanks Calorie.
- I used this back in 3.0

:cool:

They still sell TAB ?
- Not seen any around where I live for years.

silurius
01-28-2006, 06:55 PM
Beautiful! Thanks again, calorie (& Velocd).

lazyseller
01-28-2006, 07:24 PM
Wow awesome mod.... your are the man calorie!!! this has to be one of my favorites so far...

pauloo
01-28-2006, 09:31 PM
Thank you !
i like very well your hack ;)

COBRAws
01-28-2006, 09:39 PM
What about making this an AJAX hack? I mean, there is one already for when our visitors try to register and shows if the username is being used.
In this case it would check some of the words being written on the title and seek for similar existing titles.

Nice huh?

KOKS@LN
01-29-2006, 08:35 AM
Hi calorie, thanks for the plugin.

Just installed on a vB 3.5.3 board. Working with a little problem.
If any Turkish character is typed in the subject field, it opens an HTTP 406 Error page. Can it be sorted out?

calorie
01-29-2006, 12:56 PM
FYI: some JavaScript tweaks to get this to work for Turkish and other languages

Re-install the XML product, allowing overwrite, and if you're using 'thread prefixes' reapply the change.

Tulsa
01-29-2006, 01:28 PM
Wonderful hack! :) Thanks.

Now I am a bit code challenged. I found where you suggest to add the text but I'm not at all sure how to go about doing it?

Any help would be greatly appreciated.

To be more precise, I'm wanting the text to sit next to the icon so they don't have to mouse over to see it. At attention getter as it were.

calorie
01-29-2006, 01:51 PM
After you install go to vB ACP -> Plugin System -> Plugin Manager -> look for Find Topic -> click Edit -> find the following:

<td><img name=\"findicon\" src=\"" . $stylevar['imgdir_button'] . "/findicon_off.gif\" alt=\"" . $vbphrase['ft_search_for_existing_topics'] . "\" onClick=\"ft_popWindow()\" /></td>

Replace with the following:

<td><img name=\"findicon\" src=\"" . $stylevar['imgdir_button'] . "/findicon_off.gif\" alt=\"" . $vbphrase['ft_search_for_existing_topics'] . "\" onClick=\"ft_popWindow()\" />" . $vbphrase['ft_search_for_existing_topics'] . "</td>

Tulsa
01-29-2006, 02:29 PM
Thank you very much. Worked like a charm. I also got to learn something new today about phrases since I wanted the text to be different. You provided me with what I needed to learn it though. :)

Mastar
01-29-2006, 07:47 PM
Hey Calorie the hack I love and is enterferring wid the attachment upload in vb? When manage attachment is clicked it starts searching for similar topics.

Any suggestions?

bashy
01-29-2006, 08:20 PM
The fix is in the thread,.... #16

KOKS@LN
01-30-2006, 12:24 PM
FYI: some JavaScript tweaks to get this to work for Turkish and other languages

Re-install the XML product, allowing overwrite, and if you're using 'thread prefixes' reapply the change.

Already done, even tried uninstalling and reinstalling. It still gives an HTTP 406 error when we type Turkish characters :ermm:

BTW, Thread prefix isn't installed.

Lizard King
01-30-2006, 12:26 PM
Already done, even tried uninstalling and reinstalling. It still gives an HTTP 406 error when we type Turkish characters :ermm:

BTW, Thread prefix isn't installed.

It works for me with Turkish characters since the beginning ;) Maybe there is a problem with your character set.

calorie
01-31-2006, 08:36 AM
The JavaScript escape() was replaced with the vB JavaScript PHP.urlencode() in case that was an issue, but a 406 error is a client-side thing, meaning basically that the server cannot send the requested page back to the browser because the browser thinks the page is not acceptable.

See http://www.checkupdown.com/status/E406.html and http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.

IrPr
01-31-2006, 09:39 AM
installed and works fine !
but see included screenshot,
whats ARRAY at the top?

calorie
02-02-2006, 05:45 PM
FYI: fixed to prevent Array bit from showing atop the popup display results page

FTP the findtopic.php file, overwriting the old file, to upgrade

stinger2
02-03-2006, 11:36 AM
EXACTLY what i was looking for...........many thanks for this great hack..

me clicks install

IrPr
02-06-2006, 09:43 AM
FYI: fixed to prevent Array bit from showing atop the popup display results page

FTP the findtopic.php file, overwriting the old file, to upgrade

merC Calorie ;) UPDATED!

Valter
02-06-2006, 10:11 PM
Can we change that it lists all threads which will we have when advanced search is used with "Search Titles Only"?

http://img212.imageshack.us/img212/7075/searchtitles9ri.gif

Thanks

djr
02-08-2006, 08:08 PM
Excellent product! Thanks Calorie for porting this to 3.5 and Velo for the original hack :D Clicked Install :)

djr
02-09-2006, 12:16 AM
I felt the need to make some enhancements to this product. I hope they're of use for others. I upped the version number to 2.0.0 and made the following changes:

*CHANGE*: Cursor always displayed as pointer, as requested here (https://vborg.vbsupport.ru/showpost.php?p=884367&postcount=2) and changed by Calorie here (https://vborg.vbsupport.ru/showpost.php?p=884367&postcount=3)
*CHANGE*: Added 'align=middle' to 'Search similar topics' image
*CHANGE*: Explanation (for better attention) next to search icon as requested here (https://vborg.vbsupport.ru/showpost.php?p=885182&postcount=31) and changed by Calorie here (https://vborg.vbsupport.ru/showpost.php?p=885182&postcount=32)
*NEW*: Point users to the search function as the Similar Thread function is limited and doesn't always list the right threads. This hopefully prevents users posting the same topic again as they might think the topic hasn't be discussed yet (since it wasn't listed in the Similar Threads popup)
*NEW*: Clicking the search link (in the popup) will close the popup and automatically searches your forum with users' topic title.
Steps for upgrading:

Upload attached exclamation.gif to <your_forum_path>/images/misc/
In AdminCP choose Plugin System > Add/Import Product > Upload attached xml > Allow Overwrite: Yes > Click Import
Don't forget to translate your phrases again! (search for ft_ as variable name)
Have fun!

Valter
02-11-2006, 02:38 AM
*NEW*: Point users to the search function as the Similar Thread function is limited and doesn't always list the right threads. This hopefully prevents users posting the same topic again as they might think the topic hasn't be discussed yet (since it wasn't listed in the Similar Threads popup)
*NEW*: Clicking the search link (in the popup) will close the popup and automatically searches your forum with users' topic title.
Nice work djr

What about idea that we have search results listed in the first window? Same window, same table, but with right threads. Why to use Similar Threads function? It's very limited.

djr
02-11-2006, 12:54 PM
That doesn't make much sense, because a) the popup window would be huge if you have alot of search results or b) you limit the search results to 10 forcing the user to click alot. My modification offers you the best of both worlds, since it redirects to the search with the topic as search query, and it will search titles *and* content.

But feel free to modify as you wish :)

Sc0rian
02-18-2006, 08:17 PM
i want to show similar threads in showthread.php...

Ben

calorie
02-18-2006, 08:24 PM
vBulletin Options -> Thread Display Options (showthread) -> Show Similar Threads?

Valter
02-18-2006, 11:19 PM
That doesn't make much sense, because

a) the popup window would be huge if you have alot of search results
No, it will not. It will be completely the same, just with vertical scroller.

or b) you limit the search results to 10 forcing the user to click alot. My modification offers you the best of both worlds, since it redirects to the search with the topic as search query, and it will search titles *and* content.
Too much clicking.

djr
02-19-2006, 12:08 AM
No, it will not. It will be completely the same, just with vertical scroller.Too much clicking.But feel free to modify as you wish :)
'Nuff said ;)

Sc0rian
02-19-2006, 07:58 AM
vBulletin Options -> Thread Display Options (showthread) -> Show Similar Threads?


yup its ticked...

and Automatic Similar Thread Search is on.

Omranic
02-19-2006, 07:07 PM
works grea for english caracters but when searching on any existing arabic word it says that nothing matched

how can I fix this knowing that our forums has arabic as the first default & principal language

GlitterKill
02-23-2006, 02:16 PM
This ok for VB 3.54?

pauloo
03-04-2006, 09:42 PM
yes ;)

Josh1
03-08-2006, 07:02 PM
Works VERY well, thankyou!

cscgal
05-03-2006, 10:06 PM
I would love if someone could get this to work with AJAX so that it populates the similar threads listing inline as a title is typed in.

Boofo
05-18-2006, 02:23 PM
If anyone is interested, I just added the ability that when you start typing the thread title, the icon appears active and will go inactive again upon change (i.e. preview) as the tweak in Velocd's earlier version did.

hypnoticpimp
06-01-2006, 02:02 AM
im intersted

bki
06-25-2006, 01:26 PM
I love this one, any chance that it will work in vBulletin v3.6 ?

Total666
07-01-2006, 03:41 AM
See that attached pic .. Total

caliman
07-21-2006, 04:21 AM
Neither the original mod or the djr version work for me. Both just reload my index page in the popup window. I do have vBseo. I don't know if this is causing it.

silurius
09-19-2006, 05:30 PM
I love this one, any chance that it will work in vBulletin v3.6 ?I'm wondering also.

spoiey
09-20-2006, 12:26 AM
When Can we get this in Ajax :)?

nymyth
09-29-2006, 11:22 PM
^^for real, been waiting for this....

Peace

COBRAws
03-12-2007, 12:07 AM
any update for 3.6?

testebr
03-26-2007, 06:20 AM
work fine with 3.6.x here

c.c.
03-16-2009, 06:55 PM
Will this work with 3.8.1?