News:

Wondering if this will always be free?  See why free is better.

Main Menu

Search Enhancement Mod

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

Previous topic - Next topic

Spuds

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. 

Spuds

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.

sharks

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

NoBrainer

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.

BaghdadGhost

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

Spuds

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.

sharks

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.

sharks

I used your new DCSearch.php file and the error log stays clear after each search. :) It seems to have fixed the problem.

BaghdadGhost

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



sharks

#389
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! :)


eric1234

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

sharks

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.

eric1234

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

sharks

It depends, when Spuds thinks the new package is ready to go live.

sharks

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.

Spuds

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.

sharks

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

Spuds

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.

sharks

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.

Advertisement: