PageRenderTime 67ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/search/admin/index.php

https://bitbucket.org/molusc/sma-website
PHP | 2997 lines | 2698 code | 229 blank | 70 comment | 298 complexity | df8f3f097cc0f76328ce904e84482fe9 MD5 | raw file
Possible License(s): BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /******************************************************************************
  3. * iSearch2 - website search engine *
  4. * *
  5. * Visit the iSearch homepage at http://www.iSearchTheNet.com/isearch *
  6. * *
  7. * Copyright (C) 2002-2007 Z-Host. All rights reserved. *
  8. * *
  9. ******************************************************************************/
  10. $isearch_path = dirname(__FILE__).'/..';
  11. define('IN_ISEARCH', true);
  12. require_once "$isearch_path/inc/core.inc.php";
  13. isearch_open();
  14. isearch_createTables();
  15. require_once "$isearch_path/inc/admin_auth.inc.php";
  16. require_once "$isearch_path/inc/search.inc.php";
  17. require_once "$isearch_path/inc/spider.inc.php";
  18. require_once "$isearch_path/lang/config.inc.php";
  19. require_once "$isearch_path/style/config.inc.php";
  20. $isearch_action = isset($_REQUEST['isearch_action']) ? $_REQUEST['isearch_action'] : '';
  21. $isearch_tab = isset($_REQUEST['isearch_tab']) ? $_REQUEST['isearch_tab'] : '0';
  22. $isearch_pro = False;
  23. $isearch_pro = True;
  24. $base_url = ereg_replace('/admin((/)|(/index.php))?$', '', $PHP_SELF);
  25. if ($isearch_config['base_url'] != $base_url)
  26. {
  27. if (!mysql_query("UPDATE $isearch_table_info SET base_url='" . isearch_escape_string($base_url) . "' WHERE id='1'", $isearch_db))
  28. {
  29. echo "<P>MySQL Error : " . mysql_error() . " File: " . __FILE__ . " Line: " . __LINE__;
  30. }
  31. $isearch_config['base_url'] = $base_url;
  32. }
  33. $only_available = $isearch_pro ? '' : '<DIV style="color: red;">Only available in the professional version.</DIV><BR>';
  34. /* Array of controls on various tabs */
  35. $tabData =
  36. array(
  37. array(
  38. 'name' => 'Basic',
  39. 'description' => 'Basic configuration options',
  40. 'controls' =>
  41. array(
  42. array(
  43. 'name' => 'Site Administrator Email Address',
  44. 'description' => 'Used for emailing search log and statistics and automatic update notification. Your email address is never shared or sent from your own server.',
  45. 'varname' => 'admin_email',
  46. 'type' => 'text',
  47. 'size' => '40',
  48. 'maxlength' => '255',
  49. ),
  50. array(
  51. 'name' => 'Start URL(s)',
  52. 'description' => 'A list of URLs that spidering should start from. Multiple start sites can be specified on seperate lines.<P>This is normally your home page (e.g. "http://www.yoursite.com/"). Start&nbsp;URL(s) are always included in the search index regardless of the Allowed&nbsp;URL(s)/Exclude&nbsp;URL(s) lists. If entries in this list begin with an "@" symbol they are treated as a file containing entries.',
  53. 'varname' => 'start_urls',
  54. 'type' => 'textarea',
  55. ),
  56. array(
  57. 'name' => 'Allow URL(s) Beginning',
  58. 'description' => 'A URL must match an entry in this list or "Allow URL(s) Regexp" to be included in the search index. Multiple entries are allowed on seperate lines.<P>This should normally allow URLS from your website to be included (e.g. "http://www.yoursite.com"). If entries in this list begin with an "@" symbol they are treated as a file containing entries.',
  59. 'varname' => 'allowed_urls_beginning',
  60. 'type' => 'textarea',
  61. ),
  62. array(
  63. 'name' => 'Exclude URL(s) Beginning',
  64. 'description' => 'A URL will not be added to the search index if it begins with one of the entries in this list. Multiple entries are allowed on seperate lines.<P>This allows you to exclude certain URLs from the search index. URLs that match both the allowed list and disallowed list are not included in the search index. (e.g. "http://www.yoursite.com/private/"). This does not affect URLs already in the search index (use "Reset URL Index" then "Spider" after changing this setting). If entries in this list begin with an "@" symbol they are treated as a file containing entries.',
  65. 'varname' => 'exclude_urls_beginning',
  66. 'type' => 'textarea',
  67. ),
  68. array(
  69. 'name' => 'Test Mode',
  70. 'description' => '<UL><LI>Disabled - Test mode is disabled.<LI>Follow Links Only - The spider will follow links, but will not create a search index.</UL>',
  71. 'varname' => 'test_mode',
  72. 'type' => 'combo',
  73. 'items' =>
  74. array(
  75. array('value' => '0', 'description' => 'Disabled'),
  76. array('value' => '1', 'description' => 'Follow Links Only'),
  77. ),
  78. ),
  79. array(
  80. 'name' => 'Update Notification',
  81. 'description' => 'Periodically check for updates to iSearch and send you an email if a newer version is available.',
  82. 'varname' => 'notify_updates',
  83. 'type' => 'checkbox',
  84. ),
  85. ),
  86. ),
  87. array(
  88. 'name' => 'Spider Basic',
  89. 'description' => 'Basic settings for the spider engine',
  90. 'controls' =>
  91. array(
  92. array(
  93. 'name' => 'Allowed File Extension(s)',
  94. 'description' => 'Only files with the file extensions specified will be spidered. Multiple entries are seperated by spaces. (e.g. "php&nbsp;htm&nbsp;html"). In addition, URLs without file extensions will be treated as directories (see the "Allow Directories" configuration option).',
  95. 'varname' => 'allowed_ext',
  96. 'type' => 'text',
  97. 'size' => '40',
  98. 'maxlength' => '255',
  99. ),
  100. array(
  101. 'name' => 'Directory Handling',
  102. 'description' => 'Specify how directories (URLs without a "." in the filename) are handled. Normally you should allow them and add a trailing slash.',
  103. 'varname' => 'directory_handling',
  104. 'type' => 'combo',
  105. 'items' =>
  106. array(
  107. array('value' => '0', 'description' => 'Directories are Excluded'),
  108. array('value' => '1', 'description' => 'Allow Directories'),
  109. array('value' => '2', 'description' => 'Allow and Add Trailing Slash'),
  110. array('value' => '3', 'description' => 'Allow and Strip Trailing Slash'),
  111. ),
  112. ),
  113. array(
  114. 'name' => 'Strip Default Filenames',
  115. 'description' => 'A list of default filenames that will be removed from URLs. If a URL ends in one of these filenames, the filename will be stripped from the URL.',
  116. 'varname' => 'strip_defaults',
  117. 'type' => 'text',
  118. 'size' => '40',
  119. 'maxlength' => '255',
  120. ),
  121. array(
  122. 'name' => 'Keep Cached Copies',
  123. 'description' => 'Keeps a cached copy of the page contents when it was spidered. This can be useful for dynamic pages that update frequently.',
  124. 'varname' => 'keep_cache',
  125. 'type' => 'checkbox',
  126. ),
  127. array(
  128. 'name' => 'www subdomain handling',
  129. 'description' => 'Select whether you want the www subdomain to be left as it is, stripped off or always added when spidering pages. If you select "Leave as is" you may end up with multiple copies of the same page in the search index, e.g. <I>http://www.yourdomain.com/index.php</I> and <I>http://yourdomain.com/index.php</I>. If you do not use subdomains of your main domain, it is suggested to use the "Add www subdomain" option.',
  130. 'varname' => 'www_option',
  131. 'type' => 'combo',
  132. 'items' =>
  133. array(
  134. array('value' => '1', 'description' => 'Leave as is'),
  135. array('value' => '2', 'description' => 'Strip www subdomains'),
  136. array('value' => '3', 'description' => 'Add www subdomain'),
  137. ),
  138. ),
  139. array(
  140. 'name' => 'Max File Size',
  141. 'description' => 'Maximum number of bytes to read from each file that we index. If a file is larger than this, only the first part of it will be read.' . $isearch_pro ? ' If you index PDF or MS Word documents, you should probably increase this setting to 1048576 (1MB). Note that the limit for online conversion is 1048576 bytes.' : '',
  142. 'varname' => 'max_file_size',
  143. 'type' => 'text',
  144. 'size' => '7',
  145. 'maxlength' => '7',
  146. 'min' => '4096',
  147. 'max' => '9999999',
  148. ),
  149. array(
  150. 'name' => 'Stop Word Length',
  151. 'description' => 'Words of this number of characters or less will be ignored during spidering. Suggested value is 2 or 3. Set to 0 to disable this feature.',
  152. 'varname' => 'stop_words_length',
  153. 'type' => 'text',
  154. 'size' => '2',
  155. 'maxlength' => '2',
  156. 'min' => '0',
  157. 'max' => '10',
  158. ),
  159. array(
  160. 'name' => 'Stop Words',
  161. 'description' => 'Define a list of words to ignore during searching. Searching for these words will not match anything.',
  162. 'varname' => 'stop_words',
  163. 'type' => 'textarea',
  164. ),
  165. array(
  166. 'name' => 'Spider Echo Level',
  167. 'description' => 'Level of information displayed on screen when spidering. 0 is silent, 1 logs only errors, 10 is very verbose. Suggested value is 3.',
  168. 'varname' => 'log_echo_level',
  169. 'type' => 'text',
  170. 'size' => '2',
  171. 'maxlength' => '2',
  172. 'min' => '0',
  173. 'max' => '10',
  174. ),
  175. ),
  176. ),
  177. array(
  178. 'name' => 'Spider Advanced',
  179. 'description' => 'Advanced settings for the spider engine',
  180. 'notes' => '<UL><LI>For more information about using regular expressions (regexps), <A HREF="http://www.phpbuilder.com/columns/dario19990616.php3" TARGET="_blank">click here</A>.</LI></UL>',
  181. 'controls' =>
  182. array(
  183. array(
  184. 'name' => 'Allow URL(s) Regexp',
  185. 'description' => 'A list regular expressions for URLs that are allowed in the search index. Multiple entries are allowed on seperate lines. These normally start with your website (e.g. "^http://(www\.)?yoursite\.com"). The "^" character matches a start of string, "$" matches an end of string, "." matches a single character, "\\." matches a dot, "(www\.)?" matches an optional "www." subdomain, ".*" matches any string. If entries in this list begin with an "@" symbol they are treated as a file containing entries.',
  186. 'varname' => 'allowed_urls',
  187. 'type' => 'textarea',
  188. ),
  189. array(
  190. 'name' => 'Exclude URL(s) Regexp',
  191. 'description' => 'A list regular expressions for URLs that will not be added to the search index. This allows more powerful pattern matching for URL exclusion. (e.g. "^http://(www\.)?yoursite\.com/private/"). This does not affect URLs already in the search index (use "Reset URL Index" then "Spider" after changing this setting). If entries in this list begin with an "@" symbol they are treated as a file containing entries.',
  192. 'varname' => 'exclude_urls',
  193. 'type' => 'textarea',
  194. ),
  195. array(
  196. 'name' => 'Follow Frames',
  197. 'description' => 'Causes the spider engine to index any sub-frames that it finds. Note that many major search engines (including Google) do not do this. It is much better to author your site to support legacy browsers using the &lt;NOFRAMES&gt; tag.',
  198. 'varname' => 'follow_frames',
  199. 'type' => 'checkbox',
  200. ),
  201. array(
  202. 'name' => 'Aggressive Link Search',
  203. 'description' => 'Aggressive link search attempts to find links to other pages that are not HTML anchors. Any complete URLs will be found anywhere on your page (they must include the "http://" part), including within comments and HTML &lt;head&gt; section.',
  204. 'varname' => 'aggressive_link_search',
  205. 'type' => 'checkbox',
  206. ),
  207. array(
  208. 'name' => 'Javascript Link Search',
  209. 'description' => 'Attempts to find links to pages that within JavaScript. It searches for JavaScript window.open() calls in indexed pages. If you do not use JavaScript menus, then select "None". If you use embedded JavaScipt menus (i.e. the JavaScript is in the HTML file) then select "Embedded*quot;. If your JavaScript menus are in seperate (.js) files, then select "Embedded and External".',
  210. 'varname' => 'javascript_link_search',
  211. 'type' => 'combo',
  212. 'items' =>
  213. array(
  214. array('value' => '0', 'description' => 'None'),
  215. array('value' => '1', 'description' => 'Embedded'),
  216. array('value' => '2', 'description' => 'Embedded and External'),
  217. ),
  218. ),
  219. array(
  220. 'name' => 'Remove GET variables',
  221. 'description' => 'A list of variable names that will be removed from the query part (after a ?) of URLs. This can be used to strip variables using for storing session information. e.g. "PHPSESSID". If your site does not have dynamic content, you could set this to "*" to remove all GET variables (everything after the "?" will be stripped.',
  222. 'varname' => 'remove_get_vars',
  223. 'type' => 'text',
  224. 'size' => '40',
  225. 'maxlength' => '255',
  226. ),
  227. array(
  228. 'name' => 'Additional Spider Delay',
  229. 'description' => 'Inserts an additional delay (in seconds) between spidering of each page. This reduces the load on your server, but increases the times it takes to spider your site. Set to 0 to disable.',
  230. 'varname' => 'spider_delay',
  231. 'type' => 'text',
  232. 'size' => '4',
  233. 'maxlength' => '4',
  234. 'min' => '0',
  235. 'max' => '9999',
  236. ),
  237. array(
  238. 'name' => 'Url Search',
  239. 'description' => 'This option allows parts of a URL to be replaced using a regexp before it is opened. If your site is hosted by Lycos, you may be unable to use url file opens. Set <I>Url Search</I> to "^http://members\\.lycos\\.co\\.uk/username/" and <I>Url Replace</I> to "/data/members/free/tripod/uk/u/s/e/username/htdocs/" (ensure that path names are correct for your site). Leave empty to disable this option.',
  240. 'varname' => 'url_search',
  241. 'type' => 'text',
  242. 'size' => '40',
  243. 'maxlength' => '255',
  244. ),
  245. array(
  246. 'name' => 'Url Replace',
  247. 'description' => 'See <I>URL Search</I> above.',
  248. 'varname' => 'url_replace',
  249. 'type' => 'text',
  250. 'size' => '40',
  251. 'maxlength' => '255',
  252. ),
  253. array(
  254. 'name' => 'Basic Authorization',
  255. 'description' => 'If your site uses HTTP Basic Authorization (.htaccess files) for user login, enter a username and password (seperated by a colon) for iSearch, so that password protected pages on your site can be read, e.g. "username:password". <B>WARNING: THIS IS SENT ON ALL URL REQUESTS THAT ISEARCH MAKES</B>. Check your "Allowed URL(s)" carefull to make sure that you do not give you password to other sites.',
  256. 'varname' => 'basic_authorization',
  257. 'type' => 'text',
  258. 'size' => '40',
  259. 'maxlength' => '255',
  260. ),
  261. array(
  262. 'name' => 'Follow Meta Refresh',
  263. 'description' => 'Causes the spider engine to index any pages that are redirected to using an HTML &quot;META REFRESH&quot; tag.',
  264. 'varname' => 'follow_meta_refresh',
  265. 'type' => 'checkbox',
  266. ),
  267. array(
  268. 'name' => 'File Redirect Handling',
  269. 'description' => 'Determine the handling of File redirects (i.e. HTTP "Location" headers)',
  270. 'varname' => 'file_redirect_handling',
  271. 'type' => 'combo',
  272. 'items' =>
  273. array(
  274. array('value' => '0', 'description' => 'Do Not Follow File Redirects'),
  275. array('value' => '1', 'description' => 'Follow All File Redirects'),
  276. array('value' => '2', 'description' => 'Follow Redirects within Current Domain'),
  277. array('value' => '3', 'description' => 'Follow Redirects within Allowed URLs'),
  278. ),
  279. ),
  280. array(
  281. 'name' => 'Directory Redirect Handling',
  282. 'description' => 'Determine the handling of directory redirects (i.e. HTTP "Location" headers)',
  283. 'varname' => 'dir_redirect_handling',
  284. 'type' => 'combo',
  285. 'items' =>
  286. array(
  287. array('value' => '0', 'description' => 'Do Not Follow Directory Redirects'),
  288. array('value' => '1', 'description' => 'Follow All Directory Redirects'),
  289. array('value' => '2', 'description' => 'Follow Redirects within Current Domain'),
  290. array('value' => '3', 'description' => 'Follow Redirects within Allowed URLs'),
  291. ),
  292. ),
  293. array(
  294. 'name' => 'Ignore Image Alt Tags',
  295. 'description' => 'Causes iSearch to ignore the &lt;alt&gt; tag taxt of images in the spider index.',
  296. 'varname' => 'ignore_image_alt_tags',
  297. 'type' => 'checkbox',
  298. ),
  299. array(
  300. 'name' => 'Reading Mechanism',
  301. 'description' => 'Determine how iSearch reads files that it is spidering.<UL>' .
  302. '<LI>"Auto Detect" will automatically detect a mechnism that should work.<BR>'.
  303. '<LI>"fopen" uses PHP fopen wrappers ('.($isearch_url_fopen_detected ? '' : 'NOT ').'OK).<BR>'.
  304. '<LI>"sockets" uses native sockets (http only) ('.($isearch_sockets_detected ? '' : 'NOT ').'OK).<BR>'.
  305. '<LI>"curl" uses libcurl, which must be compiled into your PHP executable ('.($isearch_curl_detected ? '' : 'NOT ').'OK).</UL>',
  306. 'varname' => 'reading_mechanism',
  307. 'type' => 'combo',
  308. 'items' =>
  309. array(
  310. array('value' => '0', 'description' => 'Auto Detect'),
  311. array('value' => '1', 'description' => 'fopen'),
  312. array('value' => '2', 'description' => 'sockets'),
  313. array('value' => '3', 'description' => 'curl'),
  314. ),
  315. ),
  316. ),
  317. ),
  318. array(
  319. 'name' => 'Proxy',
  320. 'description' => 'Enable spidering of sites using a proxy server.',
  321. 'controls' =>
  322. array(
  323. array(
  324. 'name' => 'Proxy Enable',
  325. 'description' => 'Enable use of a proxy server for spidering pages.',
  326. 'varname' => 'proxy_enable',
  327. 'type' => 'checkbox',
  328. ),
  329. array(
  330. 'name' => 'Proxy Host',
  331. 'description' => 'Host name of the proxy server. This can be a name or an IP address.',
  332. 'varname' => 'proxy_host',
  333. 'type' => 'text',
  334. 'size' => '20',
  335. 'maxlength' => '128',
  336. ),
  337. array(
  338. 'name' => 'Proxy Port',
  339. 'description' => 'Port number of the proxy server.',
  340. 'varname' => 'proxy_port',
  341. 'type' => 'text',
  342. 'size' => '5',
  343. 'maxlength' => '5',
  344. 'min' => '0',
  345. 'max' => '65535',
  346. ),
  347. array(
  348. 'name' => 'Proxy Username',
  349. 'description' => 'Username to use for proxy authentication. Leave blank to disable proxy authentication.',
  350. 'varname' => 'proxy_user',
  351. 'type' => 'text',
  352. 'size' => '20',
  353. 'maxlength' => '40',
  354. ),
  355. array(
  356. 'name' => 'Proxy Pasword',
  357. 'description' => 'Password to use for proxy authentication. Note this is stored in plain text format in the MySQL database.',
  358. 'varname' => 'proxy_pass',
  359. 'type' => 'text',
  360. 'size' => '20',
  361. 'maxlength' => '40',
  362. ),
  363. ),
  364. ),
  365. array(
  366. 'name' => 'Character Set',
  367. 'description' => 'Character set settings for your site',
  368. 'controls' =>
  369. array(
  370. array(
  371. 'name' => 'Character Set',
  372. 'description' => 'Select the character set that will be used in the content-type meta tag of the results page. This should be set to the character set used throughout the rest of your site. Examples settings are "iso-8859-1" for ISO 8859-1 Western European, "shift-jis" for Japanese language, "utf-8" for international languages.',
  373. 'varname' => 'char_set',
  374. 'type' => 'text',
  375. 'tolower' => true,
  376. 'size' => '20',
  377. 'maxlength' => '255',
  378. ),
  379. array(
  380. 'name' => '8 Bit',
  381. 'description' => 'Set to true if your character set can be represented as 8 bits. This includes ISO-8859 charsets (containing accented characters). If you use a multi-byte character set (such as for Chinese or Japanese languages), change this to False. This causes less manipulation of character data stored and searched for.',
  382. 'varname' => 'char_set_8_bit',
  383. 'type' => 'checkbox',
  384. ),
  385. array(
  386. 'name' => 'Language',
  387. 'description' => 'Select the language that you want to use to display search results.',
  388. 'varname' => 'lang_name',
  389. 'type' => 'combo',
  390. 'itemvar' => 'isearch_lang_config', /* read items from $isearch_lang_config */
  391. ),
  392. ),
  393. ),
  394. array(
  395. 'name' => 'Search',
  396. 'description' => 'Change how searches are performed and what options are available to visitors.',
  397. 'controls' =>
  398. array(
  399. array(
  400. 'name' => 'Partial Matches',
  401. 'description' => 'The default setting for partial matches. If this is not enabled, then exact word matches will be performed. With this enabled partial word matches will be performed. The user can override this on the "Advanced Search" form.',
  402. 'varname' => 'search_partial',
  403. 'type' => 'combo',
  404. 'items' =>
  405. array(
  406. array('value' => '0', 'description' => 'Always Use Exact Matching'),
  407. array('value' => '1', 'description' => 'Always Use Partial Matching'),
  408. array('value' => '2', 'description' => 'Use Partial if Exact Match Fails'),
  409. ),
  410. ),
  411. array(
  412. 'name' => 'Must Match All',
  413. 'description' => 'Determines the default behaviour when the user enters multiple words as a search term. If disabled, then pages matching ANY of the entered words will be displayed. If enabled, only pages that match ALL of the entered words will be displayed.',
  414. 'varname' => 'search_all',
  415. 'type' => 'checkbox',
  416. ),
  417. array(
  418. 'name' => 'Allow Dashes',
  419. 'description' => 'Allows the user to search for hyphenated words in the search box. <P><B>-</B> When set to &quot;Replace With Space&quot;, a dash within a word is replaced by a space character, so the hyphenated word is treated as 2 seperate words.<BR><B>-</B> When set to &quot;Allow Within Words&quot; a dash within a word will be left as is. Dashes before or after words will be removed.<BR><B>-</B> When set to &quot;Allow Anywhere&quot; dashes anywhere are left as they are.<BR><B>-</B> When set to &quot;Remove All&quot; all dashes will be removed. <P>To enable search words exclusion, the dash must be surrounded by spaces. You should respider your site after changing this option.',
  420. 'varname' => 'allow_dashes',
  421. 'type' => 'combo',
  422. 'items' =>
  423. array(
  424. array('value' => '0', 'description' => 'Replace With Space'),
  425. array('value' => '1', 'description' => 'Allow Within Words'),
  426. array('value' => '2', 'description' => 'Allow Anywhere'),
  427. array('value' => '3', 'description' => 'Remove All'),
  428. ),
  429. ),
  430. array(
  431. 'name' => 'Allow Colons',
  432. 'description' => 'When enabled allows the user to search for words containing a colon (&quot;:&quot;) in the search box. You should respider your site after changing this option.',
  433. 'description' => 'Allows the user to search for words containing a colon (&quot;:&quot;) in the search box.<P><B>-</B> When set to &quot;Replace With Space&quot;, a colon within a word is replaced by a space character, so the word is treated as 2 seperate words.<BR><B>-</B> When set to &quot;Allow Within Words&quot; a colon within a word will be left as is. Colons before or after words will be removed.<BR><B>-</B> When set to &quot;Allow Anywhere&quot; colons anywhere are left as they are.<BR><B>-</B> When set to &quot;Remove All&quot; all colons will be removed.<P>You should respider your site after changing this option.',
  434. 'varname' => 'allow_colons',
  435. 'type' => 'combo',
  436. 'items' =>
  437. array(
  438. array('value' => '0', 'description' => 'Replace With Space'),
  439. array('value' => '1', 'description' => 'Allow Within Words'),
  440. array('value' => '2', 'description' => 'Allow Anywhere'),
  441. array('value' => '3', 'description' => 'Remove All'),
  442. ),
  443. ),
  444. array(
  445. 'name' => 'Allow Dots',
  446. 'description' => 'Allows the user to search for words containing a dot (&quot;.&quot;) in the search box.<P><B>-</B> When set to &quot;Replace With Space&quot;, a dot within a word is replaced by a space character, so the word is treated as 2 seperate words.<BR><B>-</B> When set to &quot;Allow Within Words&quot; a dot within a word will be left as is. Dots before or after words will be removed.<BR><B>-</B> When set to &quot;Allow Anywhere&quot; dots anywhere are left as they are.<BR><B>-</B> When set to &quot;Remove All&quot; all dots will be removed.<P>You should respider your site after changing this option.',
  447. 'varname' => 'allow_dots',
  448. 'type' => 'combo',
  449. 'items' =>
  450. array(
  451. array('value' => '0', 'description' => 'Replace With Space'),
  452. array('value' => '1', 'description' => 'Allow Within Words'),
  453. array('value' => '2', 'description' => 'Allow Anywhere'),
  454. array('value' => '3', 'description' => 'Remove All'),
  455. ),
  456. ),
  457. array(
  458. 'name' => 'Allow Commas',
  459. 'description' => 'Allows the user to search for words containing a comma (&quot;,&quot;) in the search box.<P><B>-</B> When set to &quot;Replace With Space&quot;, a comma within a word is replaced by a space character, so the word is treated as 2 seperate words.<BR><B>-</B> When set to &quot;Allow Within Words&quot; a comma within a word will be left as is. Commas before or after words will be removed.<BR><B>-</B> When set to &quot;Allow Anywhere&quot; commas anywhere are left as they are.<BR><B>-</B> When set to &quot;Remove All&quot; all commas will be removed.<P>You should respider your site after changing this option.',
  460. 'varname' => 'allow_commas',
  461. 'type' => 'combo',
  462. 'items' =>
  463. array(
  464. array('value' => '0', 'description' => 'Replace With Space'),
  465. array('value' => '1', 'description' => 'Allow Within Words'),
  466. array('value' => '2', 'description' => 'Allow Anywhere'),
  467. array('value' => '3', 'description' => 'Remove All'),
  468. ),
  469. ),
  470. array(
  471. 'name' => 'Allow Underscores',
  472. 'description' => 'Allows the user to search for words containing an underscore (&quot;_&quot;) in the search box.<P><B>-</B> When set to &quot;Replace With Space&quot;, an underscore within a word is replaced by a space character, so the word is treated as 2 seperate words.<BR><B>-</B> When set to &quot;Allow Within Words&quot; an underscore within a word will be left as is. Underscores before or after words will be removed.<BR><B>-</B> When set to &quot;Allow Anywhere&quot; underscores anywhere are left as they are.<BR><B>-</B> When set to &quot;Remove All&quot; all underscores will be removed.<P>You should respider your site after changing this option.',
  473. 'varname' => 'allow_underscores',
  474. 'type' => 'combo',
  475. 'items' =>
  476. array(
  477. array('value' => '0', 'description' => 'Replace With Space'),
  478. array('value' => '1', 'description' => 'Allow Within Words'),
  479. array('value' => '2', 'description' => 'Allow Anywhere'),
  480. array('value' => '3', 'description' => 'Remove All'),
  481. ),
  482. ),
  483. array(
  484. 'name' => 'Body Word Rank',
  485. 'description' => 'Words found in the main body add a score of <I>Body Word Rank</I> to the page rank. Takes effect next time the site is spidered.',
  486. 'varname' => 'word_rank',
  487. 'type' => 'text',
  488. 'size' => '7',
  489. 'maxlength' => '7',
  490. 'min' => '0',
  491. 'max' => '1000000',
  492. ),
  493. array(
  494. 'name' => 'Body Heading Word Rank',
  495. 'description' => 'If a word with the body is in an HTML heading the page score is increased by <I>Heading Word Rank</I>. Takes effect next time the site is spidered.',
  496. 'varname' => 'heading_rank',
  497. 'type' => 'text',
  498. 'size' => '7',
  499. 'maxlength' => '7',
  500. 'min' => '0',
  501. 'max' => '1000000',
  502. ),
  503. array(
  504. 'name' => 'Keyword Rank',
  505. 'description' => 'Keywords found in the keywords meta tag add a score of <I>Keyword Rank</I> to the page rank. Set this to 0 to ignore keywords. Takes effect next time the site is spidered.',
  506. 'varname' => 'keyword_rank',
  507. 'type' => 'text',
  508. 'size' => '7',
  509. 'maxlength' => '7',
  510. 'min' => '0',
  511. 'max' => '1000000',
  512. ),
  513. array(
  514. 'name' => 'Title Rank',
  515. 'description' => 'Words within the page title add a score of <I>Title Rank</I> to the page rank. Set this to 0 to ignore page titles. Takes effect next time the site is spidered.',
  516. 'varname' => 'title_rank',
  517. 'type' => 'text',
  518. 'size' => '7',
  519. 'maxlength' => '7',
  520. 'min' => '0',
  521. 'max' => '1000000',
  522. ),
  523. array(
  524. 'name' => 'URL Rank',
  525. 'description' => 'Words within the page URL add a score of <I>URL Rank</I> to the page rank. Set this to 0 to ignore URLs when scoring. Takes effect next time the site is spidered.',
  526. 'varname' => 'url_rank',
  527. 'type' => 'text',
  528. 'size' => '7',
  529. 'maxlength' => '7',
  530. 'min' => '0',
  531. 'max' => '1000000',
  532. ),
  533. array(
  534. 'name' => 'Search Box Width',
  535. 'description' => 'Width in characters of the search box on the results page.',
  536. 'varname' => 'search_box_width',
  537. 'type' => 'text',
  538. 'size' => '3',
  539. 'maxlength' => '3',
  540. 'min' => '0',
  541. 'max' => '999',
  542. ),
  543. array(
  544. 'name' => 'Search Internet',
  545. 'description' => 'Include a "Search Internet" button on the simple search form.',
  546. 'varname' => 'search_internet',
  547. 'type' => 'checkbox',
  548. ),
  549. array(
  550. 'name' => 'Help Link',
  551. 'description' => 'Include a "Help" link on the simple search form.',
  552. 'varname' => 'search_help_link',
  553. 'type' => 'checkbox',
  554. ),
  555. array(
  556. 'name' => 'Partial Matches',
  557. 'description' => 'Include a "Partial" checkbox on the simple search form. This allows partial words to be searched for (e.g. "cat" will find pages containing "va<B>cat</B>ion").',
  558. 'varname' => 'form_show_partial',
  559. 'type' => 'checkbox',
  560. ),
  561. array(
  562. 'name' => 'Sounds Like',
  563. 'description' => 'Matching can be performed by the phonetic sound of words, rather than their exact spelling. This often allows misspelled words to be matched.',
  564. 'varname' => 'soundex',
  565. 'type' => 'combo',
  566. 'items' =>
  567. array(
  568. array('value' => '0', 'description' => 'Never Use Sounds Like'),
  569. array('value' => '1', 'description' => 'Always Use Sounds Like'),
  570. array('value' => '2', 'description' => 'Use Sounds Like if Exact Match Fails'),
  571. ),
  572. ),
  573. array(
  574. 'name' => 'Advanced Link',
  575. 'description' => 'Include an "Advanced" link on the simple search form. This allows access to advanced search options.',
  576. 'varname' => 'form_show_advanced',
  577. 'type' => 'checkbox',
  578. ),
  579. array(
  580. 'name' => 'Check For Empty Search Term',
  581. 'description' => 'Includes javascript checking for empty search term and displays an error message to the user.',
  582. 'varname' => 'check_empty_search',
  583. 'type' => 'checkbox',
  584. ),
  585. ),
  586. ),
  587. array(
  588. 'name' => 'Display',
  589. 'description' => 'Displaying Results',
  590. 'notes' => '<UL><LI>For more information about using regular expressions (regexps), <A HREF="http://www.phpbuilder.com/columns/dario19990616.php3" TARGET="_blank">click here</A>.</LI></UL>',
  591. 'controls' =>
  592. array(
  593. array(
  594. 'name' => 'Results Per Page',
  595. 'description' => 'Maximum number of search results to be displayed on each results page. If there are more than this many matches, they will be displayed on multiple pages.',
  596. 'varname' => 'results_per_page',
  597. 'type' => 'text',
  598. 'size' => '3',
  599. 'maxlength' => '3',
  600. 'min' => '1',
  601. 'max' => '100',
  602. ),
  603. array(
  604. 'name' => 'Max Pages',
  605. 'description' => 'Maximum number of result pages to be displayed.',
  606. 'varname' => 'max_pages',
  607. 'type' => 'text',
  608. 'size' => '4',
  609. 'maxlength' => '4',
  610. 'min' => '1',
  611. 'max' => '1000',
  612. ),
  613. array(
  614. 'name' => 'Description Style',
  615. 'description' => 'URL description shown below each URL in the search results. This can be the description meta tag, Google style extract from the body text of matched pages or both. Google style results are automatically used when a matched page does not have a description meta tag.',
  616. 'varname' => 'description_style',
  617. 'type' => 'combo',
  618. 'items' =>
  619. array(
  620. array('value' => '0', 'description' => 'No Description is Shown'),
  621. array('value' => '1', 'description' => 'Description Meta Tags'),
  622. array('value' => '2', 'description' => 'Google Style Extraction'),
  623. array('value' => '3', 'description' => 'Meta Tag then Google Style'),
  624. array('value' => '4', 'description' => 'Google Style then Meta Tag'),
  625. ),
  626. ),
  627. array(
  628. 'name' => 'Match Score Style',
  629. 'description' => 'Search results can optionally show a score next to them. This option defines which mechanism is used to display that score.',
  630. 'varname' => 'match_score',
  631. 'type' => 'combo',
  632. 'items' =>
  633. array(
  634. array('value' => '0', 'description' => 'No Score Is Displayed'),
  635. array('value' => '1', 'description' => 'Percentage Score Displayed'),
  636. array('value' => '2', 'description' => 'Out Of Ten Score Displayed'),
  637. ),
  638. ),
  639. array(
  640. 'name' => 'Highlight Searched Words',
  641. 'description' => 'Highlight words that were searched for in descriptions shown on the results page.',
  642. 'varname' => 'highlight_results',
  643. 'type' => 'checkbox',
  644. ),
  645. array(
  646. 'name' => 'Hide Powered By Message',
  647. 'description' => 'Hides the "Powered By iSearch2" messages.',
  648. 'enabled' => $isearch_pro,
  649. 'varname' => 'hide_powered_by',
  650. 'type' => 'checkbox',
  651. ),
  652. array(
  653. 'name' => 'Page Opening Target Frame',
  654. 'description' => 'Sets the target frame when the user clicks on one of the search results or entries in the site map. If your site uses frames, set this to the name of the frame to open page into. If you do not use frames, set this to "_self". Set it to "_blank" to open the page in a new browser window.',
  655. 'varname' => 'target_frame',
  656. 'type' => 'text',
  657. 'size' => '20',
  658. 'maxlength' => '255',
  659. ),
  660. array(
  661. 'name' => 'Strip Query',
  662. 'description' => 'Set this to prevent the display of the query part of a URL (the part after the "?").',
  663. 'varname' => 'display_strip_query',
  664. 'type' => 'checkbox',
  665. ),
  666. array(
  667. 'name' => 'Max Title Length',
  668. 'description' => 'Maximum length (in characters) of titles that will be displayed. If a title longer than this is displayed, it will be truncated. If 0 any length title will be displayed.',
  669. 'varname' => 'max_displayed_title_length',
  670. 'type' => 'text',
  671. 'size' => '4',
  672. 'maxlength' => '4',
  673. 'min' => '0',
  674. 'max' => '9999',
  675. ),
  676. array(
  677. 'name' => 'Max Description Length',
  678. 'description' => 'Maximum length (in characters) of description that will be displayed. If a description longer than this is displayed, it will be truncated. If 0 any length description will be displayed.',
  679. 'varname' => 'max_displayed_description_length',
  680. 'type' => 'text',
  681. 'size' => '4',
  682. 'maxlength' => '4',
  683. 'min' => '0',
  684. 'max' => '9999',
  685. ),
  686. array(
  687. 'name' => 'Max Url Length',
  688. 'description' => 'Maximum length of URLs that will be displayed. If a URL longer than this is displayed, it will be shortened so that the beginning and end are displayed. If this is 0 the URL will not be displayed.',
  689. 'varname' => 'max_displayed_url_length',
  690. 'type' => 'text',
  691. 'size' => '4',
  692. 'maxlength' => '4',
  693. 'min' => '0',
  694. 'max' => '9999',
  695. ),
  696. array(
  697. 'name' => 'Style',
  698. 'description' => 'Select the style that you want to use to display search results.',
  699. 'varname' => 'style_name',
  700. 'type' => 'combo',
  701. 'itemvar' => 'isearch_style_config', /* read items from $isearch_style_config */
  702. ),
  703. array(
  704. 'name' => 'Sitemap Format',
  705. 'description' => 'Set the default display used to generate the sitemap page. Grouped sitemaps are only available in the professional version.',
  706. 'varname' => 'sitemap_type',
  707. 'type' => 'combo',
  708. 'items' =>
  709. array(
  710. array('value' => '0', 'description' => 'Link Hierarchy'),
  711. array('value' => '1', 'description' => 'Flat Unordered'),
  712. array('value' => '2', 'description' => 'Flat Sorted By URL'),
  713. array('value' => '3', 'description' => 'Flat Sorted By Title'),
  714. array('value' => '4', 'description' => 'Directory Hierarchy'),
  715. array('value' => '5', 'description' => 'Grouped Unordered'),
  716. array('value' => '6', 'description' => 'Grouped Sorted By URL'),
  717. array('value' => '7', 'description' => 'Grouped Sorted By Title'),
  718. ),
  719. ),
  720. array(
  721. 'name' => 'Hide Regexp',
  722. 'description' => 'Hide characters matching this regular expression from being displayed in the results descriptions. Normally this should be left blank.',
  723. 'varname' => 'hide_regexp',
  724. 'type' => 'text',
  725. 'size' => '20',
  726. 'maxlength' => '255',
  727. ),
  728. array(
  729. 'name' => 'Space-Replace Regexp',
  730. 'description' => 'Replace matches for this regular expression with spaces when they are displayed in the results descriptions. Normally this should be left blank.',
  731. 'varname' => 'replace_regexp',
  732. 'type' => 'text',
  733. 'size' => '20',
  734. 'maxlength' => '255',
  735. ),
  736. array(
  737. 'name' => 'Show Time',
  738. 'description' => 'Show the time (number of seconds) that the search took to execute.',
  739. 'varname' => 'show_time',
  740. 'type' => 'checkbox',
  741. ),
  742. array(
  743. 'name' => 'Show Title',
  744. 'description' => 'Show page titles in search results.',
  745. 'varname' => 'show_title',
  746. 'type' => 'checkbox',
  747. ),
  748. array(
  749. 'name' => 'Show Size',
  750. 'description' => 'Show the size of pages in the search results.',
  751. 'varname' => 'show_size',
  752. 'type' => 'checkbox',
  753. ),
  754. array(
  755. 'name' => 'Previous and Next',
  756. 'description' => 'Determine where previous and next page links are displayed. If you set this to "Nowhere" you will only be able see 1 page of results. If you select an "Optional" setting the previous and next bars will only be shown when there are previous and next links to display. If you select "Always" they will always be shown, and empty if there is only 1 page of results.',
  757. 'varname' => 'prevnext_type',
  758. 'type' => 'combo',
  759. 'items' =>
  760. array(
  761. array('value' => '0', 'description' => 'Nowhere'),
  762. array('value' => '1', 'description' => 'Above Results - Optional'),
  763. array('value' => '2', 'description' => 'Below Results - Optional'),
  764. array('value' => '3', 'description' => 'Above and Below - Optional'),
  765. array('value' => '4', 'description' => 'Above Results - Always'),
  766. array('value' => '5', 'description' => 'Below Results - Always'),
  767. array('value' => '6', 'description' => 'Above and Below - Always'),
  768. ),
  769. ),
  770. array(
  771. 'name' => 'Prev/Next Num Pages',
  772. 'description' => 'Determine how many pages can be directly jumped to from previous and next links. This affects the number of digits displayed on the previous and next link line. Set to 0 to prevent any being displayed.',
  773. 'varname' => 'prevnext_num',
  774. 'type' => 'text',
  775. 'size' => '2',
  776. 'maxlength' => '2',
  777. 'min' => '0',
  778. 'max' => '99',
  779. ),
  780. ),
  781. ),
  782. array(
  783. 'name' => 'Advanced',
  784. 'description' => 'Advanced options that do not normally need modification',
  785. 'controls' =>
  786. array(
  787. array(
  788. 'name' =>

Large files files are truncated, but you can click here to view the full file