Question

Can any one suggest simple code snippet for combining account and profile tabs in drupal 6. i'm using onepageprofile module it works fine but any other simple solution ?

Was it helpful?

Solution

This is tricky. If you have groups defined in the Profile module, like About Me, Address Information, etc example categories, they show up as tabs in the $tabs2 array of the theme template.

The obvious solution is to not group fields at all, but this could make the user edit/registration form very large and vertical.

OTHER TIPS

you need to comment line number 567 and 568 in profile.module but this is hack.

This how it is.

function _profile_get_fields($category, $register = FALSE) {
  $args = array();
  $sql = 'SELECT * FROM {profile_fields} WHERE ';
  $filters = array();
  if ($register) {
    $filters[] = 'register = 1';
  }
  else {
    // Use LOWER('%s') instead of PHP's strtolower() to avoid UTF-8 conversion issues.
    //$filters[] = "LOWER(category) = LOWER('%s')";
    //$args[] = $category;
  }
  if (!user_access('administer users')) {
    $filters[] = 'visibility != %d';
    $args[] = PROFILE_HIDDEN;
  }
  $sql .= implode(' AND ', $filters);
  $sql .= ' ORDER BY category, weight';
  return db_query($sql, $args);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top