Subject Check Suggestion
-----
| Author | Message | |
|---|---|---|
|
JaCk |
||
| Fri Mar 23, 2007 8:24 am Post subject: Subject Check Suggestion | ||
|
I've seen this a few days ago and installed it. While i really liked the idea of it, there is something i'd like to suggest.
Is it possible that it's made so that it matches the exact keywords in the subject line? For example, let's say i make this post. Then, another user comes along and wants to post one that says "Poster Status Check". A message will come up showing my post as a suggestion. Now that could not be a problem with a small forum, but with a big one, u'll get hundreds of suggestions. What i hope for, is an option that sets it so that it'd only bring up those posts with the exact subject line "Subject Check Suggestion". Thanks for the great work Thoul...keep'em coming. |
||
|
Thoul |
||
| Fri Mar 23, 2007 9:53 pm Post subject: Re: Subject Check Suggestion | ||
|
That could certainly be done. It would really be easier than the current behavior of searching for the individual words. Thanks for the great suggestion, I'll definitely work that into the next version of this mod.
|
||
|
JaCk |
||
| Sat Mar 24, 2007 5:00 pm Post subject: Re: Subject Check Suggestion | ||
|
That would be great...thank u Thoul..and good luck with the next version and the other projects.
|
||
|
nosorry |
||
| Mon Apr 28, 2008 4:38 pm Post subject: Re: Subject Check Suggestion | ||
|
Here is a mod I would like some help implementing to the subject search to make it more accurate. If you could help out it would be great.
Code: #################################################################
## Mod Title: Search Topic Title Only ## Mod Version: 1.0.1 ## Author: Acyd Burn < acyd.burn@gmx.de > - Meik Sievertsen - http://www.opentools.de ## Description: ## This Mod will allow to search for an Topic Title only (adds a third option to the search page) ## (only one language variable to add) ## Tested with phpBB 2.0.2 ## ## Revision History: ## ## 2002-09-24 - 1.0.1 - fixed bug with not displaying any lang variable... sorry guys. :( ## 2002-09-15 - initial version 1.0.0 ## ## Installation Level: easy ## Installation Time: 5-10 Minutes ## Files To Edit: search.php, templates/subSilver/search_body.tpl, lang_main.php ## Included Files: 0 ## ############################################################## ## This MOD is released under the GPL License. ############################################################## ## Please Check: http://www.opentools.de/board for the latest version of this MOD. ## ## For Security Purposes: ## If you want to add this Mod into ANY Mods/Hacks Database, please ask me before you do so. ## If anyone ask me if it's safe to use, i will have a list of sites where it's available/downloadable from. ## As an additional service, i will inform those sites when a new Version comes out. ## ## Please Note that you get NO support on http://www.phpbb.com if the Mod is not listed on their ## MOD-Database. ## ## Please Note that you get FULL support on http://www.opentools.de and http://www.phpbbhacks.com from ## me (the Mod Author). ## On http://www.phpbbhacks.com you will get full support for all Mods out there. ## ################################################################# ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################# # #-----[ OPEN ]--------------------------------------------- # language/lang_english/lang_main.php # #-----[ FIND ]--------------------------------------------- # at the very end // // That's all Folks! # #-----[ BEFORE, ADD ]-------------------------------------- # $lang['Search_title_only'] = 'Search topic title only'; # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/search_body.tpl # #-----[ FIND ]--------------------------------------------- # around line 31 <td class="row2" valign="middle"><span class="genmed"><select class="post" name="search_time">{S_TIME_OPTIONS}</select><br /><input type="radio" name="search_fields" value="all" checked="checked" /> {L_SEARCH_MESSAGE_TITLE}<br /><input type="radio" name="search_fields" value="msgonly" /> {L_SEARCH_MESSAGE_ONLY}</span></td> # #-----[ REPLACE WITH ]--------------------------------------- # <td class="row2" valign="middle"><span class="genmed"><select class="post" name="search_time">{S_TIME_OPTIONS}</select><br /><input type="radio" name="search_fields" value="all" checked="checked" /> {L_SEARCH_MESSAGE_TITLE}<br /><input type="radio" name="search_fields" value="msgonly" /> {L_SEARCH_MESSAGE_ONLY}<br /><input type="radio" name="search_fields" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</span></td> # #-----[ OPEN ]--------------------------------------------- # search.php # #-----[ FIND ]--------------------------------------------- # around line 84 $search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : 0; # #-----[ REPLACE WITH ]--------------------------------------- # $search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : ( ( $HTTP_POST_VARS['search_fields'] == 'msgonly' ) ? 0 : 2 ); # #-----[ FIND ]--------------------------------------------- # around line 278 $sql = "SELECT m.post_id FROM " . SEARCH_WORD_TABLE . " w, " . SEARCH_MATCH_TABLE . " m WHERE w.word_text LIKE '$match_word' AND m.word_id = w.word_id AND w.word_common <> 1 $search_msg_only"; # #-----[ REPLACE WITH ]------------------------------------------ # $search_match = ( $search_fields == 0 ) ? "w.word_text LIKE '$match_word' AND m.title_match = 0" : ( ( $search_fields == 1) ? "w.word_text LIKE '$match_word'" : "w.word_text LIKE '$match_word' AND m.title_match = 1" ); $sql = "SELECT m.post_id FROM " . SEARCH_WORD_TABLE . " w, " . SEARCH_MATCH_TABLE . " m WHERE " . $search_match . " AND m.word_id = w.word_id AND w.word_common <> 1"; # #-----[ FIND ]--------------------------------------------- # around line 288 $search_msg_only = ( $search_fields ) ? "OR post_subject LIKE '$match_word'" : ''; $sql = "SELECT post_id FROM " . POSTS_TEXT_TABLE . " WHERE post_text LIKE '$match_word' $search_msg_only"; # #-----[ REPLACE WITH ]-------------------------------------- # $search_match = ( $search_fields == 0 ) ? "post_text LIKE '$match_word'" : ( ( $search_fields == 1) ? "post_text LIKE '$match_word' OR post_subject LIKE '$match_word'" : "post_subject LIKE '$match_word'" ); $sql = "SELECT post_id FROM " . POSTS_TEXT_TABLE . " WHERE " . $search_match; # #-----[ FIND ]--------------------------------------------- # around line 1341 'L_SEARCH_MESSAGE_ONLY' => $lang['Search_msg_only'], # #-----[ AFTER, ADD ]-------------------------------------- # 'L_SEARCH_TITLE_ONLY' => $lang['Search_title_only'], # EOM |
||
Page 1 of 1