Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: ioszilla on August 12, 2007, 05:53:15 PM

Title: Search Enhancement Mod
Post by: ioszilla on August 12, 2007, 05:53:15 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=887)

SMF Search Enhancement Mod

Note: ver 1.1.6 (and later) fixes a major bug from the *official* SMF 1.1.3, 1.1.4 search function that is very likely to immensely disrupt search results. The bug affects all forum owners without mysql privilege to CREATE TEMPORARY TABLES - regardless of whether a previous version of this mod was installed.


Overview

DC SMF Search is a mod to the existing smf forum search function. In addition to a list of enhancements and new features, it also fixes a few bugs in smf official 1.1.3 search function.

For illustrated demo, visit: http://www.donationcoder.com/Forums/bb/index.php?topic=9434.0


Features

1. Significant reduction of missing results (now very rare)
2. Less noise and therefore reasonably better relevance
3. Hugely improved ranking algorithm (when using FullText index)
4. Enhanced phrase search
5. Intelligent handling for '(apostrophe), .(period), and –(dash)
6. Supports short keywords (3 characters or less)
7. Supports stopwords (clichés)
8. Active board ranking heuristic (based on mouser's suggestion)
9. Expand/foldable result summary
10. Viewing all matching posts in a topic with one click
11. Ability to sort search results live
12. Quick dropdown search box


IMPORTANT CONFIGURATION INFO

Works best with Search Settings (in admin panel):

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked
4. Maximum results to show: 0  (0: no limit)

Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 12, 2007, 07:00:50 PM
As mentioned above, plz make sure you configure your search in Admin panel as shown below -- in order for this mod to search fast and best rank results:

(http://www.mrmouser.com/img/dcsmf/setting1.png)

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked

(http://www.mrmouser.com/img/dcsmf/setting2.png)

4. Set "Maximum results to show" to 0
Title: Re: SMF Search Enhancement Mod
Post by: karlbenson on August 12, 2007, 07:08:24 PM
is this alot more server intensive than the standard smf one?
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 12, 2007, 07:24:59 PM
Quote from: karlbenson on August 12, 2007, 07:08:24 PM
is this alot more server intensive than the standard smf one?

We have been using it on our own forum (http://www.donationcoder.com/Forums/bb/index.php, SMF 1.1.3) for over a month (since July 4th), and so far we haven't experienced any performance problem -- some members even told me the new search was faster. Before this mod,  our search utilized SMF custom index.

I'm confident that this mod won't stress your server. Feel free to do some searches on our forum (70,000+ posts) and see how it performs. :)
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 08:59:30 AM
it would be so cool if we can choose an engine (Google / Yahoo / or customised ) for the search on the entire site.
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 09:15:07 AM
Quote from: Eleglin on August 13, 2007, 08:59:30 AM
it would be so cool if we can choose an engine (Google / Yahoo / or customised ) for the search on the entire site.

* /me despises all non-Google search engines ;)


Just kidding. It's a good idea actually.

For now you can edit Sources/Search.php after installation of this mod, just find:

Quotefunction QueryPreProcess ()
{
   global $scripturl;
   
   $Redirects = array(
      'members' => $scripturl . '?action=mlist;sa=search;fields=name,email;search=',
      // Google Site Search
      'entiresite' => 'http://www.google.com/search?domains=' . $_SERVER['HTTP_HOST']. '&sitesearch=' . $_SERVER['HTTP_HOST'] . '&q='
   );
   
   foreach ($Redirects as $redirect => $url)
      if (isset($_REQUEST['search_selection']) && $_REQUEST['search_selection'] == $redirect)
      {
         header('Location: ' . $url . urlencode($_REQUEST['search']));
         exit;   
      }
}


Change the search engine here:
Quote'entiresite' => 'http://www.google.com/search?domains=' . $_SERVER['HTTP_HOST']. '&sitesearch='
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 09:34:17 AM
I have a limited place on my server.
The size of my database (for messages) is 16272.43 Ko. (without index )

Does it make a very huger database ?
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 09:38:03 AM
It does not modify your smf database AT ALL and it will not write custom data to your server anywhere. :) It's works in 100% 'READ-ONLY mode'.
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 09:44:54 AM
oh ! There seems to be some javascript errors on the results pages of your forums ?
Especially when I click on hide/show result summary.
I use Firebug and Web developper :-)
These are mods for Firefox ;)
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 09:59:40 AM
Yup. There was a javascript bug in the template (undefined function). Fixed and uploaded. Please uninstall version 1.1.2 of this mod (which is what you have) and install latest version 1.1.3:  http://custom.simplemachines.org/mods/index.php?mod=887

Thanks!! :D
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 10:08:19 AM
I'm proud of this mod not because it's so 'feature-rich' :P, but because I believe it addresses two most annoying problems that have been haunting SMF search, making it a pain to use:

1. Relevance ranking

A search function is basically a failure if most relevant topics are not shown in results page 1 and 2 - on a big forum nobody sane would browse 10+ pages to find what he wanted. With this search mod, you have most relevant results on the first page and very few missing results, period.

If you administer an smf forum with more than 50,000 posts, you know what I am talking about -- SMF search ranking sucks :)


2. Missing results

Needless to elaborate on this. :P


<shameless plug>
To see some feedback on our forum for this search, visit:
http://www.donationcoder.com/Forums/bb/index.php?action=search2;search=zillarank (http://www.donationcoder.com/Forums/bb/index.php?action=search2;search=zillarank)

Note their opinions are not necessarily unbiased but I really believe they are enjoying smf search now. :)
</shameless plug>
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 10:09:17 AM
I have a last question
*Please don't hurt me*

Can we use it on the forum AND on the site ?
My forum and my site will have the same header.
What should I add on the header in order to use and choose the search engine ?

Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 10:12:31 AM
Hmm could u give me the url to your forum so I can better give u instructions? Thanks. :)



EDIT: solved via PM
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 11:15:27 AM
If you are in need of a guide to search features specific to this enhancement mod, please free to link to, copy, or adapt this topic in any way you see fit:  8)

A Practical Guide to DonationCoder.com Forum Search (http://www.donationcoder.com/Forums/bb/index.php?topic=9434.0)
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 12:16:19 PM
French translation :

<file name="$languagedir/Modifications.french.php">
<operation>
<search position="end" />
<add><![CDATA[
//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'ID d\'un topic spécifique';
$txt['search_match_mode'] = 'Mode de correspondance';
$txt['search_match_mode_whole'] = 'Correspondre à tous les mots - strict';
$txt['search_match_mode_smart'] = 'Correspondre à tous les éléments - large';
$txt['search_match_mode_any'] = 'Correspondre à n\'importe quel élément';

$txt['search_numReplies'] = 'Réponses';
$txt['search_match_mode_whole_short'] = 'Correspondre à tous les mots';
$txt['search_match_mode_smart_short'] = 'Correspondre à tous les éléments';
$txt['search_match_mode_any_short'] = 'Correspondre à n\'importe quel élément';

$txt['result_summary'] = 'Montrer/cacher le détail des résultats';

$txt['result_generated'] = 'Résultats générés par';
$txt['zillarank'] = 'ZillaRank';

$txt['search_entireforum'] = 'dans tout le forum';
$txt['search_thisbrd'] = 'dans cette section';
$txt['search_thistopic'] = 'dans ce fil';
$txt['search_members'] = 'parmi les membres';
$txt['search_entiresite'] = 'dans tout le site';
//END DC SMF Search Text Strings
]]></add>
</operation>
</file>


<file name="$themedir/languages/Errors.french.php" error="ignore">
<operation error="ignore">
<search position="end" />
<add><![CDATA[
$txt['error_search_string_small_words'] = 'Chaque terme doit comprendre au moins deux caractères.';]]></add>
</operation>
</file>
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 12:36:44 PM
Wow thanks a lot Eleglin!!

New version 1.1.4 uploaded, with French language support. :D :D :D
Title: Re: SMF Search Enhancement Mod
Post by: shadow82x on August 13, 2007, 01:05:07 PM
wordzilla this is a great mod thank you. I have a suggestion: Lets say you open up a board and the quick search at the top still says search the entire board I think it should auto adjust to "board" or "topic" when you enter it. I love your mod as if you did not know. :P
Title: Re: SMF Search Enhancement Mod
Post by: christicehurst on August 13, 2007, 01:44:22 PM
Great mod, no problems at all. People will snap this mod up fast!
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 01:45:08 PM
Thanks shadow82x, glad you like it. :) I see it's working well on your forum.

QuoteLets say you open up a board and the quick search at the top still says search the entire board I think it should auto adjust to "board" or "topic" when you enter it.

You have been infected by SMF 2.0 virus! ;) I believe SMF 2.0 does the auto-adjustment to only reduce avg server load -- limiting the search to single board or topic reduces db operations greatly. For a leviathan forum like SMF, it's a reasonable compromise.

But do your members/visitors really want to limit the search to single board/topic every time they are browsing a board/topic? I doubt it. For me, I almost never limit my search and I found it extremely annoying having to manually go back to 'forum index' to search entire forum - every time I'm browsing a board/topic!


Note: the search mod automatically ranks higher the matching topics that are within the board you are currently viewing, thus it won't matter much if you search the specific board or entire forum - most likely you will be more interested in relevant topics within the board you are currently browsing, as such we give "local" matching topics an edge over others to catch you eye. :)
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 01:45:55 PM
 No more errors with javascript, that's pretty cool !  :P

I should verify translation, be patient please
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 01:55:42 PM
Eleglin, it doesn't matter at all. And thanks for your translation :)
Title: Re: SMF Search Enhancement Mod
Post by: Kirsten07734 on August 13, 2007, 02:01:45 PM
WOW!!!

I've wanted something like this for a very long time.  I hope they incorporate it in future releases of SMF.

I've installed it on my test forum without problem and LOVE it.  Now I'm off to see what my live forum thinks of it.

Thanks so much!!!
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 02:04:39 PM
Don't understand WHY there are two menus.
These are the classical menu + your menu.
Can we delete the classical one ?
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 02:09:36 PM
Quote from: Eleglin on August 13, 2007, 02:04:39 PM
Don't understand WHY there are two menus.
These are the classical menu + your menu.
Can we delete the classical one ?

classical menu? my menu? Could you explain more plz? Thanks. :)
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 02:12:29 PM
@ christicehurst:

I just visited your forum: http://www.writersmuster.com/ and I see quick search box is not working there (because you are not using the default smf theme)

I'll post instructions to manually modify your custom theme momentarily so you'll have the quick search box on the forum. :)
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 02:18:36 PM
Here (http://www.donationcoder.com/Forums/bb/index.php?topic=9434.msg70354#msg70354)

Don't understand the differences between :
* 2.  Match all words/Match any words
* 9.  Match Mode

I thought that 9 replaces 2, but I was wrong. Didn't I ?
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 02:19:25 PM
How to add quick search box to your Custom (non-default) SMF Theme

EDIT: Your_Theme_Dir/index.template.php

Operation 1

Find:

Quote
   echo '
            <td class="titlebg2" align="right" nowrap="nowrap" valign="top">
               <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                  <a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
                  <input type="text" name="search" value="" style="width: 190px;" />&nbsp;
                  <input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
                  <input type="hidden" name="advanced" value="0" />';

   // Search within current topic?
   if (!empty($context['current_topic']))
      echo '
                  <input type="hidden" name="topic" value="', $context['current_topic'], '" />';

      // If we're on a certain board, limit it to this board ;).
   elseif (!empty($context['current_board']))
      echo '
                  <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

   echo '
               </form>
            </td>
         </tr>
      </table>
   </div>';


Replace with:

Quote
   echo '
            <td class="titlebg2" align="right" nowrap="nowrap" valign="top">
               <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                  <a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
                  <input type="text" name="search" value="" style="width: 190px;" />&nbsp;';
   
   echo DropDownQuickSearch();

   echo            '<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
                  <input type="hidden" name="advanced" value="0" />';

   // If we're viewing a single topic
   if (!empty($context['current_topic']))
      echo '
                  <input type="hidden" name="acttopic" value="', $context['current_topic'], '" />';

   // If we're on a certain board
   if (!empty($context['current_board']))
      echo '
                  <input type="hidden" name="actbrd" value="', $context['current_board'], '" />';

   echo '
               </form>
            </td>
         </tr>
      </table>
   </div>';



Operation 2

ADD the following code to the END of the file (but before the ending ?> ):

Quotefunction DropDownQuickSearch ()
{
   global $context, $txt;

   // in order!!
   $Selections = array(
      'entireforum' => $txt['search_entireforum'],
      'thisbrd' => $txt['search_thisbrd'],
      'thistopic' => $txt['search_thistopic'],
      'members' => $txt['search_members'],
      // Google site search
      'entiresite' => $txt['search_entiresite']
   );

   $default = 'entireforum';
      
   if (empty($context['current_topic']))
      unset ($Selections['thistopic']);

   if (empty($context['current_board']))
      unset ($Selections['thisbrd']);
   
   $str = '
   <select name="search_selection">';
   
   foreach ($Selections as $selection => $title)
      $str .= '
         <option value="' . $selection . '"' . ($selection == $default ? ' selected="selected"' : '') . '>' . $title . ' </option>';
   
   $str .= '
   </select>&nbsp;';
   
   return $str;
}
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 02:30:16 PM
Quote from: Eleglin on August 13, 2007, 02:18:36 PM
Here (http://www.donationcoder.com/Forums/bb/index.php?topic=9434.msg70354#msg70354)

Don't understand the differences between :
* 2.  Match all words/Match any words
* 9.  Match Mode

I thought that 9 replaces 2, but I was wrong. Didn't I ?

2 is about 'Match What', and 9 is about 'How it matches'.

Read the descriptions in the guide carefully. :)
Title: Re: SMF Search Enhancement Mod
Post by: christicehurst on August 13, 2007, 02:58:30 PM
Quote from: wordzilla on August 13, 2007, 02:12:29 PM
@ christicehurst:

I just visited your forum: http://www.writersmuster.com/ and I see quick search box is not working there (because you are not using the default smf theme)

I'll post instructions to manually modify your custom theme momentarily so you'll have the quick search box on the forum. :)

That's alright thanks. Now dealing with how SEO 4 SMF stuffed my forum up. Sadly not all mods are like yours!
Title: Re: SMF Search Enhancement Mod
Post by: dcmouser on August 13, 2007, 03:40:59 PM
Congratulations on sharing this mod -- I know it was quite a bit of work to make it into a package and document everything.
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 13, 2007, 04:00:16 PM
Well, I have understand. Yeaaaaaaaaaah !  :P

<file name="$languagedir/Modifications.french.php">
<operation>
<search position="end" />
<add><![CDATA[
//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'ID d\'un topic spécifique';
$txt['search_match_mode'] = 'Mode de correspondance';
$txt['search_match_mode_whole'] = 'Exacte - moins de résultats, peu de bruits';
$txt['search_match_mode_smart'] = 'Avec troncature - option intermédiaire';
$txt['search_match_mode_any'] = 'Toute correspondance - plus de résultats, plus de bruits';

$txt['search_numReplies'] = 'Réponses';
$txt['search_match_mode_whole_short'] = 'et de façon exacte';
$txt['search_match_mode_smart_short'] = 'avec troncature';
$txt['search_match_mode_any_short'] = 'et quelque soit la forme';

$txt['result_summary'] = 'Montrer/cacher la synthèse des résultats';

$txt['result_generated'] = 'Résultats générés par';
$txt['zillarank'] = 'ZillaRank';

$txt['search_entireforum'] = 'dans tout le forum';
$txt['search_thisbrd'] = 'dans cette section';
$txt['search_thistopic'] = 'dans ce fil';
$txt['search_members'] = 'parmi les membres';
$txt['search_entiresite'] = 'dans tout le site';
//END DC SMF Search Text Strings
]]></add>
</operation>
</file>




There are some things we can't directly translate in search.template.php :
$num_matches_link = $topic['num_matches'] > 1 ? '<a title="View all ' . $topic['num_matches'] . ' posts in this topic that match your search criteria"' . ' href="' . $scripturl . '?action=search2;params=' . $context['params'] . ';topic_search=1;acttopic=' . $topic['id'] . '">&nbsp;' . $topic['num_matches'] . ' </a>' : $topic['num_matches'] . ' ';

View all XXXXXXXXXXXXXX posts in this topic that match your search criteria =  Voir les XXXXXXXXXXX messages dans ce topic correspondant à ces critères de recherche (french)

Also here, in the same file, I thought that you could replace this
echo DropDownReviseSearch();

echo ' by&nbsp;user:&nbsp;<input type=


by that :
echo DropDownReviseSearch();

echo ''. $txt[583] .':&nbsp;<input type=
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 04:06:15 PM
Eleglin, thx!! Damn hard coded English strings. Mea culpa. Fixing now..
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 04:38:01 PM
@Eleglin: new mod uploaded, with your latest French translation. Sorry I really meant to remove all hard-coded English strings. :)

Note: this update only deals with translation, English forum owners do not have to upgrade at all.
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 04:51:09 PM
@Eleglin: does the search rank results well on your French forum? I would assume so but couldn't confirm it myself as I only run English forum. :)
Title: Re: SMF Search Enhancement Mod
Post by: Ben_S on August 13, 2007, 07:51:16 PM
Surely ranking is subjective, personally as far as I can see, the only relativeness a machine can provide is that of ordering by date?
Title: Re: SMF Search Enhancement Mod
Post by: L.G.S on August 13, 2007, 09:17:49 PM
I got errors in package manager for Search.php and index.template.php.

I can sort index.template.php just fine but the large amount of changes in Search.php and where they are, are really confusing me. Would you mind modifying my file please?

Title: Re: SMF Search Enhancement Mod
Post by: dcmouser on August 13, 2007, 09:27:25 PM
The trouble with the package manager being able to find and replace things is exactly why i complained so much about SMF's refusual to allow us mod makers to include the modified source files to make it easier for people to manuall make changes if they prefer.

Wordzilla is a much nicer person than me so he bent over backwards to create this in package manager form, but i still hope the smf admins will reconsider their policy of outlawing mod makers from including a few modified source code files in their modification packages for those who have troubles with the package installer.
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 10:50:16 PM
Quote from: L.G.S on August 13, 2007, 09:17:49 PM
I got errors in package manager for Search.php and index.template.php.

I can sort index.template.php just fine but the large amount of changes in Search.php and where they are, are really confusing me. Would you mind modifying my file please?

I just compared the search.php in your attachment with official 1.1.3 search.php and I saw a few mod changes there that caused package installer to fail.

You have View Any Topic Permission and Remove Hidden Text mods installed, and the former is what prevented you from installing my mod.

Lines #1374-1394 from your search.php:

Quote
   // View Any Topic Permission
   $request = db_query("
      SELECT b.ID_BOARD
      FROM {$db_prefix}boards AS b", __FILE__, __LINE__);
   $normal_boards = array(-1);
   while ($row = mysql_fetch_assoc($request)) {
      if (allowedTo('view_any_topic', $row['ID_BOARD']))
         $normal_boards[] = $row['ID_BOARD'];
   }
   mysql_free_result($request);

   $participants = array();
   $request = db_query("
      SELECT " . (empty($search_params['topic']) ? 'lsr.ID_TOPIC' : $search_params['topic'] . ' AS ID_TOPIC') . ", lsr.ID_MSG, lsr.relevance, lsr.num_matches
      FROM {$db_prefix}log_search_results AS lsr, {$db_prefix}topics AS t, {$db_prefix}messages AS mf
      WHERE ID_SEARCH = " . $_SESSION['search_cache']['ID_SEARCH'] . "
         AND t.ID_TOPIC = lsr.ID_TOPIC
         AND mf.ID_MSG = t.ID_FIRST_MSG
         AND ( t.ID_BOARD IN (" . implode(', ', $normal_boards) . ") OR t.isSticky = 1 OR mf.ID_MEMBER = $ID_MEMBER )
      ORDER BY $search_params[sort] $search_params[sort_dir]
      LIMIT " . (int) $_REQUEST['start'] . ", $modSettings[search_results_per_page]", __FILE__, __LINE__);
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 13, 2007, 11:55:42 PM
Quote from: Ben_S on August 13, 2007, 07:51:16 PM
Surely ranking is subjective, personally as far as I can see, the only relativeness a machine can provide is that of ordering by date?

Yes ranking/relevance is subjective, but fortunately IMO there are also quite a few objective and reliable ways to measure relevance (e.g. keyword concentration, frequency of matching posts). From what I've seen on DonationCoder.com forum, the new search has dramatically improved ranking and is saving everybody's time.

I don't know if you share my experience (maybe not), but when I used to do forum search on DonationCoder.com, more than often I looked at the top results and "WTF?" - now I do search, look at first 10 results, find exactly what I wanted to see and I'm happy. In my opinion that's how 'relevance' should be defined.


Search ranking is especially important for BIG forums like the one you run, Ben_S - frequently your users get overwhelming amount of matches (it's reasonable to assume that only a small fraction of ppl today are very good at crafting queries). Now with "ordering by date" or otherwise poorly ranked results, it's impossible for users to grab the whole picture and enjoy the richness of information -- their horizon is strictly limited to recent posts and irrelevant posts, and as such it makes no difference whether the forum boasts 3 million posts or has just 30k. Yes, the admin and his forum users can swear that there's 500% chance the topic of interest just lies somewhere, somewhere, somewhere, buried in 3 million posts -- yet nobody is willing to go through 30 pages of search results to dig it out. Dang! It's lost.

Without a most effective search ranking system, the frustrations of people who do search on the forum grow just as the forum itself grows - they search, they are constantly bombarded by irrelevant info (i.e. crap), they lose patience, they don't find anything, and eventually they don't bother to search at all.

Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 14, 2007, 08:51:09 AM
Quote from: karlbenson on August 12, 2007, 07:08:24 PM
is this alot more server intensive than the standard smf one?

The mod is working on L.G.S (http://www.simplemachines.org/community/index.php?action=profile;u=25087)'s Ruthless Intent forum (http://www.ruthlessintent.com/board/index.php), searching 134,078 Posts in 67,934 Topics. And to my knowledge he's not on a dedicated server.

As you can see this mod searches big forums with ease. :)
Title: Re: SMF Search Enhancement Mod
Post by: L.G.S on August 14, 2007, 09:04:32 AM
Yes, I'm on a shared server ;)
Title: Re: SMF Search Enhancement Mod
Post by: ES23 on August 14, 2007, 12:04:08 PM
Hi!

I have installed the latest version of the smf search enhancement and it is working great.However,there is an error reported in my forums error log when I visited the log.

This is the error:

8: Undefined index: brd
File: /var/www/html/forums/Sources/Search.php
Line: 407

I have attached my search.php in my this post.Can someone please advise what is going wrong???What do you mean by undefined index?Will it affect my forum in anyway by having this undefined index error.Plzz help!!!
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 14, 2007, 12:14:17 PM
It's caused by a confirmed bug (http://www.simplemachines.org/community/index.php?topic=179068.0) in the official SMF 1.1.3 Search.php, not by this mod:

From official 1.1.3 Search.php, line 407:

Quote// Ensure that brd is an array.
if (!is_array($_REQUEST['brd']) && !empty($_REQUEST['brd']))
   $_REQUEST['brd'] = strpos($_REQUEST['brd'], ',') !== false ? explode(',', $_REQUEST['brd']) : array($_REQUEST['brd']);

You see if $_REQUEST['brd'] is not set, is_array($_REQUEST['brd']) will generate a warning.


This search mod actually fixed this smf bug:

Quote
        // Ensure that brd is an array.
   // ATTN: reverse the order here to prevent undefined index error. (credit: mouser)
   if (!empty($_REQUEST['brd']) && !is_array($_REQUEST['brd']))
      $_REQUEST['brd'] = strpos($_REQUEST['brd'], ',') !== false ? explode(',', $_REQUEST['brd']) : array($_REQUEST['brd']);

So you wont be seeing this error again. :)

Title: Re: SMF Search Enhancement Mod
Post by: Ben_S on August 14, 2007, 12:49:52 PM
Quote from: wordzilla on August 13, 2007, 11:55:42 PM
Search ranking is especially important for BIG forums like the one you run, Ben_S - frequently your users get overwhelming amount of matches (it's reasonable to assume that only a small fraction of ppl today are very good at crafting queries). Now with "ordering by date" or otherwise poorly ranked results, it's impossible for users to grab the whole picture and enjoy the richness of information -- their horizon is strictly limited to recent posts and irrelevant posts, and as such it makes no difference whether the forum boasts 3 million posts or has just 30k. Yes, the admin and his forum users can swear that there's 500% chance the topic of interest just lies somewhere, somewhere, somewhere, buried in 3 million posts -- yet nobody is willing to go through 30 pages of search results to dig it out. Dang! It's lost.

Personally I still think the only real worthwhile ranking for search results is ordered by date.

The vast majority of things people search for on my own forum at least, are pretty much mentioned in most topics so any ordering performed any way other than by date is useles, I'll take a look at your code sometime though.

My only real issue with search is the fact that (on it's own at least) MySQL is absolutely rubbish in terms of performance.
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 14, 2007, 03:26:03 PM
I think SMF Team should add this mod in SMF 2.0 !
This would be a great feature, if it was added :D
Title: Re: SMF Search Enhancement Mod
Post by: L.G.S on August 14, 2007, 04:12:37 PM
I think they'd have to make their own wouldn't they? Doubt they would want the copyright in their search results!
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 14, 2007, 04:33:03 PM
Quote from: L.G.S on August 14, 2007, 04:12:37 PM
I think they'd have to make their own wouldn't they? Doubt they would want the copyright in their search results!

They don't have to. If they are interested in what this mod offers, I'm willing to share with the SMF team all I have/know, without any reciprocation (no copyright thingy, of course). SMF is about open source and sharing, just imagine how many forums and forum members can benefit from this - I won't let my ego get in the way. :)
Title: Re: SMF Search Enhancement Mod
Post by: Eleglin on August 14, 2007, 04:39:15 PM
SMF is no Open Source software, although is free. (http://www.simplemachines.org/about/license.php)
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 14, 2007, 04:44:47 PM
Well, yes u right, I actually used "open source" in its loosest sense here. ;)
Title: Re: SMF Search Enhancement Mod
Post by: karlbenson on August 14, 2007, 05:30:13 PM
I always am appreciative when users are willing to offer code 'no-strings' attached.

So thanks wordZilla.
Title: Re: SMF Search Enhancement Mod
Post by: ES23 on August 15, 2007, 06:37:26 AM
Quote from: wordzilla on August 14, 2007, 12:14:17 PM
It's caused by a confirmed bug (http://www.simplemachines.org/community/index.php?topic=179068.0) in the official SMF 1.1.3 Search.php, not by this mod:

From official 1.1.3 Search.php, line 407:

Quote// Ensure that brd is an array.
if (!is_array($_REQUEST['brd']) && !empty($_REQUEST['brd']))
   $_REQUEST['brd'] = strpos($_REQUEST['brd'], ',') !== false ? explode(',', $_REQUEST['brd']) : array($_REQUEST['brd']);

You see if $_REQUEST['brd'] is not set, is_array($_REQUEST['brd']) will generate a warning.


This search mod actually fixed this smf bug:

Quote
        // Ensure that brd is an array.
   // ATTN: reverse the order here to prevent undefined index error. (credit: mouser)
   if (!empty($_REQUEST['brd']) && !is_array($_REQUEST['brd']))
      $_REQUEST['brd'] = strpos($_REQUEST['brd'], ',') !== false ? explode(',', $_REQUEST['brd']) : array($_REQUEST['brd']);

So you wont be seeing this error again. :)



Thanks for the reply ;) I feel rest assured ... ... now bugged by the modify_inline issue now ... ... :( lol...
Title: Re: SMF Search Enhancement Mod
Post by: ioszilla on August 15, 2007, 06:40:38 AM
Quotenow bugged by the modify_inline issue now

Is this issue related to this mod?
Title: Re: SMF Search Enhancement Mod
Post by: ES23 on August 15, 2007, 06:57:10 AM
Quote from: wordzilla on August 15, 2007, 06:40:38 AM
Quotenow bugged by the modify_inline issue now

Is this issue related to this mod?

Not sure ... ... I think not as error seems to be from post.php there so din list the details on this thread.I have posted on the modify_inline thread... ... now in hope of someone to help me soon ... ... ;) There's the only error I keep facing besides this search error ... ..Thanks a million btw for clearing 50% of my mindload :)
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 15, 2007, 10:22:35 PM
I have uploaded a new version of this mod to fix a bug from official smf 1.1.3 search.php:
http://www.simplemachines.org/community/index.php?topic=189110.0

I believe it's a major bug and therefore it's recommended that you upgrade to the latest version of this mod.

To upgrade this mod: uninstall the old version from package manager, delete old package, upload new one and install. :)
Title: Re: Search Enhancement Mod
Post by: ES23 on August 17, 2007, 05:25:43 AM
Quote from: wordzilla on August 15, 2007, 10:22:35 PM
I have uploaded a new version of this mod to fix a bug from official smf 1.1.3 search.php:
http://www.simplemachines.org/community/index.php?topic=189110.0

I believe it's a major bug and therefore it's recommended that you upgrade to the latest version of this mod.

To upgrade this mod: uninstall the old version from package manager, delete old package, upload new one and install. :)

