News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1292038198:v:use_geshi-1:v:type-php

Started by SleePy, Dec 11, 2010, 03:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SleePy

   // What are we editing anyway?
   $config_vars = array(
         // Permission...
         array('permissions', 'search_posts'),
         // Some simple settings.
         array('check', 'simpleSearch'),
         array('int', 'search_results_per_page'),
         array('int', 'search_max_results', 'subtext' => $txt['search_max_results_disable']),
      '',
         // Some limitations.
         array('int', 'search_floodcontrol_time', 'subtext' => $txt['search_floodcontrol_time_desc']),
   );

   // A custom API may need additional settings.
   db_extend('search');
   $modSettings['search_index'] = empty($modSettings['search_index']) ? 'standard' : $modSettings['search_index'];
   if (file_exists($sourcedir . '/SearchAPI-' . ucwords($modSettings['search_index']) . '.php'))
   {
      loadClassFile('SearchAPI-' . ucwords($modSettings['search_index']) . '.php');

      $search_class_name = $modSettings['search_index'] . '_search';
      $searchAPI = new $search_class_name();      

      if (method_exists($searchAPI, 'searchSettings'))
         $config_vars .= $searchAPI->searchAPI();
   }


   if ($return_config)
      return $config_vars;
No siggy! :D