I configured bio module such that users can edit their bio from their profile page. It now shows up as a "Bio" tab beneath the normal "View - Edit" tabs of the profile.

The problem is:

* In view-mode users see their bio info.
* but clicking on edit brings them to the normal profile settings which is counter-intuitive.

So, I like to change "Edit" to "Edit Settings" and "Bio" to "Edit Bio" to make it easier for users to know where to change which part.

Can you give me a hint where to do that?

Thanks a bunch
Markus

Comments

dldege’s picture

This can be done in your theme. I had tried doing it by creating my own menu hooks for the various paths involved but that did not work for me. Here is how I did it by overriding theme_menu_item_link in the template.php file for my custom theme ("vanilla"). You can substitute your theme name for vanilla in the following example.

function vanilla_menu_item_link($item, $link_item) {
  if (strpos($link_item['path'], 'user') === 0) {
    if ($item['title'] == 'View')
      $item['title'] = 'Overview';
    if ($item['title'] == 'Edit')
      $item['title'] = 'Edit Login';
    if ($item['title'] == 'Profile')
      $item['title'] = 'Edit Profile';
  }  
  return l($item['title'], $link_item['path'], !empty($item['description']) ? array('title' => $item['description']) : array(), isset($item['query']) ? $item['query'] : NULL);
}

Let me know if this works for you or you need more guidance.

markusH’s picture

hi dldege,

that did the job. excellent :-)

thanx a bunch
markus

markusH’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

topwaya’s picture

I've tried to put this code, substituting my theme name, in my template.php file - but I am using 6.4 - is there a way to make this work with drupal 6.4?

hollybeary’s picture

I would also like to change the text on the "edit" tab of user profiles to "edit account information". Been looking all night and can't figure it out, please help!

fehin’s picture

subscribing

ktonini’s picture

sub

benone’s picture

subscribe

MikeBC’s picture

s u b

vijayitsoft’s picture

use this for drupal 6

function YOURTHEME_preprocess_page(&$vars) {
/**
* Tweak wording on Edit tabs.
*/
// Append the Content type's name to the Edit tabs for nodes.
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = $vars['node'];
$content_type_name = node_get_types('name', $node);
$vars['tabs'] = str_replace('Edit', 'Edit ' . $content_type_name, $vars['tabs']);
}

// Append the word "profile" to the Edit tab on user profile page.
if (arg(0) == 'user' && is_numeric(arg(1))) {
$vars['tabs'] = str_replace('Edit', 'Edit ' . 'profile', $vars['tabs']);
}
} // End phptemplate_preprocess_page function.

This will work!

Merry Christmas and Happy new Year

wooody’s picture

Thank you , It's work fine