News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Search Enhancement Mod

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

Previous topic - Next topic

NoBrainer

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...

NoBrainer

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.

Spuds

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 :)

Spuds

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.

pols1337

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

Spuds

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 ;)

Spuds

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  >:(

eric1234

#367
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 :(

NoBrainer

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.

Spuds

Thats just what I was looking for ... I see the error :)

Spuds

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

Bancherd

Thank you for the update, will try it on my two live forums.  :)

NoBrainer

#372
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


sharks

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. ;)

Spuds

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.

sharks

#375
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

Spuds

#376
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.

NoBrainer

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

NoBrainer

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

sharks

#379
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.

Advertisement: