--- W:/ClearlyByDesign/Drupal/modules/6.x/addtoany/6.x-3.3/addtoany/addtoany.admin.inc	Fri Jul 09 05:45:02 2010
+++ W:/ClearlyByDesign/Drupal/modules/6.x/addtoany/6.x-3.3 Patched/addtoany/addtoany.admin.inc	Tue Sep 07 18:06:54 2010
@@ -94,6 +94,28 @@
     '#description'   => t('Text for the AddToAny button link. Example: Share'),
   );
   
+  $form['addtoany_user_profile_settings'] = array(
+    '#type'         => 'fieldset',
+    '#title'        => t('User profile options'),
+    '#collapsible'  => TRUE,
+    '#collapsed'    => TRUE,
+  );
+  $form['addtoany_user_profile_settings']['addtoany_user_profile_show'] = array(
+    '#type'          => 'checkbox',
+    '#title'         => t('Show AddToAny button on user profile page'),
+    '#default_value' => variable_get('addtoany_user_profile_show', FALSE),
+    '#description'   => t('You can show an AddToAny button on the user profile page.
+                            This is useful if you have detailed user profiles and you want
+                            to use social networking bookmarks on those profile pages.'),
+  );
+  $form['addtoany_user_profile_settings']['addtoany_user_profile_display_weight'] = array(
+    '#type'          => 'weight',
+    '#title'         => t('Weight'),
+    '#default_value' => variable_get('addtoany_user_profile_display_weight', -30),
+    '#delta'         => 50,
+    '#description'   => t('WEIGHT value for AddToAny button displayed in the user profile.'),
+  );
+
   $form['addtoany_additional_settings'] = array(
     '#type'         => 'fieldset',
     '#title'        => t('Additional options'),
--- W:/ClearlyByDesign/Drupal/modules/6.x/addtoany/6.x-3.3/addtoany/addtoany.module	Fri Jul 09 05:45:02 2010
+++ W:/ClearlyByDesign/Drupal/modules/6.x/addtoany/6.x-3.3 Patched/addtoany/addtoany.module	Tue Sep 07 18:12:50 2010
@@ -53,12 +53,18 @@
 function addtoany_block($op = 'list', $delta = 0) {
   if ($op == 'list') {
     $blocks[0]['info'] = t('AddToAny button');
+    $blocks[1]['info'] = t('AddToAny botton for user pages');
     return $blocks;
   }
   else if ($op == 'view') {
     $block['subject'] = t('AddToAny');
-    $block['content'] = _addtoany_create_button(menu_get_object());
-	$block['cache'] = BLOCK_NO_CACHE; // Caching issue: http://drupal.org/node/610564
+    if ( $delta == 0 ) {
+      $block['content'] = _addtoany_create_button(menu_get_object());
+    }
+    else {
+      $block['content'] = _addtoany_create_button(menu_get_object('user'), FALSE, 'user');
+    }
+  	$block['cache'] = BLOCK_NO_CACHE; // Caching issue: http://drupal.org/node/610564
     return $block;
   }
 }
@@ -123,6 +129,22 @@
 }
 
 /**
+ * Implementation of hook_profile_alter().
+ */
+function addtoany_profile_alter(&$account) {
+  if ( variable_get('addtoany_user_profile_show', FALSE) ) {
+    $account->content['addtoany'] = array(
+      '#type'       => 'markup',
+      '#value'      => _addtoany_create_button(menu_get_object('user'), FALSE, 'user'),
+      '#weight'     => variable_get('addtoany_user_profile_display_weight', -30),
+      '#prefix'     => '<div class="addtoany-user-profile">',
+      '#suffix'     => '</div>'
+    );
+  }
+}
+
+
+/**
  * Implementation of hook_footer().  Would use drupal_add_js, but external scripts are not well supported
  * 
  * @param object $main [optional]
@@ -193,12 +215,12 @@
 /**
  * Internal function to generate code for AddToAny button
  * 
- * @param object $node [optional]
+ * @param object $object [optional]
  * @param object $teaser [optional]
  * @return
  *   String containing HTML code for the button
  */
-function _addtoany_create_button($node=NULL, $teaser = FALSE) {
+function _addtoany_create_button($object=NULL, $teaser = FALSE, $type='node') {
 	global $_addtoany_counter, $base_path;
 	
 	$_addtoany_counter++;
@@ -208,13 +230,26 @@
 	
 	$disable_dropdown = variable_get('addtoany_dropdown_disabled', '0');
 
-	if (is_object($node)) {
-	  	$link_name 	= (module_exists('page_title')) ? page_title_page_get_title() : $node->title;
-		$link_url 	= url('node/' . $node->nid, array('absolute' => 1));
-	} else { // Front page
-		$link_name	= (module_exists('page_title')) ? page_title_page_get_title() : variable_get('site_name', '');
-		$link_url = url('<front>', array('absolute' => 1));
+  if ( $type == 'node' ) {
+  	if (is_object($object)) {
+  	  $link_name 	= (module_exists('page_title')) ? page_title_page_get_title() : $object->title;
+  		$link_url 	= url('node/' . $object->nid, array('absolute' => 1));
+  	}
+    else { // Front page
+  		$link_name	= (module_exists('page_title')) ? page_title_page_get_title() : variable_get('site_name', '');
+  		$link_url = url('<front>', array('absolute' => 1));
+  	}
 	}
+	else { //user page
+  	if (is_object($object)) {
+  	  $link_name 	= (module_exists('page_title')) ? page_title_page_get_title() : $object->title;
+  		$link_url 	= url('user/' . $object->uid, array('absolute' => 1));
+  	}
+    else { // Front page
+  		$link_name	= (module_exists('page_title')) ? page_title_page_get_title() : variable_get('site_name', '');
+  		$link_url = url('<front>', array('absolute' => 1));
+  	}
+  }
 	
 	$javascript = ($disable_dropdown) ? '' : _addtoany_create_script($_addtoany_counter, $link_name, $link_url);
 	
