How do I prompt user to enter a longer search string if it's less than 3 characters and I am using internal indexing? Thank you.
Jul 31, 2004, 12:37 AM
Veteran / Moderator (18441 posts)
Jul 31, 2004, 12:37 AM
Post #2 of 4
Views: 1875
Hi. My guess would be that you need a plugin to do this.
An easier way, would be to hack SearchLogger, so that it checks;
print $IN->header();
print Links::SiteHTML::display('search', { error => "Sorry, your search query was too short..." } );
exit;
}
I guess it would go around line 100, around;
$query = lc $query;
$query = substr ($query, 0, 24);
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
An easier way, would be to hack SearchLogger, so that it checks;
Code:
if (length($IN->param('query') < 3) { print $IN->header();
print Links::SiteHTML::display('search', { error => "Sorry, your search query was too short..." } );
exit;
}
I guess it would go around line 100, around;
Code:
$query =~ s/^\s*|\s*$//g; $query = lc $query;
$query = substr ($query, 0, 24);
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Jul 31, 2004, 10:00 AM
Veteran (1921 posts)
Jul 31, 2004, 10:00 AM
Post #4 of 4
Views: 1870
Try this thread for some ideas:
http://www.gossamer-threads.com/...i?post=193625#193625
http://www.gossamer-threads.com/...i?post=193625#193625