topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 9:19 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TjaMe [ switch to compact view ]

Pages: [1]
1
Ooops! :-[ You're absolutely right about the warning on the forum log!

I was in 'trim lines mode' & got carried away...   

:-\ I suppose that

Code: PHP [Select]
  1. if (!isset($search_params['match_mode']))
  2.     $search_params['match_mode'] = empty($_REQUEST['match_mode']) ? '' : $_REQUEST['match_mode'];

is the smallest that snippet can ever get without generating a warning.

Drats!  :o

Our forum is behind a firewall on an intranet & deals with very, very boring stuff, but if we ever have a public side to it I'll post the url, I promise!

Thank you again for sharing your really excellent code!  :D

2
Thanks a million 'zilla, your search mod is awesome! :D

I was trying to improve on the standard search myself, but got lost somewhere in between regexps & sql statements... I'm well impressed with what you've done in such a short period of time! More than well impressed, actually!  :D


I just couldn't resist modifying some of your code: I changed the following:


Code: PHP [Select]
  1. if (!isset($search_params['match_mode']))
  2.                 $search_params['match_mode'] = empty($_REQUEST['match_mode']) ? 'smart' : $_REQUEST['match_mode'];
  3.                
  4.         if (!empty($search_params['match_mode']))
  5.                 {
  6.                         switch ($search_params['match_mode']) {
  7.                         case 'whole':
  8.                             break;
  9.                         case 'smart':
  10.                             break;
  11.                         case 'any':
  12.                             break;
  13.                         default:
  14.                                 $search_params['match_mode'] = 'smart';
  15.                             break;
  16.                         }
  17.                 }
  18.         else
  19.                 $search_params['match_mode'] = 'smart';

to:

Code: PHP [Select]
  1. if (!isset($search_params['match_mode']))
  2.                 $search_params['match_mode'] = $_REQUEST['match_mode'];
  3.                
  4.         switch ($search_params['match_mode']) {
  5.                 case 'whole':
  6.                 case 'smart':
  7.                 case 'any':
  8.                         break;
  9.                 default:
  10.                         $search_params['match_mode'] = 'smart';
  11.         }

then copied it to PlusSearch1. It took me a while to notice that $context['search_params']['match_mode'] != $search_params['match_mode']

... maybe I should have resisted the temptation...  ;D

Thanks again for such a superb search engine. I seriously hope all the smf community try out your mod and realize what they've been missing all these years.

Credit where it's due. Wordzilla, you're a scholar & a gentleman, and I salute you, sir!

Pages: [1]