Only in on_the_web: LICENSE.txt
Only in on_the_web: README.txt
Only in on_the_web: images
Only in on_the_web_forked: on_the_web.api.php
Only in on_the_web: on_the_web.info
Only in on_the_web: on_the_web.install
diff -up on_the_web/on_the_web.module on_the_web_forked/on_the_web.module
--- on_the_web/on_the_web.module	2011-08-11 17:23:43.000000000 -0700
+++ on_the_web_forked/on_the_web.module	2012-03-05 13:43:43.000000000 -0800
@@ -1,6 +1,6 @@
 <?php
 /**
- * @file 
+ * @file
  * Adds a block with a series of icons which link off-site to other web presences.
  */
 
@@ -20,13 +20,13 @@ function on_the_web_block_info() {
 function on_the_web_block_configure($delta = 0) {
   $form = array();
   if ($delta == 0) {
-    
+
     $form['services'] = array(
       '#type' => 'fieldset',
       '#title' => t('Icons are provided for the following services'),
       '#description' => t('Please enter a fully-qualified URL for service you would like linked.'),
     );
-    
+
     $services = on_the_web_get_services();
     foreach ($services as $service => $info) {
       $form['services'][$service] = array(
@@ -73,7 +73,7 @@ function on_the_web_block_configure($del
   return $form;
 }
 
- 
+
 /**
  * Implementation of hook_block_save().
  */
@@ -85,13 +85,13 @@ function on_the_web_block_save($delta = 
       variable_set('on_the_web_' . $service . '_page', $edit[$service]);
     }
     variable_set('on_the_web_feed', $edit['feed']);
-    variable_set('on_the_web_size', $edit['size']); 
+    variable_set('on_the_web_size', $edit['size']);
     variable_set('on_the_web_sitename', $edit['sitename']);
     variable_set('on_the_web_target', $edit['target']);
   }
 }
- 
- 
+
+
 /**
  * Implementation of hook_block_view().
  */
@@ -100,19 +100,19 @@ function on_the_web_block_view($delta = 
     'subject' => t('Find Us On...'),
     'content' => on_the_web_display_block($delta)
   );
-  
+
   return $block;
 }
 
 /**
  * Block Display
  *
- * @return 
+ * @return
  *    Content for block.
  */
 function on_the_web_display_block($delta) {
   $output = '';
-  
+
   // Get the appropriate name to use in links.
   if (variable_get('on_the_web_sitename', TRUE)) {
     $name = variable_get('site_name', 'Drupal');
@@ -120,9 +120,9 @@ function on_the_web_display_block($delta
   else {
     $name = t('Us');
   }
-  
+
   $services = on_the_web_get_services();
-    
+
   foreach ($services as $service => $info) {
     $link = variable_get('on_the_web_' . $service . '_page', FALSE);
     if ($link) {
@@ -131,7 +131,7 @@ function on_the_web_display_block($delta
       $output .= theme('on_the_web_icon', array('linked_image' => $item));
     }
   }
-  
+
   // Add the RSS feed icon
   $feed = variable_get('on_the_web_feed', FALSE);
   if ($feed) {
@@ -151,21 +151,24 @@ function on_the_web_display_block($delta
 /**
  * Services
  *
- * @return 
+ * @return
  *    List of services with icons.
  */
 function on_the_web_get_services() {
-  return array(
-    'twitter' => array('name' => 'Twitter'),
-    'facebook' => array('name' => 'Facebook'),
-    'youtube' => array('name' => 'YouTube'),
-    'flickr' => array('name' => 'Flickr'),
-    'myspace' => array('name' => 'MySpace'),
-    'linkedin' => array('name' => 'LinkedIn'),
-    'itunes' => array('name' => 'iTunes'),
-    'delicious' => array('name' => 'Delicious'),
-    'friendfeed' => array('name' => 'FriendFeed')
-    );
+  $services = array(
+    'twitter' => array('weight' => 0, 'name' => 'Twitter'),
+    'facebook' => array('weight' => 0, 'name' => 'Facebook'),
+    'youtube' => array('weight' => 0, 'name' => 'YouTube'),
+    'flickr' => array('weight' => 0, 'name' => 'Flickr'),
+    'myspace' => array('weight' => 0, 'name' => 'MySpace'),
+    'linkedin' => array('weight' => 0, 'name' => 'LinkedIn'),
+    'itunes' => array('weight' => 0, 'name' => 'iTunes'),
+    'delicious' => array('weight' => 0, 'name' => 'Delicious'),
+    'friendfeed' => array('weight' => 0, 'name' => 'FriendFeed')
+  );
+  drupal_alter('on_the_web_services', $services);
+  uasort($services, 'drupal_sort_weight');
+  return $services;
 }
 
 /**
@@ -184,7 +187,7 @@ function on_the_web_theme($existing, $ty
  *
  * @param $linked_image
  *    Linked icon.
- * @return 
+ * @return
  *    Linked icon with wrapper markup.
  */
 function theme_on_the_web_icon($variables) {
@@ -205,31 +208,45 @@ function theme_on_the_web_icon($variable
  * @param $title
  *    Title attribute for the link tag.
  *
- * @return 
+ * @return
  *    Linked icon with wrapper markup.
  */
 function on_the_web_build_item($service, $link, $title) {
-  // Get the size.
-  $size = variable_get('on_the_web_size', 'sm'); 
-  
-  // Assemble necessary variables for building the image.
-  $variables = array(
-    'path' => drupal_get_path('module', 'on_the_web') . '/images/' . $size . '/' . $service . '.png', 
-    'title' => $title,
-    'title' => $title,
+  $item = array(
+    '#service' => $service,
+    '#icon_size' => variable_get('on_the_web_size', 'sm'),
+    '#link' => array(
+      'text' => '',
+      'path' => $link,
+      'options' => array(
+        'attributes' => array(
+          'title' => $title,
+        ),
+        'html' => TRUE,
+      ),
+    ),
+    '#image' => array(
+      // Assemble necessary variables for building the image.
+      'path' => '',
+      'title' => $title,
+      'alt' => $title,
+    ),
+    0 => '',
   );
-  
-  // Build the img tag.
-  $image = theme('image', $variables);
-  
-  // Determine attributes for the link
-  $attributes  = array('title' => $title);
+
+  $item['#image']['path'] = drupal_get_path('module', 'on_the_web') . '/images/' . $item['#icon_size'] . '/' . $item['#service'] . '.png';
+
   if (variable_get('on_the_web_target', TRUE) == TRUE) {
-    $attributes['target'] = '_blank';
+    $item['#link']['options']['attributes']['target'] = '_blank';
   }
-  
+
+  // Allow other modules to modify item, say to add different path to image
+  drupal_alter('on_the_web_item', $item);
+
+  // Build the img tag.
+  $item['#link']['text'] = theme('image', $item['#image']);
+
   // Link the image.
-  $linked_image = l($image, $link, array('attributes' => $attributes, 'html' => TRUE));
-  
-  return $linked_image;
-}
\ No newline at end of file
+  $item[0] = l($item['#link']['text'], $item['#link']['path'], $item['#link']['options']);
+  return $item[0];
+}