I'm currently using the Search Enhancement Mod ... ...Do I need to make the changes to the Search.php file because the part you stated that needs to be edited has some difference in my one?This only applies to the original official smf search and nothing to do with the search enhancement mod,right?Currently,I'm using the search enhancement mod so do I need to make any changes?Pls advise.Thanks.
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 17, 2007, 05:46:26 AM
Quote from: ES23 on August 17, 2007, 05:25:43 AM
Quote from: wordzilla on August 15, 2007, 10:22:35 PM
I have uploaded a new version of this mod to fix a bug from official smf 1.1.3 search.php:
http://www.simplemachines.org/community/index.php?topic=189110.0

I believe it's a major bug and therefore it's recommended that you upgrade to the latest version of this mod.

To upgrade this mod: uninstall the old version from package manager, delete old package, upload new one and install. :)

I'm currently using the Search Enhancement Mod ... ...Do I need to make the changes to the Search.php file because the part you stated that needs to be edited has some difference in my one?This only applies to the original official smf search,right?Currently,I'm using the search enhancement mod so do I need to make any changes?Pls advise.Thanks.

The bug affects official SMF 1.1.3 without this mod or with any previous version of this mod. Whether this bug will actually ruin your search results depends on your account's MySQL privilege to CREATE TEMPORARY TABLES on the server. If your host does not grant this privilege then you are in bad luck - go upgrade to this mod to have the bug fixed.

My suggestion is to always upgrade to the latest version of this mod. After all more features are being added, bugs are getting fixed - you lose nothing. :)


To upgrade: uninstall the old version from package manager, delete old package, upload new one and install.
Title: Re: Search Enhancement Mod
Post by: Eleglin on August 17, 2007, 07:28:34 AM
If you must do a manual installation and if you don't want to modify all your files, you can still compare the install.xml of the new version and the old one with the program Windiff and then modify your files where there are differences :)
Title: Re: Search Enhancement Mod
Post by: tonzi on August 18, 2007, 11:31:52 PM
I am having an error upon installing...

./Sources/Search.php         ---------------------------             Test failed
Title: Re: Search Enhancement Mod
Post by: TrueSatan on August 19, 2007, 06:16:17 AM
Your error is a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
Title: Re: Search Enhancement Mod
Post by: Ramón Cutanda on August 20, 2007, 02:51:13 PM
Well... thanks on the one hand and, on the other, here's the Spanish code for the language file, in case someone needs it or you would like to update the mod.

<!-- Spanish language -->
<!-- Add a language string for error handling to the English error languagefile Thanks to Aaron: http://custom.simplemachines.org/mods/index.php?mod=884 -->
<file name="$themedir/languages/Errors.spanish.php" error="ignore">
<operation error="ignore">
<search position="end" />
<add><![CDATA[
$txt['error_search_string_small_words'] = 'Cada palabra debe tener un mínimo de dos caracteres.';]]></add>
</operation>
</file>

<!-- Spanish language -->
<file name="$languagedir/Modifications.spanish.php" error="ignore">
<operation>
<search position="end" />
<add><![CDATA[
//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'ID específico del tema';
$txt['search_match_mode'] = 'Tipo de coincidencia';
$txt['search_match_mode_whole'] = 'Sólo palabras completas - menos resultados, pero más precisos';
$txt['search_match_mode_smart'] = 'Búsqueda inteligente - método equilibrado';
$txt['search_match_mode_any'] = 'Todas las coincidencias - más resultados, pero menos precisos';

$txt['search_numReplies'] = 'Respuestas';
$txt['search_match_mode_whole_short'] = 'Palabras completas';
$txt['search_match_mode_smart_short'] = 'Búsqueda inteligente';
$txt['search_match_mode_any_short'] = 'Todas las coincidencias';

$txt['result_summary'] = 'Mostrar/ocultar resumen de resultados';

$txt['result_generated'] = 'Los resultados se generaron usando ';
$txt['zillarank'] = 'ZillaRank';

$txt['search_entireforum'] = 'Todos los foros';
$txt['search_thisbrd'] = 'Este foro';
$txt['search_thistopic'] = 'Este tema';
$txt['search_members'] = 'Usuarios';
$txt['search_entiresite'] = 'Toda la web';

$txt['search_view_all'] = 'Ver todos';
$txt['search_match_criteria'] = 'mensajes en este tema que coincidan con el criterio de búsqueda';

$txt['search_go_to_top'] = 'Ir arriba';
$txt['search_go_to_top_single'] = 'Arriba';
//END DC SMF Search Text Strings
]]></add>
</operation>
</file>
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 20, 2007, 03:22:36 PM
videoed, thanks for sharing your translation. I appreciate it. It's now a part of the latest mod 1.1.8. :)

p.s. I did a search for "adios" on your forum: http://www.videoedicion.org/foro/index.php, and there were loads of irrelevant results. Perhaps your forum is affected by this SMF bug (http://www.simplemachines.org/community/index.php?topic=189110.0) as well?

Title: Re: Search Enhancement Mod
Post by: Ramón Cutanda on August 20, 2007, 04:16:29 PM
Quote from: wordzilla on August 20, 2007, 03:22:36 PM
videoed, thanks for sharing your translation. I appreciate it. It's now a part of the latest mod 1.1.8. :)

I'm glad to hear that! It's always a pleasure to contribute somehow

Quotep.s. I did a search for "adios" on your forum: http://www.videoedicion.org/foro/index.php, and there were loads of irrelevant results. Perhaps your forum is affected by this SMF bug (http://www.simplemachines.org/community/index.php?topic=189110.0) as well?

Well... pehaps you were too quick! The thing is I published my post with the translation BEFORE I actually installed the mod in my site and, after installing it, I made some aesthetic changes, erase my custom index, create the full index...

You probably did the search in the middle of all those changes. I've tried your search with perfects result, so I don't think I'm affected  by the bug. I've been doing some tests and everything seems to work OK.

Thanks again!
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 21, 2007, 01:02:18 PM
Can anyone send me the Search.php file of SMF 1.1.3 which has been installed this mod, my file contains some errors. thanks
Title: Re: Search Enhancement Mod
Post by: Ramón Cutanda on August 21, 2007, 03:03:51 PM
Quote from: saosangmo on August 21, 2007, 01:02:18 PM
Can anyone send me the Search.php file of SMF 1.1.3 which has been installed this mod, my file contains some errors. thanks

If you need some "fresh" files the most sensible thing to do is to download again the distribution pack. You will find search.php there

http://www.simplemachines.org/download/
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 21, 2007, 03:54:58 PM
@saosangmo: I agree with videoed. Anyway I have permission to send your the file direct (only) via PM. :)


Just a update:

It's been 2 months since we started experimenting with this new search on our DonationCoder.com forum. Since the modification to the original search function in SMF is extensive, we've been keeping an eye on it -- administrators are notified via email of forum errors and warnings immediately, and feedback threads are open to forum members for bug reporting etc.

Good news is that in the last consecutive 30+ days we haven't got any error notifications related to our new search function and forum feedbacks have been all positive so far.

I personally would like to consider this modification stable, however if you see:

1. Any errors/warnings in your SMF forum error log that you believe are related to this mod
2. Irrelevant/poorly ranked search results
3. Missing results
4. Search performance issues

...or other search-related problems, please do not hesitate to post about them here to help us improve. :)
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 22, 2007, 12:05:17 AM
okie, my hack may be wrong in some steps. I'm checking it.

And I have one question. I want my members who sign in can use this search function. And guests can't view and can't use this search too.

how do I modify my SMF?
Many thanks.
Title: Re: Search Enhancement Mod
Post by: saw on August 23, 2007, 03:27:43 PM
Recently I had a lot of work done on my forum. Just as I was wrapping up, I noticed this mod had become available. To be honest the chief attraction at first was the dropdown menu (I'm so shallow).   Anyway, all I wanted to say was thank you. It's brilliant.
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 23, 2007, 09:50:26 PM
When I search something, It displays this error.
QuoteUnknown error
File: /home/congcumi/public_html/hty/Sources/Search.php
Line: 1392

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.3, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.

My SMF is 1.1.3 and I executed upgrade.php

plz help me!

PS:
my line 1383->1392
Quote
               db_query("
                  INSERT IGNORE INTO {$db_prefix}" . ($createTemporary ? 'tmp_' : '') . "log_search_topics
                     (" . ($createTemporary ? '' : 'ID_SEARCH, ') . "ID_TOPIC)
                  SELECT " . ($createTemporary ? '' : $_SESSION['search_cache']['ID_SEARCH'] . ', ') . "t.ID_TOPIC
                  FROM (" . implode(', ', $subject_query['from']) . ')' . (empty($subject_query['left_join']) ? '' : "
                     LEFT JOIN " . implode("
                     LEFT JOIN ", $subject_query['left_join'])) . "
                  WHERE " . implode("
                     AND ", $subject_query['where']) . (empty($modSettings['search_max_results']) ? '' : "
                  LIMIT " . ($modSettings['search_max_results'] - $numSubjectResults)), __FILE__, __LINE__);
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 24, 2007, 06:26:43 AM
@saosangmo: I have sent you the file as requested.

I cannot seem to locate the code block around line 1392, was your search.php modified some other mod?

@saw: Thanks :) Glad it's working for you.
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 24, 2007, 07:06:50 AM
hi wordzilla, I install your mod on the newest version of SMF and have NO mod on it.
I'll try your file, many thanks
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 24, 2007, 07:13:37 AM
Quote from: saosangmo on August 24, 2007, 07:06:50 AM
hi wordzilla, I install your mod on the newest version of SMF and have NO mod on it.
I'll try your file, many thanks

Cool, then you don't need to upload the file I sent you. :)

Are you still getting this error?
QuoteNote: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.3, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 24, 2007, 09:33:44 AM
yes, some log I got from CPanel

CPU Exceeded:
Tue Aug 21 10:56:53 2007: used  36.00 seconds of cpu time for Mysql query
I'm using Vietnamese Language with UTF-8. When I input the the term with more than 20 characters the errors occur.




Title: Re: Search Enhancement Mod
Post by: ioszilla on August 24, 2007, 10:21:08 AM
Do you have and use any search index (custom/fulltext) for your forum?

If any index is used to speed up the search, there really shouldn't be a cpu load problem (unless your forum is hosted on a host that oversells a lot). I don't think this mod consumes noticeably more resources than official smf search does.


NOTE: So far this mod is *proven* to work on English, French, Spanish, German language forums.

Also I'm confident to say that there *should not* be any problem for it to work as expected on: Albanian, Brazilian, Catalan, Danish, Dutch, Finnish, Portuguese, Norwegian, Croatian, Hungarian, Polish, Romanian, and Turkish forums.

I have NOT tested this mod on non-Latin language forums.


With regard to your Cpanel error:

1. Do you have and use any search index (custom/fulltext) for your forum?
2. Did this error exist before your installation of this mod?
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 24, 2007, 12:35:08 PM
I have configured with your note:

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked
4. Maximum results to show: 0  (0: no limit)

I'm on Bluehost.com

The error only occurs after I install your mod, :(
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 24, 2007, 10:31:27 PM
OK, could you switch search index to "custom index" and see if cpu load improves?
Title: Re: Search Enhancement Mod
Post by: saosangmo on August 26, 2007, 04:07:37 PM
My forum works well when I empty all of search_log table.
thanks for your mod
Title: Re: Search Enhancement Mod
Post by: yume_kokoro on August 29, 2007, 01:18:12 PM
Thanks very much for this mod!

I was a little worried at first because I couldn't make the specified changes to index.template.php - I think due to the fact that I use TP...

- but the mod seems to be working perfectly regardless.
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 30, 2007, 12:12:54 AM
thx for using my mod. :)

I tried a few searches on your forum - it worked well but not as best as it could.

Just a reminder: To get the most out of this mod, make sure you follow the instructions in this post (http://www.simplemachines.org/community/index.php?topic=188513.msg1199369#msg1199369) and configure your SMF accordingly - no hassles and takes only a minute.
Title: Re: Search Enhancement Mod
Post by: Doughboy on August 30, 2007, 09:11:18 AM
I'm using 1.1.2 and installed the mod which worked fine, no problem there.

The only quirk I noticed is that when you move from main index to board to post, the drop down box doesn't change like on this board.  For example when you go to a post on this board the drop down box auto changes to "this topic".  Any ideas?

Thanks in advance because I love the mod.
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 30, 2007, 09:32:51 AM
This is not a bug, but intended behavior, as described here:  http://www.simplemachines.org/community/index.php?topic=188513.msg1200269#msg1200269  :)

I think in most cases people will prefer searching entire forum to searching within individual boards/topics. Therefore "entire forum" is the default scope of search unless specified otherwise.


I haven't yet tested it on 1.1.2 but glad to know it's working for you. :)
Title: Re: Search Enhancement Mod
Post by: yume_kokoro on August 30, 2007, 12:05:43 PM
Quote from: wordzilla on August 30, 2007, 12:12:54 AM
thx for using my mod. :)

I tried a few searches on your forum - it worked well but not as best as it could.

Just a reminder: To get the most out of this mod, make sure you follow the instructions in this post (http://www.simplemachines.org/community/index.php?topic=188513.msg1199369#msg1199369) and configure your SMF accordingly - no hassles and takes only a minute.


Oh cool - thanks for the tip.  I've made those changes and it does seem a lot better.   :)
Title: Re: Search Enhancement Mod
Post by: Doughboy on August 30, 2007, 02:59:06 PM
Quote from: wordzilla on August 30, 2007, 09:32:51 AM
This is not a bug, but intended behavior, as described here:  http://www.simplemachines.org/community/index.php?topic=188513.msg1200269#msg1200269  :)

I think in most cases people will prefer searching entire forum to searching within individual boards/topics. Therefore "entire forum" is the default scope of search unless specified otherwise.


I haven't yet tested it on 1.1.2 but glad to know it's working for you. :)

If that's the intended behavior then it's working perfectly.  I wanted to make sure it was working fine.

I really love that drop down box, it helps a lot.
Title: Re: Search Enhancement Mod
Post by: AON21 on August 31, 2007, 07:44:49 AM
Hi there,
first time installer of SMF and this mod.

I have double checked the admin settings and they look fine, but I am getting this error.

//Begin DC SMF Search Text Strings$txt['specific_topic_id'] = 'Specific topic id';$txt['search_match_mode'] = 'Match Mode';$txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise';$txt['search_match_mode_smart'] = 'Smart matching - balanced';$txt['search_match_mode_any'] = 'Match any sequence - most results, most noise';$txt['search_numReplies'] = 'Replies';$txt['search_match_mode_whole_short'] = 'Match whole words only';$txt['search_match_mode_smart_short'] = 'Smart matching';$txt['search_match_mode_any_short'] = 'Match any sequence';$txt['result_summary'] = 'Show/hide result summary';$txt['result_generated'] = 'Results generated using ';$txt['zillarank'] = 'ZillaRank';$txt['search_entireforum'] = 'Entire Forum';$txt['search_thisbrd'] = 'This board';$txt['search_thistopic'] = 'This topic';$txt['search_members'] = 'Members';$txt['search_entiresite'] = 'Entire Site';$txt['search_view_all'] = 'View all';$txt['search_match_criteria'] = 'posts in this topic that match your search criteria';$txt['search_go_to_top'] = 'Go to Top';$txt['search_go_to_top_single'] = 'Top';//END DC SMF Search Text Strings //Begin DC SMF Search Text Strings$txt['specific_topic_id'] = 'Specific topic id';$txt['search_match_mode'] = 'Match Mode';$txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise';$txt['search_match_mode_smart'] = 'Smart matching - balanced';$txt['search_match_mode_any'] = 'Match any sequence - most results, most noise';$txt['search_numReplies'] = 'Replies';$txt['search_match_mode_whole_short'] = 'Match whole words only';$txt['search_match_mode_smart_short'] = 'Smart matching';$txt['search_match_mode_any_short'] = 'Match any sequence';$txt['result_summary'] = 'Show/hide result summary';$txt['result_generated'] = 'Results generated using ';$txt['zillarank'] = 'ZillaRank';$txt['search_entireforum'] = 'Entire Forum';$txt['search_thisbrd'] = 'This board';$txt['search_thistopic'] = 'This topic';$txt['search_members'] = 'Members';$txt['search_entiresite'] = 'Entire Site';$txt['search_view_all'] = 'View all';$txt['search_match_criteria'] = 'posts in this topic that match your search criteria';$txt['search_go_to_top'] = 'Go to Top';$txt['search_go_to_top_single'] = 'Top';//END DC SMF Search Text Strings

this appears in the header.
Now I do know why it appears twice; when I saw it there after a successful install, I went to the admin section assuming it was the search full textmode settings that were causing it.

I then uninstalled and ensured everything was set before installing again - now there are two.

Any help most welcome :)

P.S. This appears in all themes.
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 31, 2007, 07:51:27 AM
What exact error message were you getting? And could you attach a screenshot here?  Sorry I don't quite get the problem. :)
Title: Re: Search Enhancement Mod
Post by: AON21 on August 31, 2007, 07:55:49 AM
Hi wordzilla - I copied it into the code above, but I will copy straight here...


appears above header:
//Begin DC SMF Search Text Strings $txt['specific_topic_id'] = 'Specific topic id'; $txt['search_match_mode'] = 'Match Mode'; $txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise'; $txt['search_match_mode_smart'] = 'Smart matching - balanced'; $txt['search_match_mode_any'] = 'Match any sequence - most results, most noise'; $txt['search_numReplies'] = 'Replies'; $txt['search_match_mode_whole_short'] = 'Match whole words only'; $txt['search_match_mode_smart_short'] = 'Smart matching'; $txt['search_match_mode_any_short'] = 'Match any sequence'; $txt['result_summary'] = 'Show/hide result summary'; $txt['result_generated'] = 'Results generated using '; $txt['zillarank'] = 'ZillaRank'; $txt['search_entireforum'] = 'Entire Forum'; $txt['search_thisbrd'] = 'This board'; $txt['search_thistopic'] = 'This topic'; $txt['search_members'] = 'Members'; $txt['search_entiresite'] = 'Entire Site'; $txt['search_view_all'] = 'View all'; $txt['search_match_criteria'] = 'posts in this topic that match your search criteria'; $txt['search_go_to_top'] = 'Go to Top'; $txt['search_go_to_top_single'] = 'Top'; //END DC SMF Search Text Strings //Begin DC SMF Search Text Strings $txt['specific_topic_id'] = 'Specific topic id'; $txt['search_match_mode'] = 'Match Mode'; $txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise'; $txt['search_match_mode_smart'] = 'Smart matching - balanced'; $txt['search_match_mode_any'] = 'Match any sequence - most results, most noise'; $txt['search_numReplies'] = 'Replies'; $txt['search_match_mode_whole_short'] = 'Match whole words only'; $txt['search_match_mode_smart_short'] = 'Smart matching'; $txt['search_match_mode_any_short'] = 'Match any sequence'; $txt['result_summary'] = 'Show/hide result summary'; $txt['result_generated'] = 'Results generated using '; $txt['zillarank'] = 'ZillaRank'; $txt['search_entireforum'] = 'Entire Forum'; $txt['search_thisbrd'] = 'This board'; $txt['search_thistopic'] = 'This topic'; $txt['search_members'] = 'Members'; $txt['search_entiresite'] = 'Entire Site'; $txt['search_view_all'] = 'View all'; $txt['search_match_criteria'] = 'posts in this topic that match your search criteria'; $txt['search_go_to_top'] = 'Go to Top'; $txt['search_go_to_top_single'] = 'Top'; //END DC SMF Search Text Strings


Here is the screen shot
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 31, 2007, 08:06:49 AM
Could you find and view your language file (Modifications.english.php) and see if there's any code block formatted like the following:


//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'Specific topic id';
$txt['search_match_mode'] = 'Match Mode';
$txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise';
$txt['search_match_mode_smart'] = 'Smart matching - balanced';
$txt['search_match_mode_any'] = 'Match any sequence - most results, most noise';

$txt['search_numReplies'] = 'Replies';
$txt['search_match_mode_whole_short'] = 'Match whole words only';
$txt['search_match_mode_smart_short'] = 'Smart matching';
$txt['search_match_mode_any_short'] = 'Match any sequence';

$txt['result_summary'] = 'Show/hide result summary';

$txt['result_generated'] = 'Results generated using ';
$txt['zillarank'] = 'ZillaRank';

$txt['search_entireforum'] = 'Entire Forum';
$txt['search_thisbrd'] = 'This board';
$txt['search_thistopic'] = 'This topic';
$txt['search_members'] = 'Members';
$txt['search_entiresite'] = 'Entire Site';

$txt['search_view_all'] = 'View all';
$txt['search_match_criteria'] = 'posts in this topic that match your search criteria';

$txt['search_go_to_top'] = 'Go to Top';
$txt['search_go_to_top_single'] = 'Top';
//END DC SMF Search Text Strings
Title: Re: Search Enhancement Mod
Post by: AON21 on August 31, 2007, 08:10:07 AM
If Modifications.english.php is supposed to be in the root folder - then I'm up a creek without a paddle `cause it's not there :|

reinstall time?
Title: Re: Search Enhancement Mod
Post by: ioszilla on August 31, 2007, 08:13:11 AM
I see you use the default theme, so you should be able to find the file in /Themes/default/.
Title: Re: Search Enhancement Mod
Post by: AON21 on August 31, 2007, 08:17:41 AM
got it :)

and surprise surprise - it has the error message in that php file.

(before I forget to mention it - thanks for the Lightning fast replies!)
Title: Re: Search Enhancement Mod
Post by: AON21 on August 31, 2007, 08:29:07 AM
there was a:
?>
above the duplicated section.

So I double-checked it was a perfect duplicate, removed one and put the:
?>
at the bottom.

