By globalplayer on
Is it possible to create block to search users? For example, users have text fields like "first name", "last name" in their profiles made with profile.module and I want to have a block where I could write user last name and then search if there is any on my website with this last name, is it possible to create something like this on drupal5?
Comments
Use hook_search
See hook_search
http://drupal.org/project/nodeprofile
or http://drupal.org/project/profileplus and http://drupal.org/project/user_search (but both aren't updated for 5.x)
i need a block
I have seen all those modules but they don't provide a search block , i need a block which which could be displayed on any page on left/right sidebar, on this block should be text area for user first/last name and list selection for gender, if there is any module which can do this?
Search already provide a
Search already provide a block, so you can inspire yourself from it to put it in a module and instead of searching for node, you can make it searching for profiles...
But currently I'm not aware of any module doing exactly what you need.
Custom php block
You could try a custom php block something like this:
I get an error with that
I get an error with that code
warning: preg_match() expects parameter 2 to be string, array given in /home/folder/public_html/folder2/includes/bootstrap.inc on line 684.Any suggestions?
Use this code instead
Use this code instead (http://api.drupal.org/api/function/search_form/6):
You can also swith profile with the type you expected, i.e search_files_attachments.