I have got this module working, and it creates a page at search/search_files that has a working search box for the pdfs on my site. But what I would really like to do is to embed that search box on a custom page so I can do a few things like:

  • add some explanatory text above the search box;
  • change the title of the search page (in both the html head and on the page)
  • add some sort of java script event that shows the user that the search is in progress. Kind of like the overlay clock animation people see when clicking on Lightbox

Comments

jrglasgow’s picture

Search files implements hook_search(). You can call the function search_files_search('search', $keys) and it will return an array with the search results.

On your custom page put your own form and when it is submitted call this function.

jeeves’s picture

Thanks.

Unfortunately coding a page from scratch using the search_files_search('search', $keys) is way over my head.

Any chance I can just get a snippet of code that produces the search box and search button. I could probably figure out how the rest of what I need to do on my own.

The other tricks I mentioned in my first post would be nice extras, but all I really need is insert a line or two of text before the search box explaining that the search page only searches pdfs.