Advertisement:

Author Topic: Search Enhancement Mod  (Read 191600 times)

Offline L.G.S

  • SMF Hero
  • ******
  • Posts: 2,658
  • Gender: Male
  • RuthlessIntent.com !
    • GamesandGoals.com
Re: SMF Search Enhancement Mod
« Reply #40 on: August 14, 2007, 09:04:32 AM »
Yes, I'm on a shared server ;)
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Offline ES23

  • Semi-Newbie
  • *
  • Posts: 85
Re: SMF Search Enhancement Mod
« Reply #41 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!!!

Offline ioszilla

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
  • Freedom to be unfree.
Re: SMF Search Enhancement Mod
« Reply #42 on: August 14, 2007, 12:14:17 PM »
It's caused by a confirmed bug 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. :)

« Last Edit: August 14, 2007, 12:26:12 PM by wordzilla »

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,727
  • xxx
Re: SMF Search Enhancement Mod
« Reply #43 on: August 14, 2007, 12:49:52 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.
Liverpool FC Forum with 14 million+ posts.

Offline Eleglin

  • Sr. Member
  • ****
  • Posts: 754
  • Gender: Male
    • Les Archives de Gondor
Re: SMF Search Enhancement Mod
« Reply #44 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
No support by PM or Mail.

Offline L.G.S

  • SMF Hero
  • ******
  • Posts: 2,658
  • Gender: Male
  • RuthlessIntent.com !
    • GamesandGoals.com
Re: SMF Search Enhancement Mod
« Reply #45 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!
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Offline ioszilla

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
  • Freedom to be unfree.
Re: SMF Search Enhancement Mod
« Reply #46 on: August 14, 2007, 04:33:03 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. :)

Offline Eleglin

  • Sr. Member
  • ****
  • Posts: 754
  • Gender: Male
    • Les Archives de Gondor
No support by PM or Mail.

Offline ioszilla

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
  • Freedom to be unfree.
Re: SMF Search Enhancement Mod
« Reply #48 on: August 14, 2007, 04:44:47 PM »
Well, yes u right, I actually used "open source" in its loosest sense here. ;)

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,630
  • Gender: Male
    • Lifeproof
Re: SMF Search Enhancement Mod
« Reply #49 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.

Offline ES23

  • Semi-Newbie
  • *
  • Posts: 85
Re: SMF Search Enhancement Mod
« Reply #50 on: August 15, 2007, 06:37:26 AM »
It's caused by a confirmed bug 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...

Offline ioszilla

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
  • Freedom to be unfree.
Re: SMF Search Enhancement Mod
« Reply #51 on: August 15, 2007, 06:40:38 AM »
Quote
now bugged by the modify_inline issue now

Is this issue related to this mod?

Offline ES23

  • Semi-Newbie
  • *
  • Posts: 85
Re: SMF Search Enhancement Mod
« Reply #52 on: August 15, 2007, 06:57:10 AM »
Quote
now 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 :)

Offline ioszilla

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
  • Freedom to be unfree.
Re: Search Enhancement Mod
« Reply #53 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. :)

Offline ES23

  • Semi-Newbie
  • *
  • Posts: 85
Re: Search Enhancement Mod
« Reply #54 on: August 17, 2007, 05:25:43 AM »
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.
« Last Edit: August 17, 2007, 05:29:04 AM by ES23 »

Offline ioszilla

  • Jr. Member
  • **
  • Posts: 252
  • Gender: Male
  • Freedom to be unfree.
Re: Search Enhancement Mod
« Reply #55 on: August 17, 2007, 05:46:26 AM »
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.

Offline Eleglin

  • Sr. Member
  • ****
  • Posts: 754
  • Gender: Male
    • Les Archives de Gondor
Re: Search Enhancement Mod
« Reply #56 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 :)
No support by PM or Mail.

Offline tonzi

  • Jr. Member
  • **
  • Posts: 163
Re: Search Enhancement Mod
« Reply #57 on: August 18, 2007, 11:31:52 PM »
I am having an error upon installing...

./Sources/Search.php         ---------------------------             Test failed

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: Search Enhancement Mod
« Reply #58 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://www.simplemachines.org/community/index.php?topic=34526.0

The following may also prove helpful:

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

Offline videoed

  • Jr. Member
  • **
  • Posts: 187
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: Search Enhancement Mod
« Reply #59 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.

Code: [Select]
<!-- 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>
« Last Edit: August 20, 2007, 03:09:10 PM by videoed »