Problem gone :)
Title: Re: Search Enhancement Mod
Post by: Mohamed GadAllah on September 01, 2007, 09:35:53 AM
Hi
I've get this error during applying the mod.
(http://img410.imageshack.us/img410/6264/errormp7.th.jpg) (http://img410.imageshack.us/my.php?image=errormp7.jpg)
Here are the installed mods:
Mod Name     Version     
1.    Advanced Visual Verification    1.2    
2.    Active Members In Topic    1.5    
3.    Display Age and Location next to posts    1.0    
4.    Akismet Spam Blocking    1.1.1    
5.    Alternativ Protocol Fix    1.0.1    
6.    Alternate Text for Member Group Images    0.3.1    
7.    SMF Archive    1.1    
8.    Attachments layout    1.2    
9.    AvatarSelect    1.1.2    
10.    Blabberizer    2.1u    
11.    ssi_boardNews Multiple Boards    1.0    
12.    Board News    1.2.2    
13.    Board Notes    1.0.7    
14.    Board Registration Password    2.0    
15.    Bookmarks    1.0.1    
16.    Buddy Message Highlight    1.2    
17.    Enhanced Calendar    1.1    
18.    cbi, 1.0    1.0    
19.    British English Spelling Of Centre & Colour BBCode    1.0    
20.    Contact Page    1.1    
21.    Count unread topics on index    1.1    
22.    Custom Board Sort    1.0.1    
23.    Custom Edit Times    1.1    

Please note that I am using SMF 1.1.3 and all MODs above are up2date
Also the red mentioned file (Search.template.php) is CHMODed to 777
Also the Fulltext index
Index: already created [remove fulltext index]
Size: 10 KB
And Maximum results to show:0
So what could be wrong?
Shall i continue with installing or what?
Thanks
Mohamed :)
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 01, 2007, 09:53:02 AM
hehe, you have so many mods installed on your new forum - I'm not sure which mods, and in what ways they modified the search template to conflict with this mod. And since I'm not familiar with your other mods, I cannot offer to modify the template manually for you - my modification might break one or more of your other mods.

In this case, I suggest you use Daniel's mod parser to manually compare and edit your search.template.php:

http://modparser.dev.dansoftaustralia.net/

Let me know if there is anything else I can help with. :)
Title: Re: Search Enhancement Mod
Post by: Mohamed GadAllah on September 01, 2007, 10:10:40 AM
Thanks a lot for your reply
But the link is not working in both IE - FF
Thanks
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 01, 2007, 10:13:33 AM
Hmmm, seems to be a problem with his server atm. Try this one instead:

http://www.smfhacks.com/smf-package-parser.html
Title: Re: Search Enhancement Mod
Post by: Mohamed GadAllah on September 01, 2007, 10:27:29 AM
Are you sure of this link?
Because I got this:
(http://img338.imageshack.us/img338/86/errorpe4.th.jpg) (http://img338.imageshack.us/my.php?image=errorpe4.jpg)
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 01, 2007, 10:30:26 AM
Yes that's where u upload this mod package and get instructions on how to manually edit files. :)
Title: Re: Search Enhancement Mod
Post by: Mohamed GadAllah on September 01, 2007, 10:48:31 AM
Oh
Thanks a lot
Sometimes I feel so blind and so stupid
lol
Thanks
Mohamed :)
Title: Re: Search Enhancement Mod
Post by: Mohamed GadAllah on September 01, 2007, 10:51:49 AM
Later Edit
But shall i upload the MOD or go and do the editing directly only?
Title: Re: Search Enhancement Mod
Post by: Sulgicur on September 12, 2007, 03:22:55 PM
One of our mods earlier installed the DC SMF Search tool. This has created a fault with both searching and quoting, which has remained even though we've since removed the package. Also the text "//Begin DC SMF Search Text Strings $txt['specific_topic_id'] = 'Specific topic id'; $txt['search_match_mode'] = 'Match Mode'; $txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise'; $txt['search_match_mode_smart'] = 'Smart matching - balanced'; $txt['search_match_mode_any'] = 'Match any sequence - most results, most noise'; $txt['search_numReplies'] = 'Replies'; $txt['search_match_mode_whole_short'] = 'Match whole words only'; $txt['search_match_mode_smart_short'] = 'Smart matching'; $txt['search_match_mode_any_short'] = 'Match any sequence'; $txt['result_summary'] = 'Show/hide result summary'; $txt['result_generated'] = 'Results generated using '; $txt['zillarank'] = 'ZillaRank'; $txt['search_entireforum'] = 'Entire Forum'; $txt['search_thisbrd'] = 'This board'; $txt['search_thistopic'] = 'This topic'; $txt['search_members'] = 'Members'; $txt['search_entiresite'] = 'Entire Site'; $txt['search_view_all'] = 'View all'; $txt['search_match_criteria'] = 'posts in this topic that match your search criteria'; $txt['search_go_to_top'] = 'Go to Top'; $txt['search_go_to_top_single'] = 'Top'; //END DC SMF Search Text Strings" is appearing at the top of every page. I've searched through every updated php today but I can't find where that text is anywhere.

Your help would be gratefully welcomed. Thanks.
Title: Re: Search Enhancement Mod
Post by: Sulgicur on September 12, 2007, 03:29:54 PM
Sorry, I should've read this topic first.

Everything is fine now.
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 12, 2007, 03:31:37 PM
Go to your current theme folder, edit your language file (Modifications.english.php) and remove the above text. :)

Same problem was reported here: http://www.simplemachines.org/community/index.php?topic=188513.msg1222998#msg1222998, and I personally believe it's an SMF installer bug and is not related to this mod.
Title: Re: Search Enhancement Mod
Post by: kamili34 on September 19, 2007, 11:00:30 AM
Thanks work.
Title: Re: Search Enhancement Mod
Post by: kathylene on October 02, 2007, 12:37:55 PM
We have installed SMF 1.1.4 at http://www.projectjason.org/forums/index.php.

There seems to be a problem with the search topics only. If you go to the search page at http://www.projectjason.org/forums/index.php?action=search
and search the words       "lisa stebic"      and select "Search in topic subjects only", it comes back with no results. However, if you search those same words and don't select "Search in topic subjects only" it comes back with the correct result which is   http://www.projectjason.org/forums/index.php?topic=237.0 and the topic suject is "Missing Woman: Lisa Stebic - IL - 4/30/07" .

In the admin area for search
"Settings" -  all membergroups allowed to use the search function and enable simple search is not selected. Maximum results to show: 0


"Search Method"
Space used by forum messages in the database: 20330.63 KB
Space used to index messages in the database: 14483 KB
The search index is set to Fulltext index and it shows that it is already created. (I have removed it and then had it create it again also)
Both options, "Force the use of a search index: " and "Match whole words only:  " are deselected.

"Weights"
Relative search weight for number of matching messages within a topic (?):  30%
Relative search weight for age of last matching message (?):  25%
Relative search weight for topic length (?):  20%
Relative search weight for a matching subject (?):  15%
Relative search weight for a first message match (?):  10%
Relative search weight for a sticky topic (?):  0%
Total 100 100%
(I just left this at the default settings)
 


Title: Re: Search Enhancement Mod
Post by: ioszilla on October 02, 2007, 01:40:04 PM
Hi kathylene,

Have u experienced  the same problem before the application of this mod? If so, there might be something wrong with your smf_log_search_subjects table (could be incomplete/corrupted). I encourage you to uninstall this mod and give it a try.

Also if possible, send me a copy of your modified Search.php. :)
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 02, 2007, 01:45:19 PM
I have just uploaded version 1.1.9 of this mod for SMF 1.1.4.

Changes:
1. A few tweaks to search parameters for better relevance ranking
2. Undo a change introduced to Search.php in SMF 1.1.4 that will break the apostrophe search ability offered by this mod.
Title: Re: Search Enhancement Mod
Post by: saosangmo on October 02, 2007, 02:27:24 PM
hi wordzilla, could you add the function which limits number of seconds between 2 searching times?
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 02, 2007, 02:33:58 PM
Quote from: saosangmo on October 02, 2007, 02:27:24 PM
hi wordzilla, could you add the function which limits number of seconds between 2 searching times?

IMO you don't have to worry about search function overloading the server, as SMF search provides load average protection by default. :)

Normally user search requests won't proceed if server load average is deemed too high.
Title: Re: Search Enhancement Mod
Post by: Merecraft on October 02, 2007, 02:56:27 PM
Hi wordzilla

I've installed the latest version (1.1.9) to my forum (1.1.4) but any searches containing an apostrophe just take me to a blank page with the message "Forbidden

You don't have permission to access /forum/index.php on this server."

Is that the expected behaviour? Thanks!
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 02, 2007, 03:01:55 PM
Hi Merecraft,

No ofc it's *not* expected behavior. However I'm not able to reproduce the problem on my web forum (donationcoder.com) or on my local test forum (fresh SMF 1.1.4 installation).

Could you point me to your forum or send me a copy of your Search.php? Thx.
Title: Re: Search Enhancement Mod
Post by: kathylene on October 02, 2007, 04:10:50 PM
Quote from: wordzilla on October 02, 2007, 01:40:04 PM
Hi kathylene,

Have u experienced  the same problem before the application of this mod? If so, there might be something wrong with your smf_log_search_subjects table (could be incomplete/corrupted). I encourage you to uninstall this mod and give it a try.

Also if possible, send me a copy of your modified Search.php. :)

I can't say for sure if we had problems prior to mod installation or not. I will uninstall and try search by topic subject, then reinstall and try to search by topic subject and let you know.

Am sending a copy of search.php
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 02, 2007, 08:34:37 PM
kathylene: I received an email from you a few hrs ago but it was totally blank. Could u resend the script to [email protected]?  :)
Title: Re: Search Enhancement Mod
Post by: kathylene on October 03, 2007, 11:33:59 AM
Quote from: wordzilla on October 02, 2007, 01:40:04 PM
Hi kathylene,

Have u experienced  the same problem before the application of this mod? If so, there might be something wrong with your smf_log_search_subjects table (could be incomplete/corrupted). I encourage you to uninstall this mod and give it a try.

Also if possible, send me a copy of your modified Search.php. :)

Well, I removed the mod and still have the same problem. I looked at the smf_log_search_subjects in the db and that is the problem. We had imported the original threads from Deluxe Portal. The threads that were imported are the ones that are not listed in smf_log_search_subjects and therefor it is not returning any results when searched. All new posts though are being entered in smf_log_search_subjects so they are returning results.

Guess I will need to figure a way to pull the subjects from the imported posts into the smf_log_search_subjects.

Thanks for pointing me in the right direction to find problem.
Title: Re: Search Enhancement Mod
Post by: kathylene on October 03, 2007, 12:15:47 PM
Quote from: kathylene on October 03, 2007, 11:33:59 AM
Quote from: wordzilla on October 02, 2007, 01:40:04 PM
Hi kathylene,

Have u experienced  the same problem before the application of this mod? If so, there might be something wrong with your smf_log_search_subjects table (could be incomplete/corrupted). I encourage you to uninstall this mod and give it a try.

Also if possible, send me a copy of your modified Search.php. :)

Well, I removed the mod and still have the same problem. I looked at the smf_log_search_subjects in the db and that is the problem. We had imported the original threads from Deluxe Portal. The threads that were imported are the ones that are not listed in smf_log_search_subjects and therefor it is not returning any results when searched. All new posts though are being entered in smf_log_search_subjects so they are returning results.

Guess I will need to figure a way to pull the subjects from the imported posts into the smf_log_search_subjects.

Thanks for pointing me in the right direction to find problem.

I exported my smf_topics (the id and subject) and will have to enter them into the smf_log_search_subjects. The only way I know how is to manually copy and paste each subject and remove  all the words except for one. 

Example make this
INSERT DELAYED IGNORE INTO `smf_log_search_subjects` VALUES (2, 'Grieving Mothers Become Anti-Abduction Crusaders');

into this
INSERT DELAYED IGNORE INTO `smf_log_search_subjects` (`ID_TOPIC`, `word`) VALUES (2, 'Grieving');
INSERT DELAYED IGNORE INTO `smf_log_search_subjects` (`ID_TOPIC`, `word`) VALUES (2, 'Mothers');
INSERT DELAYED IGNORE INTO `smf_log_search_subjects` (`ID_TOPIC`, `word`) VALUES (2, 'Become');
INSERT DELAYED IGNORE INTO `smf_log_search_subjects` (`ID_TOPIC`, `word`) VALUES (2, 'Anti-Abduction');
INSERT DELAYED IGNORE INTO `smf_log_search_subjects` (`ID_TOPIC`, `word`) VALUES (2, 'Crusaders');

this will then add all the imported info into smf_log_search_subjects.

thank you wordzilla for helping me with this.
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 03, 2007, 02:42:33 PM
No, u absolutely do not have to manually do it - that's a LOT of work! :P

1. Put your forum in maintenance mode (recommended but optional)
2. Go to your phpMyAdmin, EMPTY (*not* DROP) the table smf_log_search_subjects - just this table, no more no less.
3. Visit your forum, go to Admin -> Maintenance -> Forum Maintenance -> Find and repair any errors.

And then SMF will rebuild your smf_log_search_subjects table in minutes.
Title: Re: Search Enhancement Mod
Post by: kathylene on October 03, 2007, 02:53:07 PM
Wordzilla,

My eyes, fingers and mind thank you. Yeah it is a long list and I think next week I would still be working on putting it in.

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Title: Re: Search Enhancement Mod
Post by: kathylene on October 03, 2007, 03:29:15 PM
Quote from: wordzilla on October 03, 2007, 02:42:33 PM
No, u absolutely do not have to manually do it - that's a LOT of work! :P

1. Put your forum in maintenance mode (recommended but optional)
2. Go to your phpMyAdmin, EMPTY (*not* DROP) the table smf_log_search_subjects - just this table, no more no less.
3. Visit your forum, go to Admin -> Maintenance -> Forum Maintenance -> Find and repair any errors.

And then SMF will rebuild your smf_log_search_subjects table in minutes.

you are a genious! thanks again!
Title: Re: Search Enhancement Mod
Post by: dflora23 on October 04, 2007, 08:53:23 PM
Hello!  I would love to add this mod but I'm getting the package manager error.  I read through your post on how to do a manual install but I've never done a manual install and am having trouble following the instructions.  I tried the Packager Parser site and I got lost in the code.

Is the only file I have to edit /search.php?  Can I use the package manager to install the rest and then edit that file?  Thanks for your time.  My forum members have been complaining about the lack of search functionality for some time.

Daniel
www.justlabradors.com/forum

Title: Re: Search Enhancement Mod
Post by: ioszilla on October 04, 2007, 09:11:14 PM
Hi Daniel,

Quote from: dflora23 on October 04, 2007, 08:53:23 PM
Is the only file I have to edit /search.php?

No, there are at least 3 core files that you have to edit for this mod to work.

Quote from: dflora23 on October 04, 2007, 08:53:23 PM
Can I use the package manager to install the rest and then edit that file?  Thanks for your time.  My forum members have been complaining about the lack of search functionality for some time.

No, and don't proceed with installation if the mod fails the test (for any reason).

Could you tell me which file/files generated package manager errors? And if possible email me (admin at freethesaurus.net) the files in question so I can have a look.

If you have already installed other mods that may have made changes to Search.php, list them here. As this mod extensively modifies Search.php (around 60%), the installation is most likely to fail if Search.php has already been modified.
Title: Re: Search Enhancement Mod
Post by: Merecraft on October 05, 2007, 03:30:13 AM
Hi wordzilla

just to let you know I emailed you a copy of my search.php file as requested. Let me know if you haven't received it :)

Thanks!
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 05, 2007, 04:24:23 AM
No I have not received it. :) Did u replace "at" with @?
Title: Re: Search Enhancement Mod
Post by: Ben_S on October 05, 2007, 04:38:35 AM
Quote from: wordzilla on October 02, 2007, 02:33:58 PM
Quote from: saosangmo on October 02, 2007, 02:27:24 PM
hi wordzilla, could you add the function which limits number of seconds between 2 searching times?

IMO you don't have to worry about search function overloading the server, as SMF search provides load average protection by default. :)

Normally user search requests won't proceed if server load average is deemed too high.

That is not the case, the option to do that is disabled by default.
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 05, 2007, 04:59:30 AM
Yes Ben, u r probably right about it. Thx for pointing out my mistake. :)

Is there actually an option in the admin panel to configure it?
Title: Re: Search Enhancement Mod
Post by: Ben_S on October 05, 2007, 06:37:46 AM
Nope, it's a hidden setting since used wrongly people can lock themselves out of their forum

http://www.simplemachines.org/community/index.php?topic=76249.0
Title: Re: Search Enhancement Mod
Post by: Merecraft on October 05, 2007, 09:50:00 AM
I sent it to [email protected] - is that the wrong address? Thanks!
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 05, 2007, 05:48:23 PM
Yup Im sure that's the correct addy. Weird, could u resend?
Title: Re: Search Enhancement Mod
Post by: Merecraft on October 05, 2007, 06:24:37 PM
Done, and thanks again :)
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 05, 2007, 07:04:15 PM
Hi Merecraft, I have checked the Search.php u sent me. It's already been *perfectly* modified with the latest version of this mod. So no problem with your Search.php.

Could u point me to your forum so I can have a look? :)
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 06, 2007, 06:05:38 AM
Hi Merecraft,

Thx for your pm. I just had a look at your forum and it seemed that apache mod_security was the cause of problem, not my mod. You can easily prove this by:
1. Log out the forum
2. Enter one or more apostrophe in login username/password field
... and oooops, you get 403 forbidden errors.


One of the possible solutions:

Create an .htaccess file in your forum directory and add the following code


<IfModule mod_security.c>
   SecFilterEngine Off
   SecFilterScanPOST Off
</IfModule>


This will turn off your mod_security
Title: Re: Search Enhancement Mod
Post by: Merecraft on October 06, 2007, 06:20:08 AM
Thanks for taking a look wordzilla. Will turning off the mod_security have an impact on the security of the forums at all though? If so I'd rather leave things as they are.
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 06, 2007, 06:35:31 AM
I'm not familiar with apache mod_security so I cannot say for sure here whether it will have an impact on your overall security. And IMO its effectiveness will vary from site to site.

Here's what I know:
1. The majority of apache installations do not have mod_security compiled+loaded. Mod_security is one of those optional modules.
2. If you have no idea how to configure mod_security properly, it probably won't secure your site as you'd expect.
3. SMF is already secure enough. ;)
Title: Re: Search Enhancement Mod
Post by: Merecraft on October 06, 2007, 01:20:00 PM
OK, thanks for all the help. This is an awesome mod :)
Title: Re: Search Enhancement Mod
Post by: tsmalmbe on October 07, 2007, 09:38:20 AM
I got error when installing this mod. Namely with Search.php. I have tried to do the install manually... but.. I cannot manage it. The install.xml is so huge, but I have tried to find a distinct 'ATTN' form each ADD-section, and I THINK I have verified that each section, except for the section with '// ATTN: removal #2" are succesful.

I'm running 1.1.4, recently updated 1.1.2 -> 1.1.3 -> 1.1.4.

I do now know of any other mods that could've modified Search.php.  Actually, the last time my Search.php was touched, was when I upgraded to 1.1.4. None of the (30+) mods that I have, should have touched the Search.php-file.

I added my Search.php as an attachment.
Title: Re: Search Enhancement Mod
Post by: Paracelsus on October 07, 2007, 10:37:01 AM
Wordzilla,

There's a small "problem" when installing the MOD with the View Any Topic Permission MOD in "Search.php"... one of the entries replaces a piece of code already modified by that MOD... can you think of something to solve this problem?
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 07, 2007, 10:41:18 AM
tsmalmbe, according to my diff tool your Search.php is incomplete and will not function properly without the missing chunk of code.

Please pm me your email addy so I can send u the complete modified Search.php for 1.1.4
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 07, 2007, 10:47:49 AM
Paracelsus, I'm not familiar with View Any Topic Permission MOD and as such I cannot say whether my modifications will break the mod or not. As u know mods released by other authors here are beyond my control.

I will only do my best to ensure that this mod works with official (unmodified) Search.php. :)
Title: Re: Search Enhancement Mod
Post by: dflora23 on October 08, 2007, 09:14:08 PM
Here are my mods

1.     SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update      1.0       [ Uninstall ]  [ List Files ]  [ Delete ]
2.    Board Viewers Mod    1.1    [ Uninstall ] [ List Files ] [ Delete ]
3.    Board Viewers    0.6    [ List Files ] [ Delete ]
4.    SMF Archive    1.1    [ List Files ] [ Delete ]
5.    Global Headers Footers    1.3    [ List Files ] [ Delete ]
6.    Add PM Info To header (v1.0)    1.0    [ List Files ] [ Delete ]
7.    SMF 1.0.11 / 1.1.3 Update    1.1    [ List Files ] [ Delete ]
8.    SMF 1.1.2 Update Package    1.1.2    [ List Files ] [ Delete ]
9.    Users Online Today Mod    1.4.0    [ Uninstall ] [ List Files ] [ Delete ]
10.    SMF Links    1.6.3    [ List Files ] [ Delete ]
11.    EmailFlash    2.0    [ List Files ] [ Delete ]
12.    Tagging System    1.0.3    [ List Files ] [ Delete ]
13.    Ignore user    1.3    [ Apply Mod ] [ List Files ] [ Delete ]
14.    DonationCoder.com SMF Search Enhancement Mod    1.1.9    [ Apply Mod ] [ List Files ] [ Delete ]
15.    CAPTCHA (code verification)    0.1    [ Apply Mod ] [ List Files ] [ Delete ]
16.    vSubscriberCount    0.91    [ List Files ] [ Delete ]
17.    Board Viewers Mod    1.0    [ List Files ] [ Delete ]
18.    PaypalDonations    1.7    [ List Files ] [ Delete ]
19.    SMF 1.0.8 Update Package    1.0.8    [ List Files ] [ Delete ]
20.    SMF 1.0.7 / 1.1 RC2 Update    1.0    [ List Files ] [ Delete ]
21.    Ad Managment    2.3    [ Uninstall ] [ List Files ] [ Delete ]
22.    MessagePreviewOnHover    1.4    [ Uninstall ] [ List Files ] [ Delete ]
23.    SMF 1.1.1 Update Package    1.1.1

The search.php file is the one causing the error.  Attached is that file.

Thanks,

Daniel
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 08, 2007, 09:50:51 PM
HI Daniel, I have checked the Search.php you attached above - it's neither from SMF 1.1.3 nor 1.1.4 package, and naturally is not supported by this mod.

Could you replace your Search.ph with that from the latest SMF 1.1.4 package?
Title: Re: Search Enhancement Mod
Post by: tsmalmbe on October 09, 2007, 04:19:36 AM
wordzilla: thanks for the Search.php-file, this now works nicely!
Title: Re: Search Enhancement Mod
Post by: dflora23 on October 09, 2007, 10:53:23 PM
I've upgraded to 1.14 that's interesting that my search.php file was not up to date.  Any thoughts?

Dan
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 09, 2007, 10:58:22 PM
Dan, you just need Winmerge (http://winmerge.org/) (freeware) to tell the difference between your Search.php and the official one. :)
Title: Re: Search Enhancement Mod
Post by: dflora23 on October 10, 2007, 05:15:50 PM
My site just crashed after adding the mod.  It was working fine for me until I tried to create a "Full search" index.    Now the whole site went down with the following sql error.

Notice: Undefined variable: sourcedir in /home/justlabr/public_html/forum/index.php on line 49

Warning: main(/QueryString.php) [function.main]: failed to open stream: No such file or directory in /home/justlabr/public_html/forum/index.php on line 49

Fatal error: main() [function.require]: Failed opening required '/QueryString.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/justlabr/public_html/forum/index.php on line 49

Help please!  I've never had my site go down before like this!

Thank you,

Daniel
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 10, 2007, 05:43:20 PM
Hi Daniel, this mod has nothing to do with the creation of fulltext index and it does not modify the above-mentioned QueryString.php.

Seems to me that your QueryString.php in Sources directory is missing somehow - if that's the case you'll need to restore it. :)
Title: Re: Search Enhancement Mod
Post by: dflora23 on October 10, 2007, 05:53:43 PM
Ok, thanks for your help, I posted in the main support forum as I was unable to solve the problem by restoring querystring.php.  I just haven't made any other changes other than adding the mod and have never had a problem like this before.

Thanks,
dan
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 10, 2007, 05:56:21 PM
Np dan, i have replied to your thread here: http://www.simplemachines.org/community/index.php?topic=199758.msg1269894#msg1269894

I believe your Settings.php is missing/corrupted somehow.
Title: Re: Search Enhancement Mod
Post by: Richard Wing on October 12, 2007, 05:21:32 AM
I use smf 1.1.4 and I had to manually install Search.php and Search.Template.php

I am getting the following errors can someone suggest a fix?

8: Undefined variable: search_this_topic_only
File: /var/www/virtual/domain.com/htdocs/Sources/Search.php
Line: 981

8: Undefined variable: active_board_scoring_heuristic_enabled
File: /var/www/virtual/domain.com/htdocs/Sources/Search.php
Line: 956

8: Undefined variable: search_this_topic_only
File: /var/www/virtual/domain.com/htdocs/Sources/Search.php
Line: 951

8: Undefined variable: search_this_topic_only
File: /var/www/virtual/domain.com/htdocs/Sources/Search.php
Line: 892

Thanks for any assistance
Richard Wing
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 12, 2007, 05:23:39 AM
Most likely your Search.php is incomplete, could u attach it here or pm me the file?
Title: Re: Search Enhancement Mod
Post by: NeLLIsania on October 12, 2007, 07:06:36 AM
hi wordzilla! I'm just installed you mod. But i'm can't see the search result page after pressing Search button. It's still blank. Error log in adm panel contain following error:

8: Undefined variable: search_this_topic_only
File: /usr/home/wwwlocal/forum/Sources/Search.php
Line: 868

8: Undefined variable: active_board_scoring_heuristic_enabled
File: /usr/home/wwwlocal/forum/Sources/Search.php
Line: 872

8: Undefined variable: active_board_scoring_heuristic_enabled
File: /usr/home/wwwlocal/forum/Sources/Search.php
Line: 872

I'm attach file from my forum(1.1.4).

PS! Sorry for my bad english...
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 12, 2007, 08:09:45 AM
Hi NeLLISania, did u modify the file manually? I have checked the Search.php you attached here - more than 10 critical sections of code are missing/misplaced. If u like pm me your email address and I'll send the complete 1.1.4 Search.php to your mailbox.

Title: Re: Search Enhancement Mod
Post by: Richard Wing on October 12, 2007, 10:07:34 AM
Thanks for the offer wordzilla. I am sending the file through PM.

