Index: avatar_selection.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/avatar_selection/avatar_selection.module,v retrieving revision 1.1.2.20.2.27 diff -u -p -r1.1.2.20.2.27 avatar_selection.module --- avatar_selection.module 1 Jul 2008 13:48:08 -0000 1.1.2.20.2.27 +++ avatar_selection.module 1 Jul 2008 14:12:47 -0000 @@ -170,6 +170,7 @@ function avatar_selection_form_alter($fo $form['picture']['select_avatar'] = array( '#type' => 'radios', '#title' => $disable_upload ? t('Select an avatar') : t('Or simply select an icon'), + '#description' => $disable_upload ? t('Your virtual face or picture.') : '', '#options' => array_slice($selects['avatars_list'], $page * $avatars_per_page, $avatars_per_page), '#default_value' => array_key_exists($current_avatar, $selects['avatars_list']) ? $current_avatar : '', '#required' => $force_choose ? TRUE : FALSE, @@ -197,7 +198,9 @@ function avatar_selection_form_alter($fo if (count($selects['avatars'])) { drupal_add_css(drupal_get_path('module', 'avatar_selection') .'/avatar_selection.css'); drupal_add_js(drupal_get_path('module', 'avatar_selection') .'/js/avatar_selection_pager.js', 'module', 'header'); + $upload = 1; if (!is_array($form['picture'])) { + $upload = 0; // I.e. Not provided by "register with picture" contributed module. $form['picture'] = array( '#type' => 'fieldset', '#title' => t('Picture'), @@ -206,7 +209,8 @@ function avatar_selection_form_alter($fo } $form['picture']['select_avatar'] = array( '#type' => 'radios', - '#title' => t('Select an avatar'), + '#title' => ($upload == 0 ? t('Select an avatar') : t('Or simply select an icon')), + '#description' => $upload ? '' : t('Your virtual face or picture.'), '#options' => array_slice($selects['avatars_list'], $page * $avatars_per_page, $avatars_per_page), '#required' => $force_choose ? TRUE : FALSE, '#attributes' => array('class' => 'user_avatar_select'),