README.txt file for ProfilePlus module.

This module allows you to search all public fields in a user's profile. This includes the default
fields created by Drupal e.g. username, and any custom fields you might create with the Profile module.
Multiple keyowrd searching is possible with this module. The returned results will link directly to
the user's profile.

There are two steps to the installation of this module.

1. Copy all files into their own folder, in the modules folder (preferably in sites/all/modules/profileplus).
2. In your theme's folder edit (or create) template.php and add the following code to it (you can
   omit this step if you want to keep the Users tab present on the search page):

//-- start

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {
    themename_removetab('Users', $vars);              // replace themename with your theme's name
    return $vars;
  }
  return array();
}


/**
 * Removes a tab
 */
function themename_removetab($label, &$vars) {       // replace themename with your theme's name
  $tabs = explode("\n", $vars['tabs']);
  $vars['tabs'] = '';

  foreach($tabs as $tab) {
    if(strpos($tab, '>' . $label . '<') === FALSE) {
      $vars['tabs'] .= $tab . "\n";
    }
  }
}

//-- end

NOTE: If your template.php already contains a function _phptemplate_variables, then only add the following
code into that function, before the return $vars; line (you must still add the themename_removetab function):

  if ($hook == 'page') {
    themename_removetab('Users', $vars);              // replace themename with your theme's name
  }

Once those steps are completed, you will have a User Profiles tab on your search page. The default
Users tab will have been removed to avoid confusion and redundancy, seeing as this module searches
the same data that the user.module's search does.