Richard Wing
Title: Re: Search Enhancement Mod
Post by: Richard Wing on October 12, 2007, 10:10:52 AM
Ok I guess thats not an option here. I am attaching it to this post.

Thanks for your time.
Richard Wing
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 12, 2007, 10:23:50 AM
hi Richard, it seems that you have Visual Verification Mod installed there, I guess that was the reason why u had to do a manual edit. :)

Well your Search.php is messed up, with 38 sections different from what it should have been. Lots of lines of code are misplaced and missing.


I'm attaching the correctly modified Search.php (for SMF 1.14) here for comparison/diagnosis purposes only, note that the mod will NOT work if you simply replace the original Search.php with this file - unless you have the mod installed.
Title: Re: Search Enhancement Mod
Post by: Richard Wing on October 12, 2007, 11:25:59 AM
Thanks for looking into this. Are you saying that you went through and fixed what I had? and that if I have the mod installed it will work if I upload this new search.php file?

If so will my other mods still work?

Also just so I know if my thinking is correct...

If I uninstall the Visual Verification Mod and try and install the Enhanced Search mod do you think it will work?

Thanks again for your time.
Richard Wing
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 12, 2007, 11:45:49 AM
No I was just saying a correctly modified Search.php (out of a virgin SMF 1.1.4 installation) should look exactly like the one i uploaded.

Quote
and that if I have the mod installed it will work if I upload this new search.php file?

I doubt it. Your visual verification mod might break if you upload the file directly to replace your current Search.php (which is almost entirely dysfunctional).

My suggestion for you is to manually edit visual verification mod based on your correctly modified Search.php as it'd be easier - but it's all up to you. I do not and cannot encourage you to uninstall any other mod that is not coded by myself. :)


Update: Just checked your forum, search seems to work pretty well, althou your visual verification mod might have broken.
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 15, 2007, 04:16:16 AM
Hmmm I'm not familiar with Turklord's dropdowns and I cant ascertain which language your site is in. :P

If you don't mind, attach your index.template.php and display.template.php here and I'll have a look :)
Title: Re: Search Enhancement Mod
Post by: Matthew Schenker on October 20, 2007, 07:12:31 AM
This looks excellent!  Improving the search function has been one of the constant requests on my forum!

I have the following modifications installed on my forum.  Do you see any conflicts:
YouTube BBC Tag (XHTML Compliant) 1.2
Rename Topic 1.0.2
MessagePreviewOnHover 1.5
FontandSizeDropdown 1.1
Member Color Link 2.0.0
EmailFlash 2.0
Ignore user 1.3
Inline Attachments 1.0.4.2
Image Popup 1.0
GoogleVideo BBCode by Yakuza 0.1
URL Popup 1.0

Thanks,
Matt
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 20, 2007, 07:40:50 AM
Thanks dannbass.

I had a look at your forum and Search template was properly modified and working. For the Search box on your TinyPortal, go have a look at L.G.S's Ruthless intent forum (http://www.ruthlessintent.com/board/index.php).

I see multiple mods have modified your index.template.php already and there's even a form field named "advenced" (should have been "advanced"?).


EDIT: wrt L.G.S's forum, registration is required to use the Search box.
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 20, 2007, 07:43:16 AM
Hi Matthew,

I have used none of the mods u mentioned above, did your package installer report any conflict? :)
Title: Re: Search Enhancement Mod
Post by: Matthew Schenker on October 20, 2007, 07:51:59 AM
Quote from: wordzilla on October 20, 2007, 07:43:16 AM
...did your package installer report any conflict? :)

Sorry, I should have been clearer.  I have not installed this package yet. 

I've learned it is often better to check in first and see if there are any known conflicts before installing!

While I have your attention: do you know if these features will be implemented in SMF 2.0?

Thanks!
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 20, 2007, 08:00:40 AM
Quotedo you know if these features will be implemented in SMF 2.0?

I have the latest SMF 2.0 beta 1.1 running here and from what I see the 2.0 Search function is only updated to support database abstraction plus fixing a few known bugs, that's all. So it's basically still SMF 1.1.4 search IMO. :)
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 20, 2007, 08:37:02 AM
I helped L.G.S with his Tinyportal search box a few months ago but I dont have his index.template.php at hand. So better send his a personal message. :)
Title: Re: Search Enhancement Mod
Post by: Qayyom Ashraf on October 22, 2007, 02:25:14 AM
after Installing of this MOD i face the attached problem,

please help me to remove code lines at the top of site.

if any senior member need admin ID n Password, i can give him
Title: Re: Search Enhancement Mod
Post by: ioszilla on October 22, 2007, 02:33:14 AM
Hi qayyom,

You need to edit \Themes\default\languages\Modifications.english.php to remove a redundant ?> at the end of the line(I believe).

If you need further help lemme know.  :)
Title: Re: Search Enhancement Mod
Post by: shiawasekun on October 24, 2007, 05:35:20 AM
I'm using Dilber MC theme. I tried the custom code insert to show the drop-down search box but it sort of distorted the theme.

Any help pls?
Title: Re: Search Enhancement Mod
Post by: SONSiVRi on November 11, 2007, 03:27:54 PM
Turkish support;

<!-- Turkish language -->
<file name="$themedir/languages/Errors.turkish.php" error="ignore">
<operation error="ignore">
<search position="end" />
<add><![CDATA[
$txt['error_search_string_small_words'] = 'Her kelime en az 2 harf uzunluğunda olmalıdır.';]]></add>
</operation>
</file>

<!-- Turkish language -->
<file name="$languagedir/Modifications.turkish.php" error="ignore">
<operation>
<search position="end" />
<add><![CDATA[
//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'Başlık numarası';
$txt['search_match_mode'] = 'Match Mode';
$txt['search_match_mode_whole'] = 'Tüm kelimeleri eşleştirme - az sonuç, az hata';
$txt['search_match_mode_smart'] = 'Akıllı eşleştirme - ortalama';
$txt['search_match_mode_any'] = 'Herhangi eşleştirme - fazla sonuç, fazla hata';

$txt['search_numReplies'] = 'Yanıtlar';
$txt['search_match_mode_whole_short'] = 'Tüm kelimeleri eşleştirme';
$txt['search_match_mode_smart_short'] = 'Akıllı eşleştirme';
$txt['search_match_mode_any_short'] = 'Herhangi eşleştirme';

$txt['result_summary'] = 'Arama özetini Göster/Gizle';

$txt['result_generated'] = 'Sonuçlar kullanılarak oluşturuldu: ';
$txt['zillarank'] = 'ZillaRank';

$txt['search_entireforum'] = 'Tüm Forumda';
$txt['search_thisbrd'] = 'Bu Bölümde';
$txt['search_thistopic'] = 'Bu başlıkta';
$txt['search_members'] = 'Kullanıcılarda';
$txt['search_entiresite'] = 'Tüm Sitede';

$txt['search_view_all'] = 'Hepsini göster';
$txt['search_match_criteria'] = 'mesaj bu başlıkta sizin aradığınıza uyuyor.';

$txt['search_go_to_top'] = 'Üste git';
$txt['search_go_to_top_single'] = 'Üst';
//END DC SMF Search Text Strings
]]></add>
</operation>
</file>
Title: Re: Search Enhancement Mod
Post by: SONSiVRi on November 11, 2007, 07:13:49 PM
Quote from: wordzilla on August 13, 2007, 02:19:25 PM
How to add quick search box to your Custom (non-default) SMF Theme

I have implemented wordzilla's tutorial for Dilber Multicolor (1.1 RC3)



EDIT: Your_Theme_Dir/index.template.php

Operation 1

Find:

Quote
   echo '
               <td valign="middle" height="30" style="padding-top:0px; padding-bottom:0px; padding-right:20px;" class="middletext" align="right">
            <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0px;">
               <a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0px;" alt="" /></a>
               <input type="text" name="search" value="" style="width: 190px;" />
               <input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
               <input type="hidden" name="advanced" value="0" />';

   // Search within current topic?
   if (!empty($context['current_topic']))
      echo '
               <input type="hidden" name="topic" value="', $context['current_topic'], '" />';

      // If we're on a certain board, limit it to this board ;).
   elseif (!empty($context['current_board']))
      echo '
               <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

   echo '
            </form>

               </td>
            </tr>
         </table>
      </div>
      <div class="menubar">
         <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>';
               // Show the menu here, according to the menu sub template.
                  template_menu();
      echo '
            </tr>
         </table>
      </div>';


Replace with:

Quote
   echo '
               <td valign="middle" height="30" style="padding-top:0px; padding-bottom:0px; padding-right:20px;" class="middletext" align="right">
            <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0px;">
               <a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0px;" alt="" /></a>
               <input type="text" name="search" value="" style="width: 190px;" />';
   echo DropDownQuickSearch();
   echo '
               <input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
               <input type="hidden" name="advanced" value="0" />';



   // If we're viewing a single topic
   if (!empty($context['current_topic']))
      echo '
                  <input type="hidden" name="acttopic" value="', $context['current_topic'], '" />';

   // If we're on a certain board
   if (!empty($context['current_board']))
      echo '
                  <input type="hidden" name="actbrd" value="', $context['current_board'], '" />';

   echo '
            </form>

               </td>
            </tr>
         </table>
      </div>
      <div class="menubar">
         <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>';
               // Show the menu here, according to the menu sub template.
                  template_menu();
      echo '
            </tr>
         </table>
      </div>';



Operation 2

ADD the following code to the END of the file (but before the ending ?> ):

Quotefunction DropDownQuickSearch ()
{
   global $context, $txt;

   // in order!!
   $Selections = array(
      'entireforum' => $txt['search_entireforum'],
      'thisbrd' => $txt['search_thisbrd'],
      'thistopic' => $txt['search_thistopic'],
      'members' => $txt['search_members'],
      // Google site search
      'entiresite' => $txt['search_entiresite']
   );

   $default = 'entireforum';
      
   if (empty($context['current_topic']))
      unset ($Selections['thistopic']);

   if (empty($context['current_board']))
      unset ($Selections['thisbrd']);
   
   $str = '
   <select name="search_selection">';
   
   foreach ($Selections as $selection => $title)
      $str .= '
         <option value="' . $selection . '"' . ($selection == $default ? ' selected="selected"' : '') . '>' . $title . ' </option>';
   
   $str .= '
   </select>&nbsp;';
   
   return $str;
}
Title: Re: Search Enhancement Mod
Post by: noelchiew on November 26, 2007, 04:14:57 AM
I'm using 1.1.4 with black theme copy of the core theme. Tried to follow the instructions above to edit the index.template.php file but got faced some issues. Firstly the drop down menu is missing. Secondly, I compared the advance search screenshot of yours and mine had some text missing. The text missing are 'Specific topic id' and 'match mode'.

Is the above only for Dilber MC theme? I tried switching to the default to see if everything is ok there. The first issue is the same, those text missing. There is a drop down menu but there are no choices inside to select. All white inside.
Title: Re: Search Enhancement Mod
Post by: noelchiew on November 26, 2007, 12:20:46 PM
I realised that one of the issue is due to the language. The mod appears on the default theme after changing the language to english before installing again.

However the mod does not appear to be in place in my own theme. I tried to follow the changes above and got an error about syntax. What should I change on my theme's index.template.php, index.php and style.css?
Title: Re: Search Enhancement Mod
Post by: TrueSatan on November 26, 2007, 08:21:11 PM
Hardly any mods install into custom themes automatically and anything bar the SMF default theme is a custom theme. For general details of how to install into custom themes:

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)
Title: Re: Search Enhancement Mod
Post by: Aileen on November 27, 2007, 06:28:09 PM
This is a great mod. But on installation I am having this error

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Search.php    Test successful
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Themes/default/Search.template.php    Test successful
4.    Execute Modification    ./Themes/default/style.css    Test successful
5.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.french.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.french.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Errors.spanish.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Test successful

I am using a dilber theme. Hope you can help me. thanks
Title: Re: Search Enhancement Mod
Post by: SONSiVRi on November 28, 2007, 06:47:21 AM
Quote from: will888 on November 27, 2007, 06:28:09 PM
This is a great mod. But on installation I am having this error

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Search.php    Test successful
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Themes/default/Search.template.php    Test successful
4.    Execute Modification    ./Themes/default/style.css    Test successful
5.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.french.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.french.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Errors.spanish.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Test successful

I am using a dilber theme. Hope you can help me. thanks

You should manually check modifications on "Themes/default/index.template.php"  will be made by this mod and you may correct the mod installation file according to your forum. It cant find exact pattern what its needed to modify.
Title: Re: Search Enhancement Mod
Post by: Aileen on November 28, 2007, 06:57:34 AM
That would be hard for me since I am not really a developer, just learn through forums
Title: Re: Search Enhancement Mod
Post by: noelchiew on November 28, 2007, 07:17:19 AM
Quote from: TrueSatan on November 26, 2007, 08:21:11 PM
Hardly any mods install into custom themes automatically and anything bar the SMF default theme is a custom theme. For general details of how to install into custom themes:

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)

Thanks, now I'm getting the hang of editing custom theme. Not very difficult to understand the smf-package-parser.
Title: Re: Search Enhancement Mod
Post by: Ambasador on December 14, 2007, 12:27:34 PM
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND NOT (t.isSticky = 1 AND t.locked = 1), , COUNT(*) / (t.numReplies + 1)) + 25' at line 5
File: /home/ocilicom/public_html/forum/Sources/Search.php
Line: 1916

I get this when searching form the search results page. When searching from the search block (index template), I have no problems. Could you tell me what to do to fix this?
Title: Re: Search Enhancement Mod
Post by: ioszilla on December 14, 2007, 12:36:34 PM
I think the problem has to do with missing variable $topic_without_enough_replies_penalty, probably you have a Search.php that was not properly modified.

Could you attach your Search.php here for me to have a look?
Title: Re: Search Enhancement Mod
Post by: Ambasador on December 15, 2007, 06:08:26 AM
I found the variable on line 280, but it might be that something was not properly modified. I attached the file.

Thanks in advance!
Title: Re: Search Enhancement Mod
Post by: ioszilla on December 15, 2007, 06:22:34 AM
Ambasador, it seems that you have visual verification mod installed and according to my diff report, there are quite a few missing/misplaced code blocks. Your current Search.php will not work properly.

I have attached my diff report for your reference. :)
Title: Re: Search Enhancement Mod
Post by: Ambasador on December 15, 2007, 09:37:53 AM
Thanx! I've commented (/**/) all the lines for visual verification, and now reports a bit less errors. Now I only get errors when searching from the action=search2 page, and they disappear when I refresh it.



Hey, seems like I solved it by commenting these lines:

// REF (see above) ATTN: wordzilla, LEFT_JOIN
// LEFT JOIN smf_tmp_log_search_topics AS lst ON (lst.ID_TOPIC = t.ID_TOPIC)
// WHERE t.ID_TOPIC = m.ID_TOPIC
// AND lsm.ID_MSG = m.ID_MSG AND lst.ID_TOPIC = t.ID_TOPIC

db_query("
INSERT IGNORE INTO {$db_prefix}log_search_results
(" . implode(', ', array_keys($main_query['select'])) . ")
SELECT
" . implode(',
', $main_query['select']) . "
FROM (" . implode(', ', $main_query['from']) . ')' . (empty($main_query['left_join']) ? '' : "
LEFT JOIN " . implode("
LEFT JOIN ", $main_query['left_join'])) . "
WHERE " . implode("
AND ", $main_query['where']) . (empty($main_query['group_by']) ? '' : "
GROUP BY " . implode(', ', $main_query['group_by'])) . (empty($modSettings['search_max_results']) ? '' : "
LIMIT $modSettings[search_max_results]"), __FILE__, __LINE__);

$_SESSION['search_cache']['num_results'] = db_affected_rows();*/
Title: Re: Search Enhancement Mod
Post by: ioszilla on December 15, 2007, 09:44:30 AM
hehe, i think you are messing up the entire script by commenting out lines that are really required for the Search.php to function. :P
Title: Re: Search Enhancement Mod
Post by: Ambasador on December 15, 2007, 10:25:26 AM
Well, the search still works ;-)
Title: Re: Search Enhancement Mod
Post by: MadTurki on December 23, 2007, 04:13:53 PM
Quote from: SONSiVRi on November 28, 2007, 06:47:21 AM
Quote from: will888 on November 27, 2007, 06:28:09 PM
This is a great mod. But on installation I am having this error

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Search.php    Test successful
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Themes/default/Search.template.php    Test successful
4.    Execute Modification    ./Themes/default/style.css    Test successful
5.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.french.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.french.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Errors.spanish.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Test successful

I am using a dilber theme. Hope you can help me. thanks

You should manually check modifications on "Themes/default/index.template.php"  will be made by this mod and you may correct the mod installation file according to your forum. It cant find exact pattern what its needed to modify.


I foolishly ignored this error and now I have:

Quote//Begin DC SMF Search Text Strings $txt['specific_topic_id'] = 'Specific topic id'; $txt['search_match_mode'] = 'Match Mode'; $txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise'; $txt['search_match_mode_smart'] = 'Smart matching - balanced'; $txt['search_match_mode_any'] = 'Match any sequence - most results, most noise'; $txt['search_numReplies'] = 'Replies'; $txt['search_match_mode_whole_short'] = 'Match whole words only'; $txt['search_match_mode_smart_short'] = 'Smart matching'; $txt['search_match_mode_any_short'] = 'Match any sequence'; $txt['result_summary'] = 'Show/hide result summary'; $txt['result_generated'] = 'Results generated using '; $txt['zillarank'] = 'ZillaRank'; $txt['search_entireforum'] = 'Entire Forum'; $txt['search_thisbrd'] = 'This board'; $txt['search_thistopic'] = 'This topic'; $txt['search_members'] = 'Members'; $txt['search_entiresite'] = 'Entire Site'; $txt['search_view_all'] = 'View all'; $txt['search_match_criteria'] = 'posts in this topic that match your search criteria'; $txt['search_go_to_top'] = 'Go to Top'; $txt['search_go_to_top_single'] = 'Top'; //END DC SMF Search Text Strings

Written across the top of my page... I uninstalled the mod and got no resaults ....  wtg me.  Any suggestions?
Title: Re: Search Enhancement Mod
Post by: Ambasador on December 24, 2007, 05:44:08 PM
seems like you havent cloesd the PHP part of the script somewhere, search for that text in your index.template, and make sure there is a '; before it if html was written before.
Title: Re: Search Enhancement Mod
Post by: ioszilla on December 24, 2007, 10:13:38 PM
MadTurki, go have a look in: /Themes/default/languages/Modifications.english.php

Remove everything from "//Begin DC SMF Search Text Strings" to "//END DC SMF Search Text Strings"
Title: Re: Search Enhancement Mod
Post by: MadTurki on December 26, 2007, 11:56:53 AM
Thanks a millions...  I was searching through every file I could think of to find it.  All gone now!  Thanks
Title: Re: Search Enhancement Mod
Post by: falguni1 on December 28, 2007, 11:03:28 AM
getting error

1.     Execute Modification     ./Sources/Search.php     Test successful
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Themes/default/Search.template.php    Test successful
4.    Execute Modification    ./Themes/default/style.css    Test successful
5.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.french.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.french.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Errors.spanish.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Test successful

wot to do.
Title: Re: Search Enhancement Mod
Post by: ioszilla on December 29, 2007, 01:47:31 PM
Modify your index.template.php manually. :)
Title: Re: Search Enhancement Mod
Post by: falguni1 on December 30, 2007, 05:51:54 AM
Quote from: wordzilla on December 29, 2007, 01:47:31 PM
Modify your index.template.php manually. :)

how to modify.
Title: Re: Search Enhancement Mod
Post by: TrueSatan on December 30, 2007, 06:23:19 AM
Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

[url]http://www.smfhacks.com/smf-package-parser.htm
Title: Re: Search Enhancement Mod
Post by: falguni1 on December 30, 2007, 06:29:13 AM
I am using default theme.
Title: Re: Search Enhancement Mod
Post by: TrueSatan on December 30, 2007, 06:50:05 AM
You need to manually edit the file...the links I gave show you details of how to do installs by manually editing the files.
Title: Re: Search Enhancement Mod
Post by: daragor on January 11, 2008, 11:32:33 AM
hi wordzilla, your mod is great!. i need your help. but my english is poor.

i install the mod in my forum, with the theme overview. work fine! but i have a problem with the search in "this forum" and "in this topic", please see here:

http://www.webscom.com.ar/foro/index.php

and if u can, tell me which is the problem. thx, sorry for my english mate i speak spanish.
Title: Re: Search Enhancement Mod
Post by: ioszilla on January 14, 2008, 08:48:24 AM
Hi daragor,

Perhaps your index.template.php was not properly modified (guess u had to manually modify it since it's not the default theme).

The following code might have been missing in your index.template.php:


// If we're viewing a single topic
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="acttopic" value="', $context['current_topic'], '" />';

// If we're on a certain board
if (!empty($context['current_board']))
echo '
<input type="hidden" name="actbrd" value="', $context['current_board'], '" />';
Title: Re: Search Enhancement Mod
Post by: jacbier on February 01, 2008, 03:12:24 PM
wordzilla,

Thank you for this mod. It is working perfectly on my forum!

Keep up the great work!
Title: Re: Search Enhancement Mod
Post by: Slack on February 04, 2008, 11:58:07 PM
I get this error when trying to install?

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Search.php    Test failed
2.    Execute Modification    ./Themes/default/index.template.php    Test successful
3.    Execute Modification    ./Themes/default/Search.template.php    Test successful
4.    Execute Modification    ./Themes/default/style.css    Test successful
5.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.french.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.french.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Errors.spanish.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Test successful

Title: Re: Search Enhancement Mod
Post by: briankstan on February 05, 2008, 05:23:29 PM
help,  I installed this mod,   Finally got it added to my custom theme.   I tried a test search and all I get is a blank white screen, no error just a blank white screen.

can someone please help me with this?   I'd appreciate it very much.

here is my info:
website:  www.saltlakemini-z.com/forum/index.php

I've also attached my index.template.php file and my search.tempalate.php file. 

I think it's the search.template.php file that is causing this.   I replace with an earlier version and the search works, but not the way it should be.   attached is the one that isn't working.
Title: Re: Search Enhancement Mod
Post by: briankstan on February 06, 2008, 07:03:48 PM
just to inform everyone,  I have solved my issues.   apparently it was just some wierd code thing.  I had the code right, but I added it in using Wordpad and it didn't like it.

I was reading through some other topic and saw someone post that.  I downloaded Context and used it to add in the correct functions and now it's working.  great.

this is a great mod.   thanks.
Title: Re: Search Enhancement Mod
Post by: john34516 on February 07, 2008, 02:11:34 PM
i get that error

Type     Action     Description
1.    Execute Modification    ./Sources/Search.php    Test failed
2.    Execute Modification    ./Themes/default/index.template.php    Test failed
3.    Execute Modification    ./Themes/default/Search.template.php    Test successful
4.    Execute Modification    ./Themes/default/style.css    Test successful
5.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Errors.french.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.french.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Errors.spanish.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Test successful

i try to modify the search.php manually but cant find some things

i upload my search.php to help me if you can
Title: Re: Search Enhancement Mod
Post by: Slack on February 07, 2008, 02:29:18 PM
John34515,

Not sure what other mods you may have installed, this may not work for you.  But I uploaded a fresh Search.php file from the SMF 1.1.4 archive and the search mod installed without an error to that file.
Title: Re: Search Enhancement Mod
Post by: fgoc on February 16, 2008, 10:17:04 AM
Hi,
Have installed this mod - had an error on install with the Shearch.php file so have manually editted this.

After entering a search string clicking the SEARCH button I'm now getting the error

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND NOT (t.isSticky = 1 AND t.locked = 1), , COUNT(*) / (t.numRe
File: /xxxx/xxxx.co.uk/www/forum/Sources/Search.php
Line: 1858"

Any help appreciated! Thanks in advance
Title: Re: Search Enhancement Mod
Post by: fgoc on February 20, 2008, 01:21:04 PM
OK - have also now installed this mod on a fresh 1.1.4 install and have missing drop downs on the advanced search page (as per attached screenshot) The top quicksearch drop down is missing and the 2 on the main search page. Any ideas how to rectify? This happens using IE6, IE7 & Firefox.

index.template & search.template files also attached
Title: Re: Search Enhancement Mod
Post by: Chan Kong-sang on February 22, 2008, 12:54:10 PM
Quote//Begin DC SMF Search Text Strings $txt['specific_topic_id'] = 'Specific topic id'; $txt['search_match_mode'] = 'Match Mode'; $txt['search_match_mode_whole'] = 'Match whole words only - least results, least noise'; $txt['search_match_mode_smart'] = 'Smart matching - balanced'; $txt['search_match_mode_any'] = 'Match any sequence - most results, most noise'; $txt['search_numReplies'] = 'Replies'; $txt['search_match_mode_whole_short'] = 'Match whole words only'; $txt['search_match_mode_smart_short'] = 'Smart matching'; $txt['search_match_mode_any_short'] = 'Match any sequence'; $txt['result_summary'] = 'Show/hide result summary'; $txt['result_generated'] = 'Results generated using '; $txt['zillarank'] = 'ZillaRank'; $txt['search_entireforum'] = 'Entire Forum'; $txt['search_thisbrd'] = 'This board'; $txt['search_thistopic'] = 'This topic'; $txt['search_members'] = 'Members'; $txt['search_entiresite'] = 'Entire Site'; $txt['search_view_all'] = 'View all'; $txt['search_match_criteria'] = 'posts in this topic that match your search criteria'; $txt['search_go_to_top'] = 'Go to Top'; $txt['search_go_to_top_single'] = 'Top'; //END DC SMF Search Text Strings
I'm quite sure this is a bug in the installation... i got it too. You can easily fix it by yourself.

SOLUTION
Open ./Themes/default/languages/Modifications.english.php
put the ?> at the end of the file (it's above //Begin DC SMF Search Text Strings)
Title: Re: Search Enhancement Mod
Post by: Skuzzy on March 18, 2008, 02:12:53 PM
Silly question.

The panel for this mod appears to be the same exact one that ships with SMF 1.1.4.

Is this mod built into 1.1.4 or does it simply use the 1.1.4 search panel?

I am only considering this mod as the search function that ships with 1.1.4 appears to have a problem when you try to sort by date.  It doesn't.  All of the other search sort options work, but not by date, which is rather debilitating for many searches.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on March 18, 2008, 06:03:44 PM
How can i change the search to google instead of www.mysite.com through google?


Btw, this is one of the best mods i have installed, and i have many ;)
Title: Re: Search Enhancement Mod
Post by: Skuzzy on March 19, 2008, 09:07:02 AM
Quote from: FragaCampos on March 18, 2008, 06:03:44 PM
How can i change the search to google instead of www.mysite.com through google?


Btw, this is one of the best mods i have installed, and i have many ;)

Maybe you can tell me.  Does sorting the search results by date work? 
Title: Re: Search Enhancement Mod
Post by: FragaCampos on March 19, 2008, 09:40:41 AM
What i want is: i can choose 3 options from the drop down menu -  entire forum, members, and entire site. I f i choose "entire site" it will search for the words i want in google, but only inside my site. I would lke to know what can be done to search in google, but not restricted to my site. Thanks.
Title: Re: Search Enhancement Mod
Post by: Skuzzy on March 21, 2008, 06:06:15 PM
Anyone have any idea about the sort option?  I would hate to try and install this mod if the one in 1.1.4 is the same thing.
Title: Re: Search Enhancement Mod
Post by: Skuzzy on March 24, 2008, 08:06:17 AM
Ok, last time I will bump this.  Is there anyone who knows if this is the same search that is incorporated into 1.1.4? 

If not, does it fix the 'sort by date' option?
Title: Re: Search Enhancement Mod
Post by: ioszilla on March 24, 2008, 08:13:09 AM
sort by date works pretty well here:  http://www.donationcoder.com/Forums/bb/index.php?action=search2;search=donation
Title: Re: Search Enhancement Mod
Post by: ioszilla on March 24, 2008, 08:16:41 AM
Quote from: fgoc on February 20, 2008, 01:21:04 PM
OK - have also now installed this mod on a fresh 1.1.4 install and have missing drop downs on the advanced search page (as per attached screenshot) The top quicksearch drop down is missing and the 2 on the main search page. Any ideas how to rectify? This happens using IE6, IE7 & Firefox.

Hmm.. the mod was tested to work with fresh 1.1.3/1.1.4 installation + default theme.
Title: Re: Search Enhancement Mod
Post by: ioszilla on March 24, 2008, 08:20:28 AM
Quote from: Skuzzy on March 19, 2008, 09:07:02 AM
Quote from: FragaCampos on March 18, 2008, 06:03:44 PM
How can i change the search to google instead of www.mysite.com through google?


Btw, this is one of the best mods i have installed, and i have many ;)
Maybe you can tell me.  Does sorting the search results by date work? 

