0
votes

I have to work on a Drupal project to create user profile for some specific users on the website with some special fields. They can be a different role. Main idea is to search. User profile must be searchable with provided criteria.

I have two options, 1- Using node with (content_profile) 2. Create my own form and tables.

One my question is, is it possible to create a separate search machanism for custom created database? and is there a way to cache search result? or should I use node based? please advice some one with idea on this..

Thanks.

1
@JackBonneman Ha, you seem to be on a roll with "Drupal" spelling errors; I had no idea people had such trouble typing that! - Jason C
@JasonC Ha I know, it surprised me how many times it gets misspelled specifically as "druapl", which seems a particularly awkward misspelling to me. - Jack Bonneman

1 Answers

0
votes

Yes it is possible to create a search mechanism using views and exposing the custom table to views via the api (there is a blog post here: http://blog.menhir.be/2008/10/22/expose-database-fields-to-views-in-a-custom-drupal-module/ and there is more info using the advanced help module (http://drupal.org/project/advanced_help) (install and look through the views documetation), then you could also use the Views caching.

A custom table and fields would be my preferred method if you have a lot of users as the profile tables can get pretty big (this may not be an issue for you), or you could use the content profile module http://drupal.org/project/content_profile and possibly save yourself some work!

If you wanted to perform a complete custom search not using views you'd probably need to implement that and the caching yourself if you went the custom field/table route, but you'd gain a lot of flexibility.