PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Requests

Reply
 
Thread Tools
Old 12-23-2003, 12:23 AM   #1
petra_itl
Green Mole
 
Join Date: Dec 2003
Posts: 3
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
petra_itl is offline   Reply With Quote
Old 12-23-2003, 07:19 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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>
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 12-24-2003, 01:20 AM   #3
petra_itl
Green Mole
 
Join Date: Dec 2003
Posts: 3
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
petra_itl is offline   Reply With Quote
Old 12-30-2003, 07:17 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. For Greek and Latin support check out this thread.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple include in my php template doesn't appear claudiomet How-to Forum 4 08-23-2004 06:35 AM
Simple way of inserting a search form waytorussia How-to Forum 3 10-08-2003 05:23 PM


All times are GMT -8. The time now is 09:19 AM.


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