It's always recommended that you play with a mod in a non-production environment (e.g. local LAMP) before you decide to install it on a live forum.
Title: Re: Search Enhancement Mod
Post by: Skuzzy on March 25, 2008, 08:51:33 AM
wordzilla, appreciate the responses.  I do not mind trying a mod, but the fundamental question I still have is as follows:

Is this mod the same search function that is included in SMF 1.1.4?  I ask, as the search panel appears to be the exact same one.  I have multiple issues now with the one that ships with SMF 1.1.4.

1)  Search by topics does not find all the topics, and on many cases fins nothing, even when I make the post and then search for it immedaitely afterwards.

2)  The advanced search does not sort by date when asked to.  All other sort option work.

Now this may all be due to us using MySQL 3.23.xx.  I am stuck with that version due to the enormoous amount of software we have on that version.  Migrating to newer versions of MySQL is simply too risky as there seems to be some confusion as to how many things are actually not backward compatible in the newer versions of MySQL.

I am more than happy to install and test this, as long as it is a different version than what ships with SMF 1.1.4.  I just do not want to waste time if this is the same as what ships with SMF 1.1.4.
Title: Re: Search Enhancement Mod
Post by: ioszilla on March 25, 2008, 09:10:05 AM
Quote from: Skuzzy on March 25, 2008, 08:51:33 AM
Is this mod the same search function that is included in SMF 1.1.4?  I ask, as the search panel appears to be the exact same one.  I have multiple issues now with the one that ships with SMF 1.1.4.

Yes, it's just a mod to smf's search function, albeit a major improvement over the original one. (IMO :P)

Quote from: Skuzzy on March 25, 2008, 08:51:33 AM
1)  Search by topics does not find all the topics, and on many cases fins nothing, even when I make the post and then search for it immedaitely afterwards.

2)  The advanced search does not sort by date when asked to.  All other sort option work.

Now this may all be due to us using MySQL 3.23.xx.  I am stuck with that version due to the enormoous amount of software we have on that version.  Migrating to newer versions of MySQL is simply too risky as there seems to be some confusion as to how many things are actually not backward compatible in the newer versions of MySQL.

My search mod makes heavy use of the MySQL fulltext search function, which is not provided in MySQL 3.x versions. Since I have done absolutely no testing of the mod with MySQL 3.x, I can't say for sure whether the mod will work or not. Even if works you might find it hardly justifies the time, efforts and risks without being able to take adv of the ranking algorithm of this mod. :(
Title: Re: Search Enhancement Mod
Post by: Skuzzy on March 26, 2008, 08:53:28 AM
Thank you for the response. 

Hmmm.  So, my overall issues may be with the version of MySQL then.  I wish there was some way to upgrade without breaking everything else.  I guess I am stuck.
Title: Re: Search Enhancement Mod
Post by: saosangmo on March 26, 2008, 10:03:06 AM
hi wordzilla, I wonder if you modify this mod for SMF 2.0?
Title: Re: Search Enhancement Mod
Post by: ioszilla on March 26, 2008, 10:14:33 AM
Quote from: saosangmo on March 26, 2008, 10:03:06 AM
hi wordzilla, I wonder if you modify this mod for SMF 2.0?

It's possible, after the official release of SMF 2.0. SMF 2 looks v sexy BUT it seems to me that its database abstraction will add significant complexity to this search mod.
Title: Re: Search Enhancement Mod
Post by: ivo2296 on March 28, 2008, 04:25:37 PM
Hi,
i have small error in forum's log:
http://www.mydomain.com/index.php?action=search2
8: Undefined index: username
file: /home/xxx/public_html/Sources/Search.php
line: 2292

Any ideas?

Thanks!
Title: Re: Search Enhancement Mod
Post by: Skuzzy on April 09, 2008, 01:46:05 PM
Well, I am in a position to install this mod and try it to see if it will fix the topic search problems I am having with the stock 1.1.4 search.

But I get an error when I try to install it, failing on Sources/Search.php

Here are the mods I currentl have installed.
--
Default Membergroup on Registration
Max Subject Length
Previous and Next Page Links for Page Index
Global Headers and Footers
Signature Settings Mod
SMF 1.1.4 Search "brd" Bug Fix (1.0.1)
Group Moderators
User Post Limit Options
Remove Quoted Images
Title: Re: Search Enhancement Mod
Post by: ioszilla on April 09, 2008, 01:49:49 PM
SMF 1.1.4 Search "brd" Bug Fix (1.0.1) conflicts with this mod
Title: Re: Search Enhancement Mod
Post by: Skuzzy on April 09, 2008, 06:15:15 PM
If I remove that 'brd' mod, and install your mod, will the fix that the 'brd' mod did still be covered?
Title: Re: Search Enhancement Mod
Post by: Skuzzy on April 11, 2008, 04:15:35 PM
Ok, I went ahead and tried this mod.  It did not seem any better than the original mod with the problem I have.

The problem is the search cannot find any topics older than the day we migrated over from vbulletin.  This leaves out about 2.5 millions posts.  I got the body searches to work fine by rebuilding the table indices.

I even tried making the 'subject' column a FULLTEXT type and rebuilt the index again, but it made no difference.  Anyone know the trick to getting topic searches working for a preexisting database that has been brough over into SMF 1.1.4?
Title: Re: Search Enhancement Mod
Post by: spiros on May 01, 2008, 03:18:42 PM
Is it possible for the site search option to have one's Google Adsense for search code?
Title: Re: Search Enhancement Mod
Post by: sorosh1 on May 14, 2008, 11:03:32 AM
Thanks for no help! >:(  I already fixd it! Finally, without any help!
Title: Re: Search Enhancement Mod
Post by: spiros on June 14, 2008, 07:46:21 PM
Is it possible for the Show/hide results summary to be shown by default?
Title: Re: Search Enhancement Mod
Post by: Migraine on July 17, 2008, 12:56:59 AM
Does this mod work with 1.1.5?
Title: Re: Search Enhancement Mod
Post by: SONSiVRi on July 17, 2008, 09:27:01 PM
Quote from: Migraine on July 17, 2008, 12:56:59 AM
Does this mod work with 1.1.5?

In my 1.1.5, yes its working.
Title: Re: Search Enhancement Mod
Post by: Migraine on July 18, 2008, 01:36:30 PM
Thanks SONSiVRi... :)
Title: Re: Search Enhancement Mod
Post by: Nibogo on July 27, 2008, 12:31:57 AM
"Error in Package Installation"

In my localhost a smf system without any mod
Title: Re: Search Enhancement Mod
Post by: Migraine on July 28, 2008, 04:08:18 PM
On a clean install of 1.1.5 I am unable to get this mod to work.  The test installation has failed in Sources/Search.php .

I had this same problem with two other SMF forums I run, but then  reverted to the 1.1.4 version of Sources/Search.php and the mod is working fine for each -- even with several mods.

However, when reverting to the 1.1.4 Sources/Search.php on the clean install, the mod will not work.

Bummer...  :(

Title: Re: Search Enhancement Mod
Post by: SONSiVRi on August 02, 2008, 07:00:39 AM
Quote from: Migraine on July 28, 2008, 04:08:18 PM
On a clean install of 1.1.5 I am unable to get this mod to work.  The test installation has failed in Sources/Search.php .

I had this same problem with two other SMF forums I run, but then  reverted to the 1.1.4 version of Sources/Search.php and the mod is working fine for each -- even with several mods.

However, when reverting to the 1.1.4 Sources/Search.php on the clean install, the mod will not work.

Bummer...  :(

I made this mod while I am running 1.1.4 then I upgraded forum to 1.1.5
Maybe taking a look my search.php (working on 1.1.5) will help you.
Title: Re: Search Enhancement Mod
Post by: Migraine on August 02, 2008, 09:07:36 PM
Thanks Sonsivri... I tried your search.php file, but am still getting the message ./Sources/Search.php test failed...

~M
Title: Re: Search Enhancement Mod
Post by: Migraine on August 02, 2008, 09:24:31 PM
I tried the copy of the file from my other/original pre-clean install and that seemed to do the trick... not sure why though since it (the mod) didn't work on the pre-clean install... LOL  Must be my lucky day.  ;)

Thanks!!
Title: Re: Search Enhancement Mod
Post by: knarf32222 on August 19, 2008, 05:22:27 AM
Excuse me.How to make this mod to work as follow?
When someone enter any topic, the search filter will changes to "This topic" automatically.
Title: Re: Search Enhancement Mod
Post by: knarf32222 on August 19, 2008, 09:44:01 PM
Quote from: knarf32222 on August 19, 2008, 05:22:27 AM
Excuse me.How to make this mod to work as follow?
When someone enter any topic, the search filter will changes to "This topic" automatically.
I already find how to do this.
Just do as follow.

find index.xml

if (empty($context['current_topic']))
unset ($Selections['thistopic']);

if (empty($context['current_board']))
unset ($Selections['thisbrd']);

replace
if (empty($context['current_board']))
unset ($Selections['thisbrd']);
else $default = 'thisbrd';

if (empty($context['current_topic']))
unset ($Selections['thistopic']);
else $default = 'thistopic';
Title: Re: Search Enhancement Mod
Post by: Antechinus on August 24, 2008, 09:53:47 PM
There was a question earlier in the thread about running this mod with Tiny Portal. I've just set it up on a test forum running 1.1.5 with TP 0.983 and it seems to work perfectly.

The trick is to alter the install.xml file to remove the alterations to default/index.template.php and to overwrite your 1.1.5 Search.php with a copy of the 1.1.4 file.

If you do both these things before installing the mod it goes smoothly. You then just edit your index.template.php manually and you're good to go.

Just for the hell of it (and because some of my custom themes aren't suited to the same positioning of the search box form ) I also edited BoardIndex.template.php and Display.template.php and MessageIndex.template.php so that the search form displays in my customised Info Center and below the "Jump to" form in both the display and message views. Very handy.
Title: Re: Search Enhancement Mod
Post by: yrfoxtaur on October 23, 2008, 06:57:11 PM
would be nice if wordzilla would update this now that 1.1.6 is out
Title: Re: Search Enhancement Mod
Post by: Antechinus on October 25, 2008, 04:37:39 PM
It would, but as I mentioned it is very easy to get this mod to install and run with 1.1.6.
Title: Re: Search Enhancement Mod
Post by: jamji on October 28, 2008, 07:23:30 PM
Quote from: spiros on May 01, 2008, 03:18:42 PM
Is it possible for the site search option to have one's Google Adsense for search code?

I also need to know about this. Anyone with an answer??
Title: Re: Search Enhancement Mod
Post by: vladimir - sv on November 13, 2008, 08:49:43 PM
I can't get this mod to work in 1.1.7, any suggestions?.

This is my search.php (where the parser fails).

Thanks!.
Title: Re: Search Enhancement Mod
Post by: Antechinus on November 14, 2008, 02:10:20 PM
Get a fresh copy of the 1.1.4 Search.php and overwrite your current file with it. The mod will then install without problems. I've already mentioned this in this thread a couple of times.

Since the mod was designed for 1.1.4 it looks for the 1.1.4 file's code. If it doesn't find that it throws up an error. I've attached a copy of the 1.1.4 file.
Title: Re: Search Enhancement Mod
Post by: phpshiva on January 19, 2009, 08:28:44 AM
i installed this and workd great but i seem to not getting board and topic in the dropdown all codes are there

how can i fix that?

smf 1.1.7

thanks
Title: Re: Search Enhancement Mod
Post by: TechPrince on January 22, 2009, 11:12:39 PM
Modification needed for 1.1.7.
Title: Re: Search Enhancement Mod
Post by: Antechinus on January 23, 2009, 12:08:22 AM
Already dealt with several times in this thread. Read my previous posts. Kthnx.
Title: Re: Search Enhancement Mod
Post by: TechPrince on January 24, 2009, 05:23:49 PM
I read before i posted my first reply.
Actually i was saying modification needed in mod to be compatible with 1.1.7 Search.php. So the need to replace this file will be gone.
Title: Re: Search Enhancement Mod
Post by: ne.miguelito on January 25, 2009, 10:56:48 PM
I have SMF 1.1.7 and after all modifications appears this error:

QuoteParse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/nemigue/public_html/Sources/Search.php on line 1332

the code in this line is:

Quote$temp_str_1st = "LIKE '%" . strtr($subjectWord, array('_' => '\\_', '%' => '\\%', '\\\'' => ''')) . "%'";

please help-me because this mode is important for me by searching with '(apostrophe)

regards
Title: Re: Search Enhancement Mod
Post by: ioszilla on February 06, 2009, 04:39:36 PM
Ok, I've just updated this mod to 1.8.1.

Note: Fix a bug that caused searching with multiple quoted phrases to fail. Added Turkish lang support. New versioning scheme.

Thanks to mouser @ donationcoder.com for the bugfix and SONSiVRi @ SMF for the Turkish translation.  :D


Tested to work on SMF 1.1.8.

Also there SHOULD be no problem for you guys gettiing this to work on 1.1.5 - 1.1.7
Title: Re: Search Enhancement Mod
Post by: ioszilla on February 06, 2009, 04:49:36 PM
I encourage you guys to visit a site that has been using this mod since its creation: http://www.donationcoder.com/Forums/bb/index.php (http://www.donationcoder.com/Forums/bb/index.php)
(149k posts, 15.8k topics)

Hang around, do some search, get a feel. :)
Title: Re: Search Enhancement Mod
Post by: Nibogo on February 06, 2009, 05:29:49 PM
Would be really nice if you update the mod to SMF 2.0 RC1
Title: Re: Search Enhancement Mod
Post by: Antechinus on February 06, 2009, 10:40:50 PM
There is no problem getting it to work on 1.1.5 to 1.1.7 as long as you load a 1.1.4 Search.php first. This is very easy and has been mentioned several times in this thread so I don't understand if some people don't get it.

I agree with NIBOGO though. SMF 2 desperately needs this mod.  
Title: Re: Search Enhancement Mod
Post by: dcmouser on February 06, 2009, 10:53:20 PM
I've talked to wordzilla and it's enough work to migrate it to SMF2 that it's hard to get motivated to work on it unless there was some hope of getting it integrated into the official release.
Title: Re: Search Enhancement Mod
Post by: ioszilla on February 06, 2009, 11:00:06 PM
Quote from: Antechinus on February 06, 2009, 10:40:50 PM
There is no problem getting it to work on 1.1.5 to 1.1.7 as long as you load a 1.1.4 Search.php first.

In 1.1.5 actually there is a single line fix to address the well known 'brd' is_array bug, just enough to make it incompatible with previous version of this mod. However search.php is same for all 1.1.5 - 1.1.8 releases (except for the version number in the header).

Quote from: Antechinus on February 06, 2009, 10:40:50 PM
I agree with NIBOGO though. SMF 2 desperately needs this mod.  

I havent got around to seriously study SMF2, but the SMF 2 search looks quite complicated to me, with all that db abstraction, api, and stuff. I'm rly kinda hoping to find people here who might be willing to team up and 'port' this mod to SMF 2.
Title: Re: Search Enhancement Mod
Post by: Antechinus on February 06, 2009, 11:51:42 PM
Yup, I know about the bug fix but I find it easier to load a 1.1.4 file than to edit the later files. Either way will work. :)

I'd be happy to help test an updated version for SMF 2 but my coding knowledge is currently not sufficient to be much help in developing the thing.
Title: Re: Search Enhancement Mod
Post by: andyv123 on February 09, 2009, 05:07:11 PM
I installed the mod and love it! Just wondering, how do you get the member search on the same page as the board search on your site  ???
Title: Re: Search Enhancement Mod
Post by: ioszilla on February 09, 2009, 08:17:00 PM
Quote from: andyv123 on February 09, 2009, 05:07:11 PM
I installed the mod and love it! Just wondering, how do you get the member search on the same page as the board search on your site  ???

I think it's a customized template by the admin of the site and is not a part of this mod. :)
Title: Re: Search Enhancement Mod
Post by: jak6868 on February 11, 2009, 09:29:07 PM
I'm getting this error with SMF 1.1.8:
It installed fine, no error messages. But when I execute a search, I get this:

Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /home/content/j/a/k/jak68/html/wordhack/Sources/Search.php on line 616

It also uninstalls fine and then the original search box works normally.

I did a compare of the original search.php from the installation package, with what i have now, and they are identical. So I havent a clue whats wrong...

These are my mods:
Mod Name Version 
1. SMF 1.0.16 / 1.1.8 Update 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
2. Anti-Spam Verification Questions 1.02   [ Uninstall ] [ List Files ] [ Delete ] 
3. SMF Arcade 2.0.17   [ Uninstall ] [ List Files ] [ Delete ] 
4. Smf Logo Clickable 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
5. SimplePortal 2.1.1   [ Uninstall ] [ List Files ] [ Delete ] 
6. Drafts (for 1.1.x) 1.08   [ Uninstall ] [ List Files ] [ Delete ] 
7. Add PM Info To Header (v1.1) 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
8. Enhanced Quick Reply Box 2.0.2 2.0.2   [ Uninstall ] [ List Files ] [ Delete ] 
9. Attachments Positioning 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
10. Aeva ~ Auto-Embed Video & Audio 5.2.56   [ Uninstall ] [ List Files ] [ Delete ] 
11. Word Description 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
12. Skype Integration 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
13. Google Talk Field 1.0.6   [ Uninstall ] [ List Files ] [ Delete ] 
14. Add Domaintools to TrackIP 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
15. Signature Area BBCode Buttons 1.5   [ Uninstall ] [ List Files ] [ Delete ] 
16. Enhanced Forum Statistics 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
17. Trim Url 1.0.2   [ Uninstall ] [ List Files ] [ Delete ] 
18. Select All And Copy Code To Clipboard 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
19. Wikipedia BBCode 1.3   [ Uninstall ] [ List Files ] [ Delete ] 
20. Prettier_Quotes 1.12   [ Uninstall ] [ List Files ] [ Delete ] 

Title: Re: Search Enhancement Mod
Post by: ioszilla on February 11, 2009, 11:13:20 PM
what's the version of your php, jak6868?

Note: I think dcmouser has found the problem.
See: http://us2.php.net/foreach (http://us2.php.net/foreach)

QuoteAs of PHP 5, you can easily modify array's elements by preceding $value with &. This will assign reference instead of copying the value.

So probably it is not supported in php 4

I'll upload new mod to make it compatible with php 4 soon.
Title: Re: Search Enhancement Mod
Post by: ioszilla on February 11, 2009, 11:45:02 PM
Done, new mod ver 1.8.2 is there. Nothing to do with bugfixes or features, just minor changes to make it work properly with php4. If you are already using php5 and 1.8.1 then there's no need to apply this.  :D
Title: Re: Search Enhancement Mod
Post by: jak6868 on February 13, 2009, 12:18:34 PM
Quote from: wordzilla on February 11, 2009, 11:45:02 PM
Done, new mod ver 1.8.2 is there. Nothing to do with bugfixes or features, just minor changes to make it work properly with php4. If you are already using php5 and 1.8.1 then there's no need to apply this.  :D

hi wordzilla, yup I had php4, I'm trying out the new version...  update, worked, thanks
Title: Re: Search Enhancement Mod
Post by: PHPLearner on May 05, 2009, 12:50:52 AM
Just wondering what I need to edit to make the default search for "Match Any Sequence" From the Drop Down "Entire Forum", I already got it for the search tab , Thanks A bunch!!
Title: Re: Search Enhancement Mod
Post by: Retired_PS on May 24, 2009, 11:54:03 PM
Tried 1.8.2 with SMF 1.1.8 and initially had an empty drop-down box. I realized my other mod issues were due to my board being in English-utf8, so I switched to English and reinstalled it. Works great! Thank you wordzilla!
Title: Re: Search Enhancement Mod
Post by: Shark-Time on August 01, 2009, 11:12:04 PM
Not working for me???

give some ERROR

Fatal error: Call to undefined function DropDownQuickSearch() in /home/giantwa/public_html/Sources/Load.php(2022) : eval()'d code on line 448

Help!!
Title: Re: Search Enhancement Mod
Post by: Antechinus on August 01, 2009, 11:17:28 PM
You're using a custom theme and have not edited your index.template to call the search form code. Follow the instructions from the mod parser on the download page.
Title: Re: Search Enhancement Mod
Post by: Shark-Time on August 01, 2009, 11:23:02 PM
Well i removed this mod...will concentrate on it later...Thanks for the input..
Title: Re: Search Enhancement Mod
Post by: milicik on August 15, 2009, 05:33:03 AM
I like this mode.

I installed and all works in defult theme. I also edit style.css and Search.template.php in my costum theme


but don't know to set index.template.php ... i tried 10 times and nothing. If someone can help me file is in attachments
Title: Re: Search Enhancement Mod
Post by: Antechinus on August 15, 2009, 05:18:51 PM
Which theme is it and where do you want the search form to show?
Title: Re: Search Enhancement Mod
Post by: milicik on August 15, 2009, 05:31:35 PM
Quote from: Antechinus on August 15, 2009, 05:18:51 PM
Which theme is it and where do you want the search form to show?

RocketTheme InternetGazette

I want search to be on the same place only i wont to user can chose,  entrie site ,members,  this broad or this topic
Title: Re: Search Enhancement Mod
Post by: Antechinus on August 15, 2009, 07:05:15 PM
Got a link to that theme? I can't bring it up on a search of the theme site. It'd be better if I could throw it on my local host for live testing of the edit.
Title: Re: Search Enhancement Mod
Post by: milicik on August 27, 2009, 07:34:03 AM
Can you made in index.template.php when member search something to always be Entire Site. Not sometimes This board. Tnx
Title: Re: Search Enhancement Mod
Post by: milicik on August 29, 2009, 12:55:59 PM
Quote from: milicik on August 27, 2009, 07:34:03 AM
Can you made in index.template.php when member search something to always be Entire Site. Not sometimes This board. Tnx
Title: Re: Search Enhancement Mod
Post by: meinit on September 23, 2009, 03:45:54 PM
Hi,

I've tried using this mod but it keeps failing the test for /Sources/Search.php.  I've tried changing Search.php from v115 back to v114 and still get the error.  I've also tried using v1.8.1 of the mod instead of v1.8.2 and still no luck.  There are no custom themes on the forum.

Thanks in advance.
Title: Re: Search Enhancement Mod
Post by: meinit on September 23, 2009, 03:58:25 PM
Ahem..... :-[

Forgot to add that I am using SMF 1.1.10.
Title: Re: Search Enhancement Mod
Post by: meinit on September 25, 2009, 09:38:27 PM
OK, so I've been doing a lot of digging into the files manually and, it seems that the previous webmaster attempted this option before and then abandoned it.  There are bits and pieces of the code from this mod in the files already.  I'm abandoning this for now.
Title: Re: Search Enhancement Mod
Post by: Antechinus on September 25, 2009, 11:21:55 PM
In that case I would suggest getting a fresh 1.1.10 copy of the file and overwriting your bodged up file with the fresh one. Keep a backup copy of the current file just in case though.
Title: Re: Search Enhancement Mod
Post by: meinit on September 26, 2009, 05:43:36 AM
Thanks for the advice :D
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 26, 2009, 05:49:08 AM
Thanks a lot Antechinus. Any one interested in porting this to smf 2.0? :D
Title: Re: Search Enhancement Mod
Post by: meinit on September 26, 2009, 08:46:44 AM
OK, so the above suggestion worked a treat and this mod is now fully functional on the forum.

Thanks to Antechinus for the suggestion, much appreciated :)  Thanks to ioszilla for the mod  :D 

Title: Re: Search Enhancement Mod
Post by: Antechinus on September 26, 2009, 05:01:42 PM
Meinit, you're welcome. :)

I would absolutely love for someone to port this to 2.0. One of the things I am dreading about the move to 2.0 is being back with the standard SMF search.
When it comes to doing it myself the problem is that I'm damned sure my coding abilities are not up to it. I may be able to help out, but I'm far from being able to do the whole job.
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 27, 2009, 12:14:54 AM
ic Antechinus. Well your help will certainly be appreciated on this mod!! :)

I'm contemplating on starting to work on the 2.0 mod from next Wednesday after a review of the new 2.0 search code last night. A lot of hassle indeed but should not be excessively difficult in getting the mysql db support done first (and leaving out postgresql, sqlite for later).

I have right now two small requests:
1. Could you (or anyone) point me to a good documentation/discussion of the new 2.0 search scheme (more details the better)?
2. A SMF test forum/database with a reasonable amount of posts (e.g. a few thousands) for me to test the new mod on

thx


Edit: Attached a side by side diff report of Search.php between SMF 1 and 2.
Title: Re: Search Enhancement Mod
Post by: Antechinus on September 27, 2009, 12:26:16 AM
Ok, I can get you a test site easily enough but at this stage it will have to be RC1 as I can't release access to dev builds under the team agreement. Will have to check if there are significant db changes for RC2. Obviously there are going to be a mass of template changes and some in Sources as well. I assume you wouldn't actually be aiming to produce an RC1 version of the mod at this stage. Just use RC1 for rough testing.

Question: wouldn't it be a lot quicker and easier to test this on a local? All you'd need is a suitable db backup to restore and off you go. 
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 27, 2009, 12:45:25 AM
Yup. I have local wamp all set up and ready, Actually a suitable db with a reasonable number of posts is all I need -- however as you know I don't host any forum myself it has to come from someone..

This particular mod has a built-in search ranking system that's a lot different than the official SMF one, of which I'm sure you are aware. The ranking system has to be tested as well, and preferably on a "natural" smf db with tons of posts.


btw, if I can get on the right track with this I think I should be able to release an alpha by mid Oct or earlier.
Title: Re: Search Enhancement Mod
Post by: Antechinus on September 27, 2009, 12:52:57 AM
K, well I have db backups coming out my ears but the only problem is that they contain other people's PI. It wouldn't really be practical to get everyone's permission to redistribute. I might have to knock one down a bit and get rid of as much PI as possible, leaving only public content.

Posts are no problem. I can do you 80,000 and up worth of posts. What would be a reasonable minimum?
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 27, 2009, 01:04:14 AM
That's awesome! 80,000 sounds like a good number indeed.

Yeah PI was *exactly* the issue I've been worrying about. Fortunately there's won't be a need for this mod to make use of any PI at all, so feel free to remove them (personal acct info, private messages, etc.).

I know it's a lot of trouble getting rid of all the PI from the db, so thanks in advance!!
Title: Re: Search Enhancement Mod
Post by: Antechinus on September 27, 2009, 01:10:52 AM
K. Give me a couple of days and I'll knock something up. Might have to teach myself a few new queries to speed this up a bit. :D
Title: Re: Search Enhancement Mod
Post by: ioszilla on September 27, 2009, 01:19:26 AM
Thanks Antechinus!! I rly look fwd to it, keep us informed and best of luck! :D
Title: Re: Search Enhancement Mod
Post by: MrCreatoR on October 20, 2009, 07:28:05 AM
Is there any plans to add SMF 2 RC1.2 support?
Title: Re: Search Enhancement Mod
Post by: spiros on December 20, 2009, 09:10:08 AM
Or for RC2?
Title: Re: Search Enhancement Mod
Post by: spiros on January 27, 2010, 06:46:57 PM
Is it possible to have the result summary shown by default? (now you have to click on it).
Title: Re: Search Enhancement Mod
Post by: ioszilla on January 27, 2010, 07:01:22 PM
Sure it's possible to have the result summary shown by default by modifying the search results template. It's a javascript thing.

p.s. due to time constraints I won't be able to keep up with the maintenance/support of this mod. Feel absolutely free to update/upgrade this mod if anyone is still interested. :)
Title: Re: Search Enhancement Mod
Post by: spiros on January 27, 2010, 07:04:26 PM
Quote from: ioszilla on January 27, 2010, 07:01:22 PM
Sure it's possible to have the result summary shown by default by modifying the search results template. It's a javascript thing.


Thanks for the reply; how exactly do you change the code for that? Sorry for my ignorance...

I try turning to true but it did not work...

function ResultSummary($links_str, $expand = TRUE)

Got it, changed this


$expand_trigger = '';
if (empty($expand))
$expand_trigger = ' style="display:none;"';


To this


$expand_trigger = '';
if (empty($expand))
$expand_trigger = ' style="display:block;"';
Title: Re: Search Enhancement Mod
Post by: Joker™ on April 03, 2010, 11:39:09 AM
can someone make it to work with RC2
Title: Re: Search Enhancement Mod
Post by: Amendoim on July 15, 2010, 09:35:18 AM
Update to RC3  :-\
Very good mod ;)
Title: Re: Search Enhancement Mod
Post by: Abavagada on August 09, 2010, 02:24:48 PM
I installed this mod on SMF 1.1.11 and it works really well, except for one small thing I am puzzled by.
When doing a search with "Match whole words only" selected and even with "Match whole words only" selected in the admin controls, my search always find matches with partials.. like matching "all" with "actually". 

Anyone else having this problem, or know how to correct it?

Thanks
Title: Re: Search Enhancement Mod
Post by: sharks on August 18, 2010, 11:00:51 AM
i really want to install this mod on my live forum, which has about 200k posts, but i tested it first on a test forum SMF 1.1.11 and i do not understand these options in the search boxes from the main forum page:

Entire forum
Members
Entire site

That last option "Entire site" is unnecessary, as there is already the "Entire forum" option. So, that last option should be removed completely.

Another thing, when viewing inside a board or a topic, the search list next to the search bar should automatically shift to show "This board" option, rather than "Entire forum", as the latter will never work, since SMF search works only within a board when viewing any board. It does not search the entire forum.
This mod does exactly what needs to be fixed: http://custom.simplemachines.org/mods/index.php?mod=1634
Title: Re: Search Enhancement Mod
Post by: FragaCampos on August 29, 2010, 06:50:19 PM
This mod is very important to a forum with 50.000 + posts and since i'm going to migrate from 1.1.11 to RC3 i would like to know if there will be a RC3 version of this mod and if this mod is really needed on RC3 (i.e. if RC3 has it's ranking and missing results issues solved).

Thanks.
Title: Re: Search Enhancement Mod
Post by: meinit on September 02, 2010, 03:14:38 PM
Quote from: FragaCampos on August 29, 2010, 06:50:19 PM
This mod is very important to a forum with 50.000 + posts and since i'm going to migrate from 1.1.11 to RC3 i would like to know if there will be a RC3 version of this mod and if this mod is really needed on RC3 (i.e. if RC3 has it's ranking and missing results issues solved).

Thanks.
Title: Re: Search Enhancement Mod
Post by: sharks on September 02, 2010, 03:37:10 PM
I am still waiting for the mod creator to respond. Hopefully he will fix these problems and upgrade it along the way. I agree, this is indeed a crucial element of any forum, as searching should be made as accurate and user-friendly as possible for any forum software to be successful on any large scale applications.

If the mod creator has gone MIA, then hopefully someone talented can pick this mod up and continue its development. It would be a real pity to leave this excellent mod to die with no developer support.
Title: Re: Search Enhancement Mod
Post by: Antechinus on December 01, 2010, 05:03:34 PM
I'm going to contact him and see if he wants to continue to develop it. I want a 2.0 verison myself. :)

If he's into it I'll get a test db together for him (which I was going to before I got sidetracked due to various factors). If he's not into it I'll see if we can take it over as an official mod. I would like to see this mod in 2.1 as a default feature but will have to see what other people think about that.   
Title: Re: Search Enhancement Mod
Post by: FragaCampos on December 03, 2010, 12:45:09 PM
Now that's a good news.
I always thought that this should be a default part of SMF, since it's so important.
I'm glad to see that i'm not the only one to think that way.

Hope to see even more good news in the near future :)
Title: Re: Search Enhancement Mod
Post by: sharks on December 03, 2010, 07:31:32 PM
Quote from: Antechinus on December 01, 2010, 05:03:34 PM
I'm going to contact him and see if he wants to continue to develop it. I want a 2.0 verison myself. :)

If he's into it I'll get a test db together for him (which I was going to before I got sidetracked due to various factors). If he's not into it I'll see if we can take it over as an official mod. I would like to see this mod in 2.1 as a default feature but will have to see what other people think about that.   

Ah! Now that's a really rare sight these days on SMF. An excellent idea and one that should have been done years ago!
I have been hoping and desperately watching for someone to come up and keep up the development of this mod.
Thanks for forwarding this incredibly useful mod to be integrated into SMF. Hopefully, this mod will be updated with support for SMF 1.1.12 as well.
Title: Re: Search Enhancement Mod
Post by: naitram on April 22, 2011, 11:12:29 AM
has anyone taken over support of this MOD?
Title: Re: Search Enhancement Mod
Post by: sharks on April 29, 2011, 01:27:33 AM
This is a must-have mod for all SMF forums. The SMF team should integrate this mod somehow into the default installation. It's sooo much better than the default engine, especially for bigger forums (every forum is bound to get bigger one day, right?)
Title: Re: Search Enhancement Mod
Post by: Antechinus on April 30, 2011, 02:58:41 AM
We're planning on doing it as an official mod for 2.0. We've already cleared this with the author of the mod.
Title: Re: Search Enhancement Mod
Post by: sharks on May 01, 2011, 08:42:12 AM
Quote from: Antechinus on April 30, 2011, 02:58:41 AM
We're planning on doing it as an official mod for 2.0. We've already cleared this with the author of the mod.

That's one piece of good news... Something that's been unfortunately missing around SMF for a long time. I'm really glad that the SMF team has taken this search mod seriously.

BTW, how is the whole legal shenanigan with SMF 2.0 license change coming? It's been a few months since RC5, so i'm wondering if there is any progress being made before 2.0 final can finally be released.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on June 29, 2011, 11:31:38 AM
Sorry to bump this thread, but are there any news regarding the official release of this mod for 2.0?
Title: Re: Search Enhancement Mod
Post by: Antechinus on June 29, 2011, 07:00:41 PM
Nope. Not yet. Will start stirring things up a bit.
Title: Re: Search Enhancement Mod
Post by: sharks on June 30, 2011, 09:41:24 AM
There is an important question regarding this mod which is crucial on any SMF 1.1.x forum IMHO, as it vastly improves searching results. However, i have to ask if it's necessary to have this on SMF 2.0 (although it would awesome if it was updated for 2.0 final) but before SMF 2.0 final was released, i think there was some talk with ioszilla (the creator of this mod) to integrate some of his ingenious mod code into the SMF 2.0 code. Has this been done? So, does this mean that SMF 2.0 has better search than SMF 1.1.x with this mod?
Title: Re: Search Enhancement Mod
Post by: Antechinus on June 30, 2011, 08:16:30 PM
Nope. 2.0 runs the same old search algorithm (IOW, not that great).
Title: Re: Search Enhancement Mod
Post by: sharks on July 01, 2011, 01:54:28 AM
Quote from: Antechinus on June 30, 2011, 08:16:30 PM
Nope. 2.0 runs the same old search algorithm (IOW, not that great).
Well, then it makes the 2.0 release of this mod crucial before i upgrade my 1.1.x installations, which already use this mod very successfully. This mod makes a great difference in the search results and their presentation, sorting and several other options and features to customize how the search results are viewed.
Title: Re: Search Enhancement Mod
Post by: Antechinus on July 01, 2011, 07:26:23 AM
Yes I am aware of that. TBH I have been thinking the same way about a 1.1.x site I manage.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on July 01, 2011, 05:19:26 PM
Quote from: sharks on July 01, 2011, 01:54:28 AM
Well, then it makes the 2.0 release of this mod crucial before i upgrade my 1.1.x installations

I second this. This is way important for my forum (and i believe dozens of 1.1.x forums) before upgrading to 2.0, which i would like to do very soon.
Hope this idea of making this official can go ahead.
Title: Re: Search Enhancement Mod
Post by: Eleglin on July 03, 2011, 09:12:22 AM
Yes, I need it too for SMF 2.0
Thanks for this mod (that I have used for 2 or 3 years. I really enjoy it.)
and thanks in advance for an update !  :)
Title: Re: Search Enhancement Mod
Post by: spiros on July 04, 2011, 02:18:59 PM
My forum could not live without it :)
Title: Re: Search Enhancement Mod
Post by: cellax on July 14, 2011, 08:59:29 PM
I am with you guys, waiting for this mod on smf 2.0

I hope it will be soon
Title: Re: Search Enhancement Mod
Post by: sharks on July 16, 2011, 12:29:34 PM
Looks like we're building up a petition! :D But you are all absolutely right. I am also stuck on SMF 1.1.x due to the lack of this mod on the 2.0 platform. Searching a forum is crucial. I had thought that this would have been integrated into the base SMF installation. It would be real bad-ass if it were.
Title: Re: Search Enhancement Mod
Post by: Paracelsus on July 20, 2011, 04:40:49 AM
Quote from: sharks on July 16, 2011, 12:29:34 PM
Looks like we're building up a petition! :D But you are all absolutely right. I am also stuck on SMF 1.1.x due to the lack of this mod on the 2.0 platform. Searching a forum is crucial. I had thought that this would have been integrated into the base SMF installation. It would be real bad-ass if it were.

Here is one more. ;D This MOD heavily improved the search results on my 1.1.x forum and I see no reason why it shouldn't be updated/integrated on 2.0.
Title: Re: Search Enhancement Mod
Post by: sharks on July 30, 2011, 04:19:20 AM
Has anyone tested the 1.8.2 version on SMF 1.1.14? I installed it on a blank installation and it's giving me install error in Search.php

I guess the good times are over. I have already upgraded my forum to 1.1.14 and that mod used to work perfectly on 1.1.12

I guess something changed in the Search.php file which isn't accounted for in 1.8.2 version of this mod. Can someone help?
Title: Re: Search Enhancement Mod
Post by: Tanith0709 on August 14, 2011, 08:00:25 PM
Hope that this mod will be upgraded to work on 2.0 soon :P
Title: Re: Search Enhancement Mod
Post by: Shorti25 on August 27, 2011, 08:51:57 PM
Quote from: Tanith0709 on August 14, 2011, 08:00:25 PM
Hope that this mod will be upgraded to work on 2.0 soon :P
me too
Title: Re: Search Enhancement Mod
Post by: spiros on August 29, 2011, 01:18:36 PM
Sorry to bump. Any news on this mod?
Title: Re: Search Enhancement Mod
Post by: sharks on August 29, 2011, 03:44:09 PM
So many people asking for this mod to be updated... It must be the most requested SMF mod at this time! Can the developer please let us know if this mod has been abandoned?
Title: Re: Search Enhancement Mod
Post by: Antechinus on August 29, 2011, 06:30:47 PM
Not abandoned, but nobody has had time to work on it yet.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on October 05, 2011, 09:15:12 AM
I think we should start a petition for high priority of this mod...
Title: Re: Search Enhancement Mod
Post by: sharks on October 05, 2011, 10:46:41 AM
Quote from: FragaCampos on October 05, 2011, 09:15:12 AM
I think we should start a petition for high priority of this mod...
I fully agree. It's such an important mod, as optimal searching is a fundamental aspect of any forum. Really, this mod should be assigned to the SMF team, to ensure maximum compatibility and best possible coding/features.
Title: Re: Search Enhancement Mod
Post by: spiros on October 11, 2011, 04:37:09 AM
Quote from: Antechinus on August 29, 2011, 06:30:47 PM
Not abandoned, but nobody has had time to work on it yet.

Maybe it could be flagged as a priority item or post an open invite to mod creators to adopt it? Just an idea.
Title: Re: Search Enhancement Mod
Post by: sharks on October 15, 2011, 06:43:21 AM
I cannot install this mod 1.8.2 on a clean install of SMF 1.1.15. Is anyone having the same problem? Please help!
Title: Re: Search Enhancement Mod
Post by: Antechinus on October 15, 2011, 04:57:20 PM
Spuds is looking at this one. Don't hassle him too much though. It is quite complex and the database structure of 2.0 is rather different to 1.1.x. :)
Title: Re: Search Enhancement Mod
Post by: sharks on October 15, 2011, 06:32:36 PM
Quote from: Antechinus on October 15, 2011, 04:57:20 PM
Spuds is looking at this one. Don't hassle him too much though. It is quite complex and the database structure of 2.0 is rather different to 1.1.x. :)
This is great news! :) I will try to stay out of his hair and let him work in peace. lol.
Thanks for the heads up though. Many of us here, have been wondering for a long time on the situation of this excellent modification.
Title: Re: Search Enhancement Mod
Post by: Eleglin on October 20, 2011, 07:51:37 AM
A really good news.
Thanks. :-)
Title: Re: Search Enhancement Mod
Post by: Bancherd on October 20, 2011, 08:28:31 AM
That's certainly a very good news, looking forward to the update.  :)
Title: Re: Search Enhancement Mod
Post by: FragaCampos on October 20, 2011, 12:31:30 PM
Great news indeed, not only for those who are waiting for the upgrade, but also to SMF, because it's a better search mod than the original one.

I don't know if this was already raised in other topic or not, but i would like to see a donate button in every mod page. Although not obligatory, I think it would stimulate the mods' authors to continue their work, implementing new features and upgrades and would give more responsibility to those who use their mods. Just my two cents.
Title: Re: Search Enhancement Mod
Post by: Spuds on October 27, 2011, 06:44:48 PM
Just a quick update ... I have this "working" in my 2.0 install but it will need quite a bit of testing, I'm sure there are bugs.  The original mod was a lot larger than I thought and more complicated then I thought, should have looked before I volunteered lol ....  then converting it to 2.0 well I think I suffered a mild brain hemorrhage or was that hemorrhoid :P

Not sure how to package this up just yet, it pretty much effects 3/4 of the search function, I guess since the license is open source now perhaps I can distribute the update in the package instead of making 17 large edits like poor wordzilla had to do.  Plus in 2.0 there are two class files effected as well.

Have not done much on the templates, just the basic input page, there were some big changes from 1.x to 2.0 in the search results pages so porting all of the mods updates over does not make a lot of sense. 

Anyway, work in progress and progressing :)
Title: Re: Search Enhancement Mod
Post by: Bancherd on October 28, 2011, 07:41:29 AM
Great news!  :)
Title: Re: Search Enhancement Mod
Post by: Antechinus on October 28, 2011, 03:45:53 PM
Spuds, if you want a hand with the templating give me a yell. I'd be right into that since I want to run this thing anyway. Can also help with testing.
Title: Re: Search Enhancement Mod
Post by: Spuds on October 28, 2011, 10:06:59 PM
Quote from: Antechinus on October 28, 2011, 03:45:53 PM
Spuds, if you want a hand with the templating give me a yell. I'd be right into that since I want to run this thing anyway. Can also help with testing.
I've made my version of the changes, please feel free to fix/add as you like  ;)

So attached is the first early version of the 2.0 version of this mod.  It should install without difficulty on the default curve theme.

If you get the ever fun mod parse error on index.template just ignore it, all it will affect is the adding of the search pulldown box next to the search field at the top of the page.

The mod needs to be enabled, admin-> configuration -> modification settings -> enhanced search

When you find errors pls tell me what you did to create the error.  Also after installing on 2.0 you should go to routine maintenance and empty out the unimportant logs to avoid issues.

Lastly it really wants the fulltext index, not custom, although it should work with custom the relevance factors are not robust.

Also I noticed when I first installed it and did the initial search it found results but the result page was empty, not sure why but that only seemed to happenon the first search after installing, so still looking for that problem.

Use on a test forum, if it was a 2.0 forum upgrade from a 1.0 that search result comparisons could be examined that would be ideal.  This will have some bugs still and I need to go through each of the database query's again to make sure they are correct but wanted to provide something for folks to kick the tires on.

EDIT ... removed file, update below
Title: Re: Search Enhancement Mod
Post by: Bancherd on October 29, 2011, 09:09:15 AM
Quoteto provide something for folks to kick the tires on.

I have installed on my forum, so far so good.  :)
Title: Re: Search Enhancement Mod
Post by: Antechinus on October 30, 2011, 04:34:44 AM
Quote from: Spuds on October 28, 2011, 10:06:59 PMLastly it really wants the fulltext index, not custom, although it should work with custom the relevance factors are not robust.

The 1.1.x version was the same, but that's no drama IMO. Just run fulltext and everything's fine.
Title: Re: Search Enhancement Mod
Post by: Spuds on October 30, 2011, 12:51:36 PM
I agree ... this mod really trys to address the many issues with fulltext index searching that cause people to go to the large custom index searches
to begin with.

I found a couple of query's that were not quite right, so they have been updated in the attached update. 

PS anyone else have a strange problem on this site where the posting textbox extends off the right side of the browser? FF 7.01

EDIT: Latest update attached later in thread
Title: Re: Search Enhancement Mod
Post by: Antechinus on October 30, 2011, 03:45:26 PM
Haven't had a chance to try it yet (thunderstorm last night took the power out for a while) but will have a look tonight (assuming power stays on).

PS: No. Fine for me. XP SP3/FF 7.01
Title: Re: Search Enhancement Mod
Post by: Bancherd on October 30, 2011, 06:34:03 PM
No problems seen with ubuntu11.10/FF7.0.1.
Title: Re: Search Enhancement Mod
Post by: Spuds on October 30, 2011, 07:34:02 PM
Quote from: Bancherd on October 30, 2011, 06:34:03 PM
No problems seen with ubuntu11.10/FF7.0.1.
Thank you for the update, keep testing away :)
Title: Re: Search Enhancement Mod
Post by: Bancherd on November 01, 2011, 07:50:07 AM
Things appeared to work properly when doing the search; however, I found these errors in the log.  This did not occur in the earlier version.
Title: Re: Search Enhancement Mod
Post by: Spuds on November 01, 2011, 12:57:41 PM
Quote from: Bancherd on November 01, 2011, 07:50:07 AM
Things appeared to work properly when doing the search; however, I found these errors in the log.  This did not occur in the earlier version.
See ... I told you there would be bugs  :P  I think I have that all sorted, along with a couple of other errors I found along they way ..... here is the latest update

EDIT ... removed file
Title: Re: Search Enhancement Mod
Post by: Bancherd on November 01, 2011, 07:03:47 PM
Got it!  So far so good.   Thank you.  :)
Title: Re: Search Enhancement Mod
Post by: Antechinus on November 02, 2011, 04:23:36 AM
Quote from: Spuds on October 28, 2011, 10:06:59 PMUse on a test forum, if it was a 2.0 forum upgrade from a 1.0 that search result comparisons could be examined that would be ideal.

I have such a database on local host. Well I have both of them (1.1.x and 2.0, with 1.1.x running the old mod). Will take a look around.
Title: Re: Search Enhancement Mod
Post by: Spuds on November 02, 2011, 09:52:56 AM
That would be awesome ... if the mods return relatively the same results on both platforms then we know we are on the right track !
Title: Re: Search Enhancement Mod
Post by: sharks on November 02, 2011, 01:20:19 PM
This mod does not install on SMF 1.1.15. Is there any plans to support the 1.1.x version? Just asking, and thanks for the hard work so far. :)
Title: Re: Search Enhancement Mod
Post by: spiros on November 04, 2011, 05:25:17 AM
Great work spuds! I think if this mod supported Sphinx it would be a great option for SMF. Perhaps someone could document how to combine the two.

IPB does that:

Sphinx searching supported when available
http://www.invisionpower.com/products/board/features.php

Perhaps SMF should pick some ideas from other forum projects ;)
Title: Re: Search Enhancement Mod
Post by: Bancherd on November 05, 2011, 11:05:44 AM
Just got this error today.  :)
Title: Re: Search Enhancement Mod
Post by: Spuds on November 07, 2011, 10:37:05 PM
QuoteThis mod does not install on SMF 1.1.15. Is there any plans to support the 1.1.x version? Just asking, and thanks for the hard work so far. :)
I know there is one edit that is failing on 1.15, I'll take a look at that when I get a chance.

QuoteGreat work spuds! I think if this mod supported Sphinx it would be a great option for SMF. Perhaps someone could document how to combine the two.
Sphinix support is not really part of this mod, thats an entire mod on to itself that will be made available.   Sphinx does require a dedicated or VPS I believe.

QuoteJust got this error today.  :)
Dumb mistake on my part, fixed in this version along with a couple of other tweaks here and there to improve things.  Update attached

EDIT ... removed file
Title: Re: Search Enhancement Mod
Post by: Bancherd on November 08, 2011, 10:47:27 AM
Thank you for the update, downloaded and installed on my forums.  ;D
Title: Re: Search Enhancement Mod
Post by: FragaCampos on December 16, 2011, 12:54:54 PM
Any news about this mod?  O:)
Title: Re: Search Enhancement Mod
Post by: sharks on December 16, 2011, 04:16:26 PM
Quote from: FragaCampos on December 16, 2011, 12:54:54 PM
Any news about this mod?  O:)
It's still abandoned.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on December 30, 2011, 07:24:54 PM
Well, sorry if this is an incorrect message, but i thought i should say this.
I'm unable to upgrade from version 1.1.16 to version 2.0.2 because of this, so i'm willing to pay someone to make the upgrade for me. I already contacted some people listed here in the SMF forum, so if someone is interested to share the costs, please PM me.
Thanks.
Title: Re: Search Enhancement Mod
Post by: sharks on December 30, 2011, 10:05:52 PM
Spuds, how is the bug fixing going for SMF 1.1.16?

FragaCampos, assuming the mod will be taken care of, it should be made available to everyone when it's done. I can contribute on that condition, but currently, my priority lies with SMF 1.1.16
Title: Re: Search Enhancement Mod
Post by: FragaCampos on January 02, 2012, 10:51:35 AM
Yes, i will make it available for everyone, assuming that i'm not violating the forum's rules regarding copyright of mods (which i think i am).
Title: Re: Search Enhancement Mod
Post by: Spuds on January 02, 2012, 10:48:25 PM
I had updated the mod to 2.0x and it was posted in the thread for some time.  A few folks helped out with testing and found some bugs that I fixed, but some more  testing was/is needed.

Bit of a catch 22 really, folks want the update, but its difficult to find 1.x participants to test the 2.0x update, they want the mod available for when they do update, but don't have the time/resources to help out in the testing.  I can say it runs but I don't have a great way to validate / correlate the search results.

Regarding the license, there was none with the original mod, as such its considered a closed i.e. non open source license.  I had been given a loose OK to make the updates, but I personally don't have a "hall pass" to show to that effect.
Title: Re: Search Enhancement Mod
Post by: sharks on January 03, 2012, 02:03:05 AM
One of the SMF management guys should step up and tell us what the situ on this mod. Surely, there must be a solution to cases like this, when the original mod dev has gone MIA, irrespective of the previous licence used. Otherwise this great mod will have to be rewritten from scratch. And nobody is going to sue Spuds or anyone else for trying to help. It's free, so i don't understand what's the big deal with simply transferring over an abandoned mod to an active dev.
Title: Re: Search Enhancement Mod
Post by: Antechinus on January 09, 2012, 04:04:55 PM
There isn't a big deal. Ioszilla gave SMF the rights to the mod. I'll make an effort to do some testing of this for 2.0.x.
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 11, 2012, 11:50:54 AM
Hi, got this today.

From the Error Log:

http://www.xxxxxxxxxx/xxxxxxx/index.php?action=search2


Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int:active_board} THEN 1 ELSE {float:non_active_board_multiplier} END * CASE WH' at line 5

File: /customers/0/5/5/xxxxxxxx/httpd.www/xxxxxxx/Sources/DCSearch.php
Line: 1860


The file it's referring to:

1840: // REF (see above) ATTN: wordzilla, LEFT_JOIN
1841: // LEFT JOIN smf_tmp_log_search_topics AS lst ON (lst.id_topic = t.id_topic)
1842: // WHERE t.id_topic = m.id_topic
1843: // AND lsm.id_msg = m.id_msg AND lst.id_topic = t.id_topic
1844: $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ('
1845: INSERT IGNORE INTO ' . '{db_prefix}log_search_results
1846: (' . implode(', ', array_keys($main_query['select'])) . ')') : '') . '
1847: SELECT
1848: ' . implode(',
1849: ', $main_query['select']) . '
1850: FROM ' . $main_query['from'] . (empty($main_query['inner_join']) ? '' : '
1851: INNER JOIN ' . implode('
1852: INNER JOIN ', $main_query['inner_join'])) . (empty($main_query['left_join']) ? '' : '
1853: LEFT JOIN ' . implode('
1854: LEFT JOIN ', $main_query['left_join'])) . (!empty($main_query['where']) ? '
1855: WHERE ' : '') . implode('
1856: AND ', $main_query['where']) . (empty($main_query['group_by']) ? '' : '
1857: GROUP BY ' . implode(', ', $main_query['group_by'])) . (empty($modSettings['search_max_results']) ? '' : '
1858: LIMIT ' . $modSettings['search_max_results']),
1859: $main_query['parameters']
==>1860: );



Using SMF 2.0.2

These mods installed:
1.    Error Log Counter    1.0
2.    AvatarSelect    1.2.1
3.    Users Online Today    2.0 RC1
4.    WYSIWYG Quick Reply    2.3
5.    Admin Notepad    2.0.1
6.    Spiders Don't Increase Topic Views    1.1.1
7.    Board Viewers Mod    1.2.1.1b
8.    Remove XHTML, RSS & WAP2 Links in Footer    v1.1
9.    PaypalDonations    2.0
10.    Add Join Date to Post    1.0
11.    Google Member Map    2.0.8
12.    InLine Attachments    1.11
13.    SMF 2.0.1 Update    1.0
14.    Aeva Media    1.4w
15.    PM Readed    1.1
16.    SMF 2.0.2 Update    1.0
17.    SMF Search Enhancement Mod    1.8.2


Any tips how to fix this??
Title: Re: Search Enhancement Mod
Post by: sharks on January 11, 2012, 12:47:09 PM
I am willing to do testing for 1.1.16 on my live forums. PM me the beta file and i'll install it right away.
Title: Re: Search Enhancement Mod
Post by: Spuds on January 11, 2012, 01:05:15 PM
QuoteAny tips how to fix this??
Well the error says to read the manual :P   Really the fix will be easy, its the reproducing it that is needed.  If you can determine the steps (system search, topic search, board search, type of search,e tc) so I can reproduce the error.   I'll do some digging around but any clues will be a help.

Also please enable (if you don't already) the "Include database query in the error log" (under security / moderation general) .. this often provides the full query for review which can be a good clue as to the steps that produced it.  That could help with any future "finds".

QuoteI am willing to do testing for 1.1.16 on my live forums. PM me the beta file and i'll install it right away.
I have not done a thing to the 1.x branch, still trying to get 2.x fully converted.  The 1.x is an install error on one of the edits I believe.
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 11, 2012, 01:37:32 PM
enabling it now.
Trying to get help to investigate the errors.

Hope I can help you with fixing this error.
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 11, 2012, 02:00:48 PM
eh...I see I don't have read the manual.

Can't I use wildcards?

If I search "Entire forum" for, lets say "*super" or "super*"
I get "8: Uninitialized string offset: 0" error in line 710.

It looks like my members use this often...
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 11, 2012, 04:24:45 PM
ah.
This happens if you are in a "sub-folder"

This is what I get then

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int:active_board} THEN 1 ELSE {float:non_active_board_multiplier} END * CASE WH' at line 5
File: /customers/0/5/5/xxxxxx/httpd.www/xxxxx/Sources/DCSearch.php
Line: 1860

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.


Might have to upgrade the database then. To see if that fixes the error.
Title: Re: Search Enhancement Mod
Post by: Spuds on January 11, 2012, 05:21:26 PM
Thanks for the info ... I'll do some checking with those details.

QuoteNote: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.
Ignore that :)
Title: Re: Search Enhancement Mod
Post by: Spuds on January 11, 2012, 07:33:19 PM
QuoteIf I search "Entire forum" for, lets say "*super" or "super*"
I get "8: Uninitialized string offset: 0" error in line 710.
It works fine, the error is one of those annoyance errors but I have fixed it on my local copy.  Its not affecting functionality, its just an log spammer error.

QuoteThis happens if you are in a "sub-folder"
I'm not sure what you mean by this, could you describe it a bit more?

I also found a small error where the "this board" from the index pull down was not working right, I also have that fixed on my local copy.
Title: Re: Search Enhancement Mod
Post by: pols1337 on January 11, 2012, 08:26:22 PM
Hi,

Stupid question but if I'm running SMF 2.0.2 should I be downloading the 1.8.2 or the 1.8.2_SMF2.0? 

pols1337
Title: Re: Search Enhancement Mod
Post by: Spuds on January 11, 2012, 08:31:20 PM
1.8.2_SMF2.0 is the one for smf 2.0x

As you can see there are still a few quirks (nice way of saying bugs) that are getting worked out ... but it does work pretty well ;)
Title: Re: Search Enhancement Mod
Post by: Spuds on January 11, 2012, 11:21:53 PM
Found a couple of more errors so I'm working on those now ... should have an update to test tomorrow ... nothing major but certainly some annoyances  >:(
Title: Re: Search Enhancement Mod
Post by: eric1234 on January 12, 2012, 11:23:52 AM
erm.. a lot of images not working for example the "As mentioned above, plz make sure you configure your search in Admin panel as shown below -- in order for this mod to search fast and best rank results:" in the 1st page also not working  :-\

IN /Themes/default/index.template.php
echo '
</div>
<div class="news normaltext">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '</form>';


i cant find the code :(
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 12, 2012, 03:16:12 PM
took some time, but this is the log attached
I can't put the code in, cause then I get

Some of the links in your post were not found or match more than one topic or member.
Please use the id instead.

    "<:": not found.
Title: Re: Search Enhancement Mod
Post by: Spuds on January 12, 2012, 03:19:09 PM
Thats just what I was looking for ... I see the error :)
Title: Re: Search Enhancement Mod
Post by: Spuds on January 12, 2012, 09:24:37 PM
Updated the mod(s) on the download site ... should have fixed the errors that have been found, but maybe not, thats why we are testing ;)  This version fixed two querys that were not rendering out properly,  an error when you have more finds that the max allowed, paging error on a cached search result, single board search from the pulldown, and a couple of others that I can't remember ATM.

Also updated the smf1 version for the old school crowed, should install cleanly on 1.1.16
Title: Re: Search Enhancement Mod
Post by: Bancherd on January 13, 2012, 12:50:05 AM
Thank you for the update, will try it on my two live forums.  :)
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 13, 2012, 02:45:39 AM
Great
Going to install it and test

I'm such a neewb, but.
I deleted the old.
uploaded DCSearch_v1.8.2_SMF2.zip
Try to install and I get

11. Execute Modification ./Themes/default/index.template.php Test failed
1. Replace ./Themes/default/index.template.php Test failed

Title: Re: Search Enhancement Mod
Post by: sharks on January 13, 2012, 03:01:33 AM
Quote from: Spuds on January 12, 2012, 09:24:37 PM
Also updated the smf1 version for the old school crowed, should install cleanly on 1.1.16
Thanks a bunch, Spuds! I'll test it right away on my live forums. ;)
Title: Re: Search Enhancement Mod
Post by: Spuds on January 13, 2012, 11:23:52 AM
Quote from: NoBrainer on January 13, 2012, 02:45:39 AM
Great
Going to install it and test

I'm such a neewb, but.
I deleted the old.
uploaded DCSearch_v1.8.2_SMF2.zip
Try to install and I get

11. Execute Modification ./Themes/default/index.template.php Test failed
1. Replace ./Themes/default/index.template.php Test failed


You did uninstall the old one first yes?  If so just attach your index.template.php file here so I can take a look, the old one may not have backed out cleanly or something.
Title: Re: Search Enhancement Mod
Post by: sharks on January 13, 2012, 01:17:09 PM
I am now successfully running this mod on SMF 1.1.16. No installation errors and everything appears to be working normally.
This is the updated/fixed file for SMF 1.1.x: DCSearch_v1.8.2_SMF1.zip
http://custom.simplemachines.org/mods/index.php?mod=887

Excellent work, Spuds! :D

I am downloading DCSearch_v1.8.2_SMF2.zip to test on my SMF 2.0.2 forums.
Update: Installed with no errors in Curve theme. I typed some keywords and pressed Search and it appears to be working correctly (at least, it has a similar interface to the 1.1.x version, which i assume means it's working as intended). Then i checked the error log and i saw a few of these:

http://myforums.org/smf2/index.php?action=search2
8: Undefined index:
File: /home/myforums/public_html/smf2/Sources/DCSearch.php
Line: 2314
Title: Re: Search Enhancement Mod
Post by: Spuds on January 13, 2012, 02:37:00 PM
Quotehttp://myforums.org/smf2/index.php?action=search2
8: Undefined index:
File: /home/myforums/public_html/smf2/Sources/DCSearch.php
Line: 2314
Thanks for the report ... I'm sure there are some more buggies in there, the 2.0 search function and search classes were quite a bit more complex and different from 1.x than I anticipated, some pretty heavy code with a pretty heavy mod = bugs !  I'll keep squashing as they are found.

ETA:
'icon_url' => $settings[$context['icon_sources'][$message['first_icon']]] . '/post/' . $message['first_icon'] . '.gif',
Are you using some custom message icons (the paper clip, lightbulb, thumb up / down ?  That line is 2314 which is just trying to set that, those should just be standard as its looking in the default theme post directory.  Strange one.
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 13, 2012, 03:40:49 PM
Quote from: Spuds on January 13, 2012, 11:23:52 AM
You did uninstall the old one first yes?  [/quote]

At least I tried....

Quote from: Spuds on January 13, 2012, 11:23:52 AMIf so just attach your index.template.php file here so I can take a look, the old one may not have backed out cleanly or something.

Yepp, atteched
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 13, 2012, 03:41:23 PM
Quote from: Spuds on January 13, 2012, 11:23:52 AM
You did uninstall the old one first yes? 

At least I tried....

Quote from: Spuds on January 13, 2012, 11:23:52 AMIf so just attach your index.template.php file here so I can take a look, the old one may not have backed out cleanly or something.

Yepp, attached
Title: Re: Search Enhancement Mod
Post by: sharks on January 13, 2012, 04:08:11 PM
Quote from: Spuds on January 13, 2012, 02:37:00 PM
Are you using some custom message icons (the paper clip, lightbulb, thumb up / down ?  That line is 2314 which is just trying to set that, those should just be standard as its looking in the default theme post directory.  Strange one.
Yeah, i'm using custom message icons, additionally to the default ones. Let me know if you need any other specifications about my SMF setup.
I just tried another search from the main forum page and it loaded up about a dozen of the same error in the error log.
Also, i noticed that dropdown menu next to the search box is no longer there for the SMF 2.0 version. I think it would be great if it was possible to select which part of the forums is to be searched. For example, in the 1.1.x version of this mod, when viewing a board, it is possible to search within that board only, the entire forum, the members and the entire site. I know this part is just a feature suggestion and not a bug, but anyway, i'm just putting it out there for consideration whenever possible.
Title: Re: Search Enhancement Mod
Post by: Spuds on January 13, 2012, 06:31:04 PM
Quote from: NoBrainer on January 13, 2012, 03:41:23 PM
Quote from: Spuds on January 13, 2012, 11:23:52 AM
You did uninstall the old one first yes? 

At least I tried....

Quote from: Spuds on January 13, 2012, 11:23:52 AMIf so just attach your index.template.php file here so I can take a look, the old one may not have backed out cleanly or something.

Yepp, attached
Try this one ... next time be sure to uninstall, then remove the old file and then download the new ... part of that was me not increasing the rev on the mod since I'm still trying to get it to have the same functionality as 1.1 .... so changing the rev would give a false impression that its newer. 
Title: Re: Search Enhancement Mod
Post by: Spuds on January 13, 2012, 06:43:04 PM
QuoteYeah, i'm using custom message icons, additionally to the default ones. Let me know if you need any other specifications about my SMF setup.
I just tried another search from the main forum page and it loaded up about a dozen of the same error in the error log
Also, i noticed that dropdown menu next to the search box is no longer there for the SMF 2.0 version. .
Sounds all like those items are due to other customizations.  The dropdowns there on a default theme on a fresh install of 2.0, I just double checked.  Also I can't reproduce the the icon error, I'd imaging that icon mod you use made edits to the default search function, this one uses some of the same code to build the icon array for the message results.
Title: Re: Search Enhancement Mod
Post by: sharks on January 13, 2012, 09:54:41 PM
OK, i reverted to the default Curve theme (i was using a colour variant of the Curve theme) and i see the drop-down menu, but its position is wrong. It should be positioned after the search bar (where you type the search keywords) but before the "Search" button.

I used no icon mod. I simply added the extra message icons via the admin panel > Smileys and Message Icons > Edit message icons. (you have to Enable customized message icons first, in order to see the Edit message icons option).
Title: Re: Search Enhancement Mod
Post by: NoBrainer on January 14, 2012, 07:06:59 AM
ok

downloaded you're file and the mod.
Unistalled and then deleted the old mod.
Uploaded the file.
refresh
uploaded the mod and installed it without problems !
Now it works like a charm.

Thanks for the help.
Title: Re: Search Enhancement Mod
Post by: BaghdadGhost on January 14, 2012, 09:27:32 AM
I just installed this mod on smf 2.0.2

when I search I get this error


http://xxx.com/index.php?action=search28: Undefined index: topicsolvedFile:
Sources/DCSearch.php
Line: 2314

does it have to do with topic solved mod which is installed also in my forum?


thanks
Title: Re: Search Enhancement Mod
Post by: Spuds on January 14, 2012, 09:37:31 AM
Quotedoes it have to do with topic solved mod which is installed also in my forum?
Yes ... its along the same lines as the error as sharks reported, it can't find the icon in the index that its using.  Going to fix that today so it does not spam the error log.  The error is harmless in terms of functionality, in your case it means it can't find the check icon, thats all.
Title: Re: Search Enhancement Mod
Post by: sharks on January 14, 2012, 04:08:34 PM
I hope you can fix the position of the drop-down menu as well. :)
Quote from: sharks on January 13, 2012, 09:54:41 PM
OK, i reverted to the default Curve theme (i was using a colour variant of the Curve theme) and i see the drop-down menu, but its position is wrong. It should be positioned after the search bar (where you type the search keywords) but before the "Search" button.
Title: Re: Search Enhancement Mod
Post by: sharks on January 14, 2012, 05:20:46 PM
I used your new DCSearch.php file and the error log stays clear after each search. :) It seems to have fixed the problem.
Title: Re: Search Enhancement Mod
Post by: BaghdadGhost on January 17, 2012, 02:34:00 PM
Quote from: Spuds on January 14, 2012, 09:37:31 AM
Quotedoes it have to do with topic solved mod which is installed also in my forum?
Yes ... its along the same lines as the error as sharks reported, it can't find the icon in the index that its using.  Going to fix that today so it does not spam the error log.  The error is harmless in terms of functionality, in your case it means it can't find the check icon, thats all.

thank you so much for the reply. I uninstalled Topic solved mod as I dont use it that much but the error was still coming back with another form and I checked its also related to some .gif icon


now I downloaded the attached test file and placed it on server. I will come back to report changes


Title: Re: Search Enhancement Mod
Post by: sharks on January 18, 2012, 08:50:42 AM
Spuds has been doing some great work in reviving this essential modification. Feedback is always welcome as it helps to fix any bugs left.
I can't wait for the next update! :)
Title: Re: Search Enhancement Mod
Post by: Bancherd on January 18, 2012, 09:04:49 PM
No errors, so far.  :D
Title: Re: Search Enhancement Mod
Post by: eric1234 on January 19, 2012, 02:48:45 PM
I cant find the code in my /Themes/My own theme/index.template.php

both of my template also cant :( I posted them in attachment
Find:

echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>';


Replace with :

echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;';

echo DropDownQuickSearch();

echo '<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />';

// If we're viewing a single topic
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="acttopic" value="', $context['current_topic'], '" />';

// If we're on a certain board
if (!empty($context['current_board']))
echo '
<input type="hidden" name="actbrd" value="', $context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>';
Title: Re: Search Enhancement Mod
Post by: sharks on January 19, 2012, 05:34:44 PM
eric1234, the final fixed package hasn't been uploaded yet by Spuds.
Quote from: Spuds on January 14, 2012, 04:42:30 PM
Its fixed and will be in the next package that I put on the download site.
Title: Re: Search Enhancement Mod
Post by: eric1234 on January 20, 2012, 12:15:23 PM
Quote from: sharks on January 19, 2012, 05:34:44 PM
eric1234, the final fixed package hasn't been uploaded yet by Spuds.
Quote from: Spuds on January 14, 2012, 04:42:30 PM
Its fixed and will be in the next package that I put on the download site.
Oh >.< When will spuds upload it? So meanwhile i uninstall it from the forum? :)
Title: Re: Search Enhancement Mod
Post by: sharks on January 20, 2012, 05:53:11 PM
It depends, when Spuds thinks the new package is ready to go live.
Title: Re: Search Enhancement Mod
Post by: sharks on January 21, 2012, 07:09:58 AM
Bug alert!

When i search my forums for "l@ura" without quotes, i see this error:
Each word must be at least two characters long.
I tested this with other words, containing @ as the second character and it gives the same error! I believe that i've found a major bug here!
When searching for "@ura" the search results display fine. No errors.
When searching for "la@ra" there are no errors either.
So, this means that the error only appears when the second character contains @
This bug might also affect other symbols used as the second character. I searched "a$leep" and i got the error. Indeed, the bug is defined!

This is not a bug with SMF itself. So, it has to be this mod.
Title: Re: Search Enhancement Mod
Post by: Spuds on January 21, 2012, 08:37:00 PM
Ah yes ... thanks I'll get that fixed, easy fix really ....

that @ gets changed to a blank I think so that's going to be an odd search in some ways, inside of "s it will at least be a single space, outside I think its going to be any number of blanks so its going to find alot in many cases.   Need to look at the code to be sure but I think thats what happens.

Anyway I'll get that fix done and uploaded soon.
Title: Re: Search Enhancement Mod
Post by: sharks on January 22, 2012, 03:24:32 PM
Quote from: Spuds on January 21, 2012, 08:37:00 PM
Ah yes ... thanks I'll get that fixed, easy fix really ....

that @ gets changed to a blank I think so that's going to be an odd search in some ways, inside of "s it will at least be a single space, outside I think its going to be any number of blanks so its going to find alot in many cases.   Need to look at the code to be sure but I think thats what happens.

Anyway I'll get that fix done and uploaded soon.
Thanks in advance, Spuds! :)
Title: Re: Search Enhancement Mod
Post by: Spuds on January 22, 2012, 06:27:20 PM
Updated the file on the download page ... should have fixed the short word error and moved the search dropdown box ...

I was a little torn on fixing that error but I did ... a mysql fulltext search of l@ura is basically going to be l ura as mysql fulltext index does not index special characters so in a way it is trying to search for a word of less than 2 characters .... I have made it like the default for now although I don't agree with it ATM, I think its bad for the server.
Title: Re: Search Enhancement Mod
Post by: sharks on January 23, 2012, 02:23:11 AM
I tested the latest package for SMF1 but the short word error persists. I have my search method set to fulltext. If i change it, then this mod won't work at all.
Title: Re: Search Enhancement Mod
Post by: Inti31 on February 23, 2012, 05:12:33 PM
a few minutes ago I got  the new php version 5.3.10 - zlib is missing and will be installed tomorrow - but now searching does not work anymore -  i get a blank page

before that it worked like a charm... - any idea?

just a search in full webpage works, but searching in a board or whole forum not

http://epica-forum.de/index.php?action=search2 is the result page and the page appears just white

cheers Inti31

Title: Re: Search Enhancement Mod
Post by: NekoJonez on April 14, 2012, 09:27:31 AM
Why are there so few theme's supporting this mod?
Title: Re: Search Enhancement Mod
Post by: TheListener on April 14, 2012, 06:08:53 PM
Can you please elaborate on what you mean.
Title: Re: Search Enhancement Mod
Post by: tsis_k on May 01, 2012, 04:48:45 PM
I installed this mod file name: DCSearch_v1.8.2_SMF2.zip to SMF 2.0.2
Everything installed. However I have not option to choose how to display my search results.


How can I get my search result to display like this?
(http://www.donationcoder.com/forum/index.php?action=dlattach;topic=9434.0;attach=20543;image)


Righ now all search results are showing like this and my users do not like it.
(http://www.donationcoder.com/forum/index.php?action=dlattach;topic=9434.0;attach=20545;image)
Title: Re: Search Enhancement Mod
Post by: tsis_k on May 13, 2012, 12:39:15 AM
just a friendly bump...someone please help.
Title: Re: Search Enhancement Mod
Post by: Spuds on May 13, 2012, 10:47:33 AM
It will not look exactly like those screens since that is what SMF 1.1 looks like, but all of those features are available in the 2.0x version.  So I'm not sure what you are looking for?
Title: Re: Search Enhancement Mod
Post by: tsis_k on May 16, 2012, 11:16:18 PM
No, the search works fine. What I really want is my search result to be display like this.

(http://www.donationcoder.com/forum/index.php?action=dlattach;topic=9434.0;attach=20543;image)

Do you see how subject, Replies, Relevance, Started by, Date Posted are all in separate column? That's how I want my result to be display.
Title: Re: Search Enhancement Mod
Post by: MrNicotine on July 12, 2012, 03:46:57 AM
I would also like to have the summary dropped down as default, and I found the following:


Quote from: spiros on January 27, 2010, 07:04:26 PM


Thanks for the reply; how exactly do you change the code for that? Sorry for my ignorance...

I try turning to true but it did not work...

function ResultSummary($links_str, $expand = TRUE)

Got it, changed this


$expand_trigger = '';
if (empty($expand))
$expand_trigger = ' style="display:none;"';


To this


$expand_trigger = '';
if (empty($expand))
$expand_trigger = ' style="display:block;"';


But I cannot find this line to change (SMF2.02). Could anyone tell me which file to look in?

Second question, the colors for the text is default blue, but on my dark theme, this isn't that pretty.
I would like to change the text color. So, again, in which file should I search for this?
Edit: found the color settings in "DCSearch.template.php" ;)

I've been going over the parser twice trying to find both these issues, but no luck.
Help would be appreciated.

Also, I cannot find these options:

QuoteIMPORTANT CONFIGURATION INFO

Works best with Search Settings (in admin panel):

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked
4. Maximum results to show: 0  (0: no limit)

Am I right that these options are no longer available and are probably the standard settings?

I have read the support/comments in this topic, but if I'm repeating a question, I apologize.
I must have missed something while reading.

Great mod by the way, works great ;)
Thanks!
Title: Re: Search Enhancement Mod
Post by: FragaCampos on September 25, 2012, 04:50:05 PM
Hello.

Since I believe this is essential for the correct functioning of the mod, is there an answer to this question?
I would really like to upgrade my forum to 2.0.2... :P

Quote from: MrNicotine on July 12, 2012, 03:46:57 AM
Also, I cannot find these options:

QuoteIMPORTANT CONFIGURATION INFO

Works best with Search Settings (in admin panel):

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked
4. Maximum results to show: 0  (0: no limit)

Am I right that these options are no longer available and are probably the standard settings?


Also, after years using this mod, I believe I found a bug.
When accessing the search results, if a guest clicks on the link pointed in this image
(http://www.donationcoder.com/forum/index.php?action=dlattach;topic=9434.0;attach=20543;image)

he/she can see the entire page, although he/she doesn´t have permissions to see it...

Thanks.
Title: Re: Search Enhancement Mod
Post by: Paracelsus on October 10, 2012, 05:16:09 AM
Quote from: FragaCampos on September 25, 2012, 04:50:05 PM
Hello.

Since I believe this is essential for the correct functioning of the mod, is there an answer to this question?
I would really like to upgrade my forum to 2.0.2... :P

Quote from: MrNicotine on July 12, 2012, 03:46:57 AM
Also, I cannot find these options:

QuoteIMPORTANT CONFIGURATION INFO

Works best with Search Settings (in admin panel):

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked
4. Maximum results to show: 0  (0: no limit)

Am I right that these options are no longer available and are probably the standard settings?


Also, after years using this mod, I believe I found a bug.
When accessing the search results, if a guest clicks on the link pointed in this image
(http://www.donationcoder.com/forum/index.php?action=dlattach;topic=9434.0;attach=20543;image)

he/she can see the entire page, although he/she doesn´t have permissions to see it...

Thanks.

How can a guest click on the replies column if the search result topic is hidden from him/her in the first place? (I don't think it's possible to hide a certain post to guests inside a certain topic which is open to guests)
Title: Re: Search Enhancement Mod
Post by: FragaCampos on October 15, 2012, 07:56:39 PM
Hmm... that's a good question.
I forgot to mention i have "Look But No Read" mod installed. It´s probably due to that and nothing to do with this mod.

Anyway, any thoughts about the MrNicotine question about the search's configuration?
Title: Re: Search Enhancement Mod
Post by: Paracelsus on October 17, 2012, 03:00:48 AM
The search's config is here: http://www.forumscp.com/index.php?action=managesearch;sa=method This is of course for 1.1.16, can't tell about v2.

Title: Re: Search Enhancement Mod
Post by: spiros on December 17, 2012, 05:15:37 PM
Quote from: MrNicotine on July 12, 2012, 03:46:57 AM
I would also like to have the summary dropped down as default, and I found the following:

Use the attached file instead (put in Themes\default).

I think it is really unpractical to have the opposite as default. People need the quick access to information first. At the very least there should be an option.
Title: Re: Search Enhancement Mod
Post by: MrNicotine on December 18, 2012, 05:58:40 PM
My thoughts exactly ;). I'll give this a try. Thanks for your trouble..

Edit: Yep, that's it! Dropdown works, but only if you check "Search in topic subjects only". Otherwise it just gives a gray bar.

Not to be ungrateful, but is there a way to check this by default?

Thanks for this step forward, anyway!!! :D :D

Re-edit: As I see now, this is not related to this mod. Sorry  :-[
Thanks for your help!!
Title: Re: Search Enhancement Mod
Post by: spiros on December 23, 2012, 05:14:04 AM
I found a bug. When any of the subjects returned has an apostrophe, then the toggle action ceases to work as it understands the apostrophe as the end of the code and it breaks.

See attached debugging shots.
Title: Re: Search Enhancement Mod
Post by: demlak on January 06, 2013, 10:20:53 AM
is it possible to integrate this as an popup dropdown after clicking into search field? i would like to have this dropdown menu not always shown

p.s.
possible german_informal translation:

//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'Spezielle Topic ID';
$txt['search_match_mode'] = 'Modus';
$txt['search_match_mode_whole'] = 'Nur ganze Wörter - weniger Ergebnisse, weniger ungenaue Treffer';
$txt['search_match_mode_smart'] = 'Ausgewogen';
$txt['search_match_mode_any'] = 'Alle Übereinstimmungen - mehr Ergebnisse, weniger genaue Treffer';

$txt['search_numReplies'] = 'Antworten';
$txt['search_match_mode_whole_short'] = 'Nur ganze Wörter';
$txt['search_match_mode_smart_short'] = 'Ausgewogen';
$txt['search_match_mode_any_short'] = 'Alle Übereinstimmungen';

$txt['show_result_summary'] = 'Zeige Zusammenfassung';
$txt['hide_result_summary'] = 'Verstecke Zusammenfassung';

$txt['search_entireforum'] = 'Gesamtes Forum';
$txt['search_thisbrd'] = 'Dieses Forum';
$txt['search_thistopic'] = 'Dieser Thread';
$txt['search_members'] = 'Mitglieder';
$txt['search_entiresite'] = 'Ganze Webseite';

$txt['search_view_all'] = 'Zeige die %s von %s Nachrichten in diesem Thread die zu deiner Suche passen';

$txt['search_go_to_top'] = 'Zum Anfang';
$txt['search_go_to_top_single'] = 'Anfang';
$txt['error_search_string_small_words'] = 'Jedes Wort muss mindestens zwei Zeichen haben.';

$txt['set_parameters'] = 'Suchparameter Einstellen';
$txt['choose_board'] = 'Wähle eine Kategorie aus, in welcher gesucht werden sooll oder durchsuche alle';
$txt['all_words'] = 'Mit allen Wörtern';
$txt['any_words'] = 'Mit irgendeinem der Wörter';
$txt['by_user'] = 'Nach Benutzer';

$txt['dcsearch_title'] = 'DC Search';
$txt['dcsearch_desc'] = 'Hiermit wird \'DC Search functions\' aktiviert, welches die SMF-Suche erweitert';
$txt['mods_cat_modifications_dcsearch'] = 'Erweiterte Suche';
$txt['dcsearch_enabled'] = 'Aktiviere DC Search';
//END DC SMF Search Text Strings

Title: Re: Search Enhancement Mod
Post by: Badboy on January 06, 2013, 02:48:10 PM
Turkish translation
//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'Belirli konu no';
$txt['search_match_mode'] = 'Eşleştirme Modu';
$txt['search_match_mode_whole'] = 'Tüm kelimeleri eşleştir - az sonuç, az hata';
$txt['search_match_mode_smart'] = 'Akıllı eşleştirme - dengeli';
$txt['search_match_mode_any'] = 'Herhangi bir eşleştirme - fazla sonuç, fazla hata';

$txt['search_numReplies'] = 'Yanıtlar';
$txt['search_match_mode_whole_short'] = 'Tüm kelimeleri eşleştir';
$txt['search_match_mode_smart_short'] = 'Akıllı eşleştirme';
$txt['search_match_mode_any_short'] = 'Herhangi bir eşleştirme';

$txt['show_result_summary'] = 'Sonuç özetini göster';
$txt['hide_result_summary'] = 'Sonuç özetini gizle';

$txt['search_entireforum'] = 'Bütün Forumda';
$txt['search_thisbrd'] = 'Bu bölümde';
$txt['search_thistopic'] = 'Bu konuda';
$txt['search_members'] = 'Üyelerde';
$txt['search_entiresite'] = 'Bütün Sitede';

$txt['search_view_all'] = 'Aramanızla eşleşen %s iletiyi göster (Toplam ileti %s)';

$txt['search_go_to_top'] = 'Yukarı Git';
$txt['search_go_to_top_single'] = 'Yukarı';
$txt['error_search_string_small_words'] = 'Her kelime en az iki karakter uzunluğunda olmalıdır.';

$txt['set_parameters'] = 'Arama Seçeneklerini Belirle';
$txt['choose_board'] = 'Arama yapmak istediğiniz bölüm seçin, veya hepsini arayın';
$txt['all_words'] = 'Bütün kelimeleri eşleştir';
$txt['any_words'] = 'Herhangi bir kelimeye eşleştir';
$txt['by_user'] = 'Kullanıcı tarafından';

$txt['dcsearch_title'] = 'DC Arama';
$txt['dcsearch_desc'] = 'Bu SMF\'nin tam metin arama yetenekleri geliştiren DC Arama işlevlerini etkinleştirir';
$txt['mods_cat_modifications_dcsearch'] = 'Gelişmiş Arama';
$txt['dcsearch_enabled'] = 'DC Aramayı Etkinleştir';
//END DC SMF Search Text Strings

// DC Search Enhancement Mod
$helptxt['dcsearch_enabled'] = 'Bu Gelişmiş Arama Modifikasyonunu etkinleştirir. En iyi sonuçlar için:
1. Tam Metin Dizinini kullan (Arama dizini -> Tam Metin dizini)
2. "Bir arama dizini kullanmaya zorla" işaretlenMEmiş bırakın
3. "Sadece bütün kelimeleri eşleştir" işaretlenMEmiş bırakın
4. Gösterilecek azami sonuç: 0  (0: limitsiz)';


Turkish-utf8 translation
//Begin DC SMF Search Text Strings
$txt['specific_topic_id'] = 'Belirli konu no';
$txt['search_match_mode'] = 'EÅŸleÅŸtirme Modu';
$txt['search_match_mode_whole'] = 'Tüm kelimeleri eşleştir - az sonuç, az hata';
$txt['search_match_mode_smart'] = 'Akıllı eşleştirme - dengeli';
$txt['search_match_mode_any'] = 'Herhangi bir eşleştirme - fazla sonuç, fazla hata';

$txt['search_numReplies'] = 'Yanıtlar';
$txt['search_match_mode_whole_short'] = 'Tüm kelimeleri eşleştir';
$txt['search_match_mode_smart_short'] = 'Akıllı eşleştirme';
$txt['search_match_mode_any_short'] = 'Herhangi bir eÅŸleÅŸtirme';

$txt['show_result_summary'] = 'Sonuç özetini göster';
$txt['hide_result_summary'] = 'Sonuç özetini gizle';

$txt['search_entireforum'] = 'Bütün Forumda';
$txt['search_thisbrd'] = 'Bu bölümde';
$txt['search_thistopic'] = 'Bu konuda';
$txt['search_members'] = 'Ãœyelerde';
$txt['search_entiresite'] = 'Bütün Sitede';

$txt['search_view_all'] = 'Aramanızla eşleşen %s iletiyi göster (Toplam ileti %s)';

$txt['search_go_to_top'] = 'Yukarı Git';
$txt['search_go_to_top_single'] = 'Yukarı';
$txt['error_search_string_small_words'] = 'Her kelime en az iki karakter uzunluğunda olmalıdır.';

$txt['set_parameters'] = 'Arama Seçeneklerini Belirle';
$txt['choose_board'] = 'Arama yapmak istediğiniz bölüm seçin, veya hepsini arayın';
$txt['all_words'] = 'Bütün kelimeleri eşleştir';
$txt['any_words'] = 'Herhangi bir kelimeye eÅŸleÅŸtir';
$txt['by_user'] = 'Kullanıcı tarafından';

$txt['dcsearch_title'] = 'DC Arama';
$txt['dcsearch_desc'] = 'Bu SMF\'nin tam metin arama yetenekleri geliÅŸtiren DC Arama iÅŸlevlerini etkinleÅŸtirir';
$txt['mods_cat_modifications_dcsearch'] = 'GeliÅŸmiÅŸ Arama';
$txt['dcsearch_enabled'] = 'DC Aramayı Etkinleştir';
//END DC SMF Search Text Strings

// DC Search Enhancement Mod
$helptxt['dcsearch_enabled'] = 'Bu Gelişmiş Arama Modifikasyonunu etkinleştirir. En iyi sonuçlar için:
1. Tam Metin Dizinini kullan (Arama dizini -> Tam Metin dizini)
2. "Bir arama dizini kullanmaya zorla" işaretlenMEmiş bırakın
3. "Sadece bütün kelimeleri eşleştir" işaretlenMEmiş bırakın
4. Gösterilecek azami sonuç: 0  (0: limitsiz)';
Title: Re: Search Enhancement Mod
Post by: demlak on January 07, 2013, 08:12:55 AM
how to disable google search for the "entire site"?
Title: Re: Search Enhancement Mod
Post by: lttung on January 20, 2013, 02:34:44 PM
Can't find code:
echo '
</div>
<div class="news normaltext">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '</form>';


to replace in index.template.php (custom themes, 2.0.3)
Title: Re: Search Enhancement Mod
Post by: TourFL on February 12, 2013, 10:45:44 AM
Hello!
I hope this mod is still supported, it's a great tool for the forum  ;)

I have regularly an SQL error in my logs, but I couldn't reproduce it myself. I don't even know if the users got an error or if it was transparent. Hope you have an idea!

I'll try to ask the member if he remembers what he searched for.

Here is the log:


http://mysite/index.php?action=search2

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 ELSE 30 / (t.num_replies + 1) END +
25 * CASE WHEN t.id_last_msg < 587' at line 7


INSERT IGNORE INTO smf_log_search_results
(id_search, id_topic, relevance, id_msg, num_matches)
SELECT
177,
t.id_topic,
1000 * ((
CASE WHEN t.num_replies < 4 AND NOT (t.is_sticky = 1 AND t.locked = 1) THEN 30 * 0,1 ELSE 30 / (t.num_replies + 1) END +
25 * CASE WHEN t.id_last_msg < 58742 THEN 0 ELSE (t.id_last_msg - 58742) / 25176 END +
30 * CASE WHEN t.num_replies < 200 THEN t.num_replies / 200 ELSE 1 END +
30 +
30 * t.is_sticky
) / 100 * (1 - 0) + 0) * CASE WHEN t.locked = 1 AND t.is_sticky = 0 THEN 0.8 ELSE 1 END AS relevance,
t.id_first_msg,
1
FROM smf_topics AS t
INNER JOIN smf_tmp_log_search_topics AS lst ON (lst.id_topic = t.id_topic)
LIMIT 1159Fichier: /home/www/xxxxx/web/Sources/DCSearch.php

Line: 1944


I use SMF 2.0.4

Thanks!
Title: Re: Search Enhancement Mod
Post by: sangham.net on May 02, 2013, 02:56:52 AM
Dear SMF friends and supporters,

I have some, maybe naive questions.

Is this mode the same, the SMF-forum here uses?
Would it search within TPortal articles as well?
Would, if work proper on SMF 2.0.4?

Thanks a lot in advanced!

(http://sangham.net/Smileys/sadhu_sangham_sw.gif)
Title: Re: Search Enhancement Mod
Post by: NekoJonez on May 07, 2013, 10:08:57 AM
This mod doesn't work on my other themes.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on May 20, 2013, 07:53:30 PM
1. It's not the same. It's better. (It doesn't miss results)
2. I don't think so, maybe you should ask in the TP mod's page.
3. Yes. Although not as well as in 1.1x (some minor bugs like the one pointed out by TourFL and no different layout in results page)

Quote from: Johann B on May 02, 2013, 02:56:52 AM
Dear SMF friends and supporters,

I have some, maybe naive questions.

Is this mode the same, the SMF-forum here uses?
Would it search within TPortal articles as well?
Would, if work proper on SMF 2.0.4?

Thanks a lot in advanced!

(http://sangham.net/Smileys/sadhu_sangham_sw.gif)
Title: Re: Search Enhancement Mod
Post by: sangham.net on May 20, 2013, 08:57:55 PM
Thanks for your care and answers, FragaCampos.

(http://sangham.net/Smileys/sadhu_sangham_sw.gif)
Title: Re: Search Enhancement Mod
Post by: GL700Wing on June 08, 2013, 05:33:49 AM
Quote from: knarf32222 on August 19, 2008, 09:44:01 PM
Quote from: knarf32222 on August 19, 2008, 05:22:27 AM
Excuse me.How to make this mod to work as follow?
When someone enter any topic, the search filter will changes to "This topic" automatically.
I already find how to do this.Just do as follow.

I've spent ages today trying to work out how to get the search focus for this mod to be contextual (ie, if a board is selected change the default search to 'This board" and if a topic is selected change the default search to 'This topic" AND only show 'This board' and/or 'This topic' when relevant).  I finally worked out to do it and, when I searched this topic yet again (and knowing what to search for), I was amazed to discover that knarf32222 worked out how to do the same thing almost five years ago!

IMHO the following minor change adds incredible value to this mod (version 1.8.x)!!

In ./Themes/default/index.template.php
Find

if (empty($context['current_topic']))
unset ($Selections['thistopic']);

if (empty($context['current_board']))
unset ($Selections['thisbrd']);

Replace with
if (empty($context['current_board']))
unset ($Selections['thisbrd']);
else $default = 'thisbrd';

if (empty($context['current_topic']))
unset ($Selections['thistopic']);
else $default = 'thistopic';
Title: Re: Search Enhancement Mod
Post by: Hristo on July 09, 2013, 06:35:02 PM
Thanks the author for this very useful mod and thanks to GL700Wing & knarf32222 for the addition!

Here is another small addition which is useful for me - guests can search the site only with google (the other options are available only for members):

Before the mod is installed find in mod's install-2.0.xml file, or if the mod is already installed find in index.template.php:

$default = 'entireforum';

if (empty($context['current_topic']))
unset ($Selections['thistopic']);

if (empty($context['current_board']))
unset ($Selections['thisbrd']);


Replace with:

if ($context['user']['is_guest']){
$default = 'entiresite';
unset ($Selections['entireforum'], $Selections['thisbrd'], $Selections['thistopic'], $Selections['members']);}

else {
$default = 'entireforum';

if (empty($context['current_board']))
unset ($Selections['thisbrd']);
else $default = 'thisbrd';

if (empty($context['current_topic']))
unset ($Selections['thistopic']);
else $default = 'thistopic';}


Title: Re: Search Enhancement Mod
Post by: FragaCampos on July 19, 2013, 02:58:55 PM
I've been testing this mod (2.0.4 hack) for the last 3 months or so and I found it has some problems finding some results. Is there anyone interested in bettering this mod?
One of the problems is this one (http://www.simplemachines.org/community/index.php?topic=188513.msg3457985#msg3457985), already referred by spiros.

PS: Don't get me wrong, but I still don't understand why the SMF search system isn't better than it actually is.  :-\
Title: Re: Search Enhancement Mod
Post by: TourFL on April 28, 2014, 04:38:01 AM
Quote from: TourFL on February 12, 2013, 10:45:44 AM
Hello!
I hope this mod is still supported, it's a great tool for the forum  ;)

I have regularly an SQL error in my logs, but I couldn't reproduce it myself. I don't even know if the users got an error or if it was transparent. Hope you have an idea!

I'll try to ask the member if he remembers what he searched for.

Here is the log:


http://mysite/index.php?action=search2

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 ELSE 30 / (t.num_replies + 1) END +
25 * CASE WHEN t.id_last_msg < 587' at line 7


INSERT IGNORE INTO smf_log_search_results
(id_search, id_topic, relevance, id_msg, num_matches)
SELECT
177,
t.id_topic,
1000 * ((
CASE WHEN t.num_replies < 4 AND NOT (t.is_sticky = 1 AND t.locked = 1) THEN 30 * 0,1 ELSE 30 / (t.num_replies + 1) END +
25 * CASE WHEN t.id_last_msg < 58742 THEN 0 ELSE (t.id_last_msg - 58742) / 25176 END +
30 * CASE WHEN t.num_replies < 200 THEN t.num_replies / 200 ELSE 1 END +
30 +
30 * t.is_sticky
) / 100 * (1 - 0) + 0) * CASE WHEN t.locked = 1 AND t.is_sticky = 0 THEN 0.8 ELSE 1 END AS relevance,
t.id_first_msg,
1
FROM smf_topics AS t
INNER JOIN smf_tmp_log_search_topics AS lst ON (lst.id_topic = t.id_topic)
LIMIT 1159Fichier: /home/www/xxxxx/web/Sources/DCSearch.php

Line: 1944


I use SMF 2.0.4

Thanks!
I went a bit further in my investigation. Apparently, the problem comes from "THEN 30 * 0,1 ELSE 30 ": the "0,1" is not recognised, and should be replaced by "0.1"
That value comes from the "topic_without_enough_replies_penalty" vaiable set to "0.1". I'm not SQL and PHP expert  :-\ Is there a way to have SQL accepting the dot as a float separator, or should I change the dots by commas in the DCSearch.php file (from line 302 to 308)? Not sure of the impact...

Thanks for any help!
Title: Re: Search Enhancement Mod
Post by: TourFL on September 14, 2015, 07:37:20 AM
I think I solved it, so I give the result if anyone has the same problem.
I may be wrong, but it appears to come from some local server settings (my service provider is in Switzerland) considering the float separator as "," and not ".", so the problem might not appear in some other countries. SQL doesn't accept the comma as number separator, and queries are generating errors.

All changes are done in DCSearch.php
As the code just inserts those floats in a SQL request (which is a string), they don't need to be explicitly declared as float.
My solution is to force as string the float variables causing problem. I obviously checked that those variables are not use in some computation before  ;) (for example: $fulltext_score_ratio is used for computation and shall not be modified)

From line 300:
$fuzzy_min_length = 2; // min length of search word to allow RLIKE query
$active_board_scoring_heuristic_enabled = true; // Rank higher matching topics within the forum the user is browsing?
$non_active_board_multiplier = '0.75';    // if searchin a specific board, give less weight to search finds on other boards
$fulltext_score_ratio = 0.4;  // ?
$short_message_threshold = 600;  // characters of a short and therefore less relevant message
$non_subject_plus_body_double_matching_multiplier = '0.75'; // less relevance to topics that don't have the seach term in the subject
$topic_without_enough_replies_penalty = '0.1'; // 0 = harshest, 1 = do not penalize
$topic_without_enough_replies_threshold = 4; // minimum number of replies the topic should have to fairly claim award for "Number of matching messages within a topic"
$locked_topic_penalty = '0.8';  // penalize topics that are locked, set to 1 to disable penalty
$max_non_content_analysis_subject_keywords_evaluated = 4; // maximum number of valid subject words to search on
$max_non_content_analysis_compensation_ratio = $fulltext_score_ratio;


Then everywhere those variables are used, I modify the code this way (maybe not necessary): every time those are inside SQL queries declared as "float:variable_name", I replace by a concatenation of the php variable.

Example, line 1832
old code:
[...] CASE WHEN lst.id_topic IS NULL THEN {float:non_subject_plus_body_double_matching_multiplier} ELSE 1 END [...]


New code
[...]  CASE WHEN lst.id_topic IS NULL THEN ' .$non_subject_plus_body_double_matching_multiplier. ' ELSE 1 END [...]


This has to be done in many places in the source code (search for all the variables which have been modified).

Search engine still works fine, and I don't have anymore SQL errors since 2 weeks.
If necessary, I can provide my modified "DCSearch.php" file, but as explained before, I'm not an SQL expert, so there might be a better way to do this!

Hope this help  :)
Title: Re: Search Enhancement Mod
Post by: mountain90 on November 02, 2015, 10:51:33 PM
Thank FragaCampos so much... :)
Title: Re: Search Enhancement Mod
Post by: crazyASD on March 30, 2016, 08:51:33 PM
Some stupid question. Where is  DCSearch_v1.8.2_SMF2.zip for SMF 2.x?
Title: Re: Search Enhancement Mod
Post by: TourFL on March 31, 2016, 05:11:11 AM
It works for me with 2.0.11, I suppose you can try installing the current version with the compatibility mode.
Title: Re: Search Enhancement Mod
Post by: FragaCampos on July 01, 2016, 05:30:13 PM
Hi there.

A few weeks ago my log registry started showing hundreds of errors from this mod.

Here it is the errors that I'm getting:
8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
File: Sources/DCSearch.php


I've read some things about the php versions and this obsolete function, but would it be possible to correct it and still use this mod?

Title: Re: Search Enhancement Mod
Post by: 1.1Nerd on January 17, 2021, 09:49:12 AM
Does anybody know if this mods works with SMF 2.0.17?
Title: Re: Search Enhancement Mod
Post by: 1.1Nerd on January 17, 2021, 09:50:12 AM
The DCSearch_v1.8.2_SMF2.zip mod file seems to be missing? Does anybody still have it?
Title: Re: Search Enhancement Mod
Post by: TourFL on January 18, 2021, 02:23:19 AM
Here you go :)



(edit-- mod removed from attachment)
Title: Re: Search Enhancement Mod
Post by: GL700Wing on January 18, 2021, 05:10:49 PM
Quote from: 1.1Nerd on January 17, 2021, 09:50:12 AM
The DCSearch_v1.8.2_SMF2.zip mod file seems to be missing? Does anybody still have it?
1.1Nerd - Please do not PM me to request support or to ask me to send you copies of mods that are no longer available to download (if a mod author has removed a mod they have done so for good reason).

Quote from: TourFL on January 18, 2021, 02:23:19 AM
Here you go :)
Thanks - 1.1Nerd asked me for a copy via PM but, given it was no longer available for download within this topic, I didn't know if anyone was allowed to share it again.
Title: Re: Search Enhancement Mod
Post by: shadav on January 18, 2021, 05:16:20 PM
I'm confused, because it's still showing on the mod page....I just downloaded it to test and downloaded without a problem....so what is missing?
Title: Re: Search Enhancement Mod
Post by: GL700Wing on January 18, 2021, 06:29:38 PM
Quote from: shadav on January 18, 2021, 05:16:20 PM
I'm confused, because it's still showing on the mod page....I just downloaded it to test and downloaded without a problem....so what is missing?

The SMF2 version (ie, DCSearch_v1.8.2_SMF2.zip) ...
Title: Re: Search Enhancement Mod
Post by: shadav on January 18, 2021, 07:54:38 PM
ah, well unfortunately the mod author removed it, nothing anyone else can really do unless they decide to reupload it

someone could maybe post instructions on how to make it work on 2.x but can't upload the zip per license.