Search Enhancement Mod

Started by ioszilla, August 12, 2007, 05:53:15 PM

Previous topic - Next topic

Inti31

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

my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

NekoJonez

Why are there so few theme's supporting this mod?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

TheListener

Can you please elaborate on what you mean.

tsis_k

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?



Righ now all search results are showing like this and my users do not like it.

tsis_k

just a friendly bump...someone please help.

Spuds

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?

tsis_k

No, the search works fine. What I really want is my search result to be display like this.



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.

MrNicotine

#407
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!

FragaCampos

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


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

Thanks.

Paracelsus

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


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)

FragaCampos

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?

Paracelsus

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.


spiros

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.

MrNicotine

#413
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!!

spiros

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.

demlak

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


Badboy

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)';
Nothing is true, everything is permitted.

demlak

how to disable google search for the "entire site"?

lttung

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)

TourFL

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!
If you like Fiat 500 and derived models, the SMF forum I'm helping with: www.500-126.com

Advertisement: