PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Requests (http://www.phpdig.net/forum/forumdisplay.php?f=23)
-   -   Simple search (http://www.phpdig.net/forum/showthread.php?t=322)

petra_itl 12-23-2003 12:23 AM

Simple search
 
Hi,

I am testing PhpDig on my site (www.pathway.gr) in order to replace google search. I am new to php and I wonder if there is a way to make search more simple: to have a fixed number of displayed results eg. 10 and by default search any part of a word, so the user must enter just a "word" and the go button.

Thank you in advance

John

Charter 12-23-2003 07:19 AM

Hi. Just change the following in the config.php file:
PHP Code:

define('SEARCH_DEFAULT_LIMIT',10);      // results per page
define('SEARCH_DEFAULT_MODE','start');  // default search mode (start|exact|any) 

and then use something like the following HTML in the page:
Code:

<form action="CHANGE_ME/search.php" method="post">
  <table>
    <tr>
      <td><input name="query_string" type="text" size="35"></td>
      <td><input name="search" type="submit" value="Go"></td>
    </tr>
  </table>
</form>


petra_itl 12-24-2003 01:20 AM

works fine
 
it works fine,

if i do manage to make it work correctly with greek and latin characters it would be perfect.


Thank you

John

Charter 12-30-2003 07:17 AM

Hi. For Greek and Latin support check out this thread.


All times are GMT -8. The time now is 03:15 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.