How to implement custom search?

jitendra_k - June 12, 2008 - 11:30
Project:Search Keywords
Version:5.x-1.0
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Description

I had been using Drupal 5.7. I had created modules like moviehome.module and page page-moviehome.tpl.php .
I need to implement search functionality on this page say need to search movies from Db.
So how i can implement search mechanism in moviehome.module or page-moviehome.tpl.php file.

I had created hook
function moviehome_search($op = 'search', $keys = NULL)
{
}
in moviehome.module but dont have idea about to call this and where to code so that search results will
appeared on my page.
Does i need to create another page for showing search results? If so then how i can?

#1

sszalla - June 12, 2008 - 12:12

Are you using the Search Keywords module? Reading your post your questions seem to have nothing to do with this module.

To implement a simple custom search page for single content types I used the Views and Views Fast Search modules. I suggest you check them out.

#2

jitendra_k - June 12, 2008 - 12:35

Yes,
I am using hook in moviehome.module but Dont Know how to use it or what things need to do and show the results. I use the Search Keyword module itself given by Drupal.

Please suggest..

 
 

Drupal is a registered trademark of Dries Buytaert.