 sharethis.admin.inc |  235 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sharethis.module    |  228 +------------------------------------------------
 2 files changed, 237 insertions(+), 226 deletions(-)

diff --git a/sharethis.admin.inc b/sharethis.admin.inc
new file mode 100644
index 0000000..dffc2d8
--- /dev/null
+++ b/sharethis.admin.inc
@@ -0,0 +1,235 @@
+<?php
+/**
+ * @file
+ * Functionality for Share This administration.
+ */
+
+/**
+ * This is the main configuration form for the admin page.
+ */
+function sharethis_configuration_form($form, &$form_state) {
+  // First, setup variables we will need.
+  // Get the path variables setup.
+  $my_path = drupal_get_path('module', 'sharethis');
+  // Load the css and js for our module's configuration.  
+  drupal_add_css($my_path . '/ShareThisForm.css');
+  // This is ShareThis's common library - has a serviceList of all the objects
+  // that are currently supported.  
+  drupal_add_js('https://ws.sharethis.com/share5x/js/stcommon.js', 'external');
+  drupal_add_js($my_path . '/ShareThisForm.js');
+  drupal_add_js($my_path . '/stlib_picker.js');
+  drupal_add_css($my_path . '/stlib_picker.css');
+  $current_options_array = sharethis_get_options_array();
+  global $base_url;
+
+  // Create the variables related to widget choice.
+  $widget_type = $current_options_array['widget'];
+  $widget_markup = "";
+  if ($widget_type == "st_multi") {
+    $widget_markup = "st_multi";
+  }
+  // Create the variables related to button choice.
+  $button_choice = check_plain($current_options_array['buttons']);
+  // Create the variables related to services chosen.
+  $service_string = $current_options_array['services'];
+  $service_string_markup = "";
+  foreach (explode(",", $service_string) as $name => $string) {
+    $key = explode(":", drupal_substr($string, 0, -1));
+    $key = $key[1];
+    $service_string_markup .= "\"" . $key . "\",";
+  }
+  $service_string_markup = drupal_substr($service_string_markup, 0, -1);
+
+  // Create an array of node types.
+  $node_type_array = node_type_get_types();
+  $node_type_options = array();
+  foreach ($node_type_array as $k => $v) {
+    $node_type_options[$k] = $v->name;
+  }
+  // Figure out which nodeTypes are currently selected
+  $nodes_string = $current_options_array['nodeType'];
+  $nodes_selected = explode(",", $nodes_string);
+  // Create the variables for publisher keys.
+  $publisher = $current_options_array['publisherID'];
+  // Create the variables for teasers.
+  $teaser = $current_options_array['viewMode'] == "1" ? TRUE : FALSE;
+
+  $form = array();
+  $form['options'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Display'),
+  );
+  $form['options']['sharethis_widget_option'] = array(
+    '#options' => array(
+      'st_multi' => t("Multi-Post Widget"),
+      'st_direct' => t("Direct-Post Widget")
+    ),
+    '#default_value' => $widget_type,
+    '#type' => 'radios',
+    '#required' => TRUE,
+    '#title' => t("Choose a widget type:"),
+    '#prefix' => '<div class="st_widgetContain"><div class="st_widgetPic ' . $widget_markup . '"><div class="st_widgetPicContain"><img src="' . $base_url . '/' . $my_path . '/img/widget.png"></img></div></div>',
+    '#suffix' => '</div>'
+  );
+  $form['options']['sharethis_button_option'] = array(
+    '#required' => TRUE,
+    '#type' => 'radios',
+    '#options' => array(
+      'stbc_large' => t('Large Chicklets'),
+      'stbc_' => t('Small Chicklets'),
+      'stbc_button' => t('Classic Buttons'),
+      'stbc_vcount' => t('Vertical Counters'),
+      'stbc_hcount' => t('Horizontal Counters'),
+      'stbc_custom' => t('Custom Buttons via CSS'),
+    ),
+    '#default_value' => $button_choice,
+    '#title' => t("Choose a button style:"),
+    '#prefix' => '<div class="st_widgetContain"><div class="st_spriteCover"><img id="stb_sprite" class="st_buttonSelectSprite ' . $button_choice . '" src="' . $base_url . '/' . $my_path . '/img/preview_sprite.png"></img></div><div class="st_widgetPic"><img class="st_buttonSelectImage" src="' . $base_url . '/' . $my_path . '/img/preview_bg.png"></img></div>',
+    '#suffix' => '</div>'
+  );
+  $form['options']['sharethis_service_option'] = array(
+    '#description' => t("<b>Add</b> a service by selecting it on the right and clicking the <i>left arrow</i>.  <b>Remove</b> it by clicking the <i>right arrow</i>.<br /><b>Change the order</b> of services under \"Selected Services\" by using the <i>up</i> and <i>down</i> arrows."),
+    '#required' => TRUE,
+    '#type' => 'textfield',
+    '#prefix' => '<div>',
+    '#suffix' => '</div><div id="myPicker"></div><script type="text/javascript">stlib_picker.setupPicker(jQuery("#myPicker"), [' . $service_string_markup . '], drupal_st.serviceCallback);</script>',
+    '#title' => t("Choose Your Services."),
+    '#default_value' => t($service_string),
+    '#maxlength' => 1024,
+  );
+  $form['options']['sharethis_option_extras'] = array(
+    '#title' => t('Extra services'),
+    '#description' => t('Select additional services which will be available. These are not officially supported by ShareThis, but are available.'),
+    '#type' => 'checkboxes',
+    '#options' => array(
+      'Google Plus One:plusone' => t('Google Plus One'),
+      'Facebook Like:fblike' => t('Facebook Like'),
+    ),
+    '#default_value' => variable_get('sharethis_option_extras', array()),
+  );
+  $form['additional_settings'] = array(
+    '#type' => 'vertical_tabs',
+  );
+  $form['context'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Context'),
+    '#group' => 'additional_settings',
+    '#description' => t('Configure where the ShareThis widget should appear.'),
+  );
+  $form['context']['sharethis_node_option'] = array(
+    '#title' => t("Node types"),
+    '#description' => t('Select which nodes the ShareThis widget should appear on.'),
+    '#required' => TRUE,
+    '#type' => 'checkboxes',
+    '#options' => $node_type_options,
+    '#default_value' => $nodes_selected
+  );
+  $form['context']['sharethis_teaser_option'] = array(
+    '#title' => t('Only full view'),
+    '#type' => 'checkbox',
+    '#default_value' => $teaser ? 1 : 0,
+    '#description' => t('When checked, will not show the widget on node teasers.'),
+  );
+  $form['context']['sharethis_comments'] = array(
+    '#title' => t('Comments'),
+    '#type' => 'checkbox',
+    '#default_value' => variable_get('sharethis_comments', FALSE),
+    '#description' => t('Display ShareThis on comments.'),
+    '#access' => module_exists('comment'),
+  );
+  $form['context']['sharethis_location'] = array(
+    '#title' => t('Location'),
+    '#type' => 'radios',
+    '#options' => array(
+      'content' => t('Node content'),
+      'block' => t('Block'),
+      'links' => t('Links area'),
+    ),
+    '#default_value' => variable_get('sharethis_location', 'content'),
+    '#description' => t('Choose where the ShareThis widget should appear. When selected to display as a block, you must choose which region to display the <em>ShareThis block</em> in from the <a href="@blocksadmin">Blocks administration</a>.', array('@blocksadmin' => url('admin/structure/block'))),
+  );
+  $form['context']['sharethis_weight'] = array(
+    '#title' => t('Weight'),
+    '#description' => t('The weight of the widget determines the location on the page where it will appear.'),
+    '#required' => FALSE,
+    '#type' => 'select',
+    '#options' => drupal_map_assoc(array(-100, -50, -25, -10, 0, 10, 25, 50, 100)),
+    '#default_value' => variable_get('sharethis_weight', 10),
+  );
+  $form['advanced'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Advanced'),
+    '#group' => 'additional_settings',
+    '#description' => t('The advanced settings can usually be ignored if you have no need for them.'),
+  );
+  $form['advanced']['sharethis_publisherID'] = array(
+    '#title' => t("Insert a publisher key (optional)."),
+    '#description' => t("When you install the module, we create a random publisher key.  You can register the key with ShareThis by contacting customer support.  Otherwise, you can go to <a href='http://www.sharethis.com/account'>ShareThis</a> and create an account.<br />Your official publisher key can be found under 'My Account'.<br />It allows you to get detailed analytics about sharing done on your site."),
+    '#type' => 'textfield',
+    '#default_value' => $publisher
+  );
+  $form['advanced']['sharethis_late_load'] = array(
+    '#title' => t('Late Load'),
+    '#description' => t("You can change the order in which ShareThis widget loads on the user's browser. By default the ShareThis widget loader loads as soon as the browser encounters the JavaScript tag; typically in the tag of your page. ShareThis assets are generally loaded from a CDN closest to the user. However, if you wish to change the default setting so that the widget loads after your web-page has completed loading then you simply tick this option."),
+    '#type' => 'checkbox',
+    '#default_value' => variable_get('sharethis_late_load', FALSE),
+  );
+  $form['advanced']['sharethis_twitter_suffix'] = array(
+    '#title' => t("Twitter Suffix"),
+    '#description' => t("Optionally append a Twitter handle, or text, so that you get pinged when someone shares an article. Example: <em>via @YourNameHere</em>"),
+    '#type' => 'textfield',
+    '#default_value' => variable_get('sharethis_twitter_suffix', ''),
+  );
+  $form['advanced']['sharethis_twitter_handle'] = array(
+    '#title' => t('Twitter Handle'),
+    '#description' => t('Twitter handle to use when sharing.'),
+    '#type' => 'textfield',
+    '#default_value' => variable_get('sharethis_twitter_handle', ''),
+  );
+  $form['advanced']['sharethis_twitter_recommends'] = array(
+    '#title' => t('Twitter recommends'),
+    '#description' => t('Specify a twitter handle to be recommended to the user.'),
+    '#type' => 'textfield',
+    '#default_value' => variable_get('sharethis_twitter_recommends', ''),
+  );
+  $form['advanced']['sharethis_option_onhover'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Display ShareThis widget on hover'),
+    '#description' => t('If disabled, the ShareThis widget will be displayed on click instead of hover.'),
+    '#default_value' => variable_get('sharethis_option_onhover', TRUE),
+  );
+  return system_settings_form($form);
+}
+
+/**
+ * Form submission handler for sharethis_configuration_form().
+ */
+function sharethis_configuration_form_validate($form, &$form_state) {
+  // Additional filters for the service option input.
+
+  // Sanitize the publisher ID option.  Since it's a text field, remove
+  // anything that resembles code.
+  $form_state['values']['sharethis_service_option'] = filter_xss($form_state['values']['sharethis_service_option'], array());
+
+  // Additional filters for the option extras input.
+  $form_state['values']['sharethis_option_extras'] = (isset($form_state['values']['sharethis_option_extras'])) ? $form_state['values']['sharethis_option_extras'] : array();
+
+  // Implode the node options.
+  $form_state['values']['sharethis_node_option'] = implode(',', $form_state['values']['sharethis_node_option']);
+
+  // Set a default value for the teaser option.
+  $form_state['values']['sharethis_teaser_option'] = (isset($form_state['values']['sharethis_teaser_option'])) ? $form_state['values']['sharethis_teaser_option'] : 0;
+
+  // Sanitize the publisher ID option.  Since it's a text field, remove
+  // anything that resembles code.
+  $form_state['values']['sharethis_publisherID'] = filter_xss($form_state['values']['sharethis_publisherID'], array());
+
+  // Ensure default value for twitter suffix.
+  $form_state['values']['sharethis_twitter_suffix'] = (isset($form_state['values']['sharethis_twitter_suffix'])) ? $form_state['values']['sharethis_twitter_suffix'] : '';
+
+  // Ensure default value for twitter handle.
+  $form_state['values']['sharethis_twitter_handle'] = (isset($form_state['values']['sharethis_twitter_handle'])) ? $form_state['values']['sharethis_twitter_handle'] : '';
+
+  // Ensure default value for twitter recommends.
+  $form_state['values']['sharethis_twitter_recommends'] = (isset($form_state['values']['sharethis_twitter_recommends'])) ? $form_state['values']['sharethis_twitter_recommends'] : '';
+}
diff --git a/sharethis.module b/sharethis.module
index 3ac3aa3..85c3a14 100644
--- a/sharethis.module
+++ b/sharethis.module
@@ -44,231 +44,6 @@ function sharethis_permission() {
   );
 }
 
- /**
- * This is the main configuration form for the admin page.
- */
-function sharethis_configuration_form($form, &$form_state) {
-  // First, setup variables we will need.
-  // Get the path variables setup.
-  $my_path = drupal_get_path('module', 'sharethis');
-  // Load the css and js for our module's configuration.
-  drupal_add_css($my_path . '/ShareThisForm.css');
-  drupal_add_js('https://ws.sharethis.com/share5x/js/stcommon.js', 'external');  //This is ShareThis's common library - has a serviceList of all the objects that are currently supported.
-  drupal_add_js($my_path . '/ShareThisForm.js');
-  drupal_add_js($my_path . '/stlib_picker.js');
-  drupal_add_css($my_path . '/stlib_picker.css');
-  $current_options_array = sharethis_get_options_array();
-  global $base_url;
-
-  // Create the variables related to widget choice.
-  $widget_type = $current_options_array['widget'];
-  $widget_markup = "";
-  if ($widget_type == "st_multi") {
-    $widget_markup = "st_multi";
-  }
-  // Create the variables related to button choice.
-  $button_choice = check_plain($current_options_array['buttons']);
-  // Create the variables related to services chosen.
-  $service_string = $current_options_array['services'];
-  $service_string_markup = "";
-  foreach (explode(",", $service_string) as $name => $string) {
-    $key = explode(":", drupal_substr($string, 0, -1));
-    $key = $key[1];
-    $service_string_markup .= "\"" . $key . "\",";
-  }
-  $service_string_markup = drupal_substr($service_string_markup, 0, -1);
-
-  // Create an array of node types.
-  $node_type_array = node_type_get_types();
-  $node_type_options = array();
-  foreach ($node_type_array as $k => $v) {
-    $node_type_options[$k] = $v->name;
-  }
-  // Figure out which nodeTypes are currently selected
-  $nodes_string = $current_options_array['nodeType'];
-  $nodes_selected = explode(",", $nodes_string);
-  // Create the variables for publisher keys.
-  $publisher = $current_options_array['publisherID'];
-  // Create the variables for teasers.
-  $teaser = $current_options_array['viewMode'] == "1" ? TRUE : FALSE;
-
-  $form = array();
-  $form['options'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Display'),
-  );
-  $form['options']['sharethis_widget_option'] = array(
-    '#options' => array(
-      'st_multi' => t("Multi-Post Widget"),
-      'st_direct' => t("Direct-Post Widget")
-    ),
-    '#default_value' => $widget_type,
-    '#type' => 'radios',
-    '#required' => TRUE,
-    '#title' => t("Choose a widget type:"),
-    '#prefix' => '<div class="st_widgetContain"><div class="st_widgetPic ' . $widget_markup . '"><div class="st_widgetPicContain"><img src="' . $base_url . '/' . $my_path . '/img/widget.png"></img></div></div>',
-    '#suffix' => '</div>'
-  );
-  $form['options']['sharethis_button_option'] = array(
-    '#required' => TRUE,
-    '#type' => 'radios',
-    '#options' => array(
-      'stbc_large' => t('Large Chicklets'),
-      'stbc_' => t('Small Chicklets'),
-      'stbc_button' => t('Classic Buttons'),
-      'stbc_vcount' => t('Vertical Counters'),
-      'stbc_hcount' => t('Horizontal Counters'),
-      'stbc_custom' => t('Custom Buttons via CSS'),
-    ),
-    '#default_value' => $button_choice,
-    '#title' => t("Choose a button style:"),
-    '#prefix' => '<div class="st_widgetContain"><div class="st_spriteCover"><img id="stb_sprite" class="st_buttonSelectSprite ' . $button_choice . '" src="' . $base_url . '/' . $my_path . '/img/preview_sprite.png"></img></div><div class="st_widgetPic"><img class="st_buttonSelectImage" src="' . $base_url . '/' . $my_path . '/img/preview_bg.png"></img></div>',
-    '#suffix' => '</div>'
-  );
-  $form['options']['sharethis_service_option'] = array(
-    '#description' => t("<b>Add</b> a service by selecting it on the right and clicking the <i>left arrow</i>.  <b>Remove</b> it by clicking the <i>right arrow</i>.<br /><b>Change the order</b> of services under \"Selected Services\" by using the <i>up</i> and <i>down</i> arrows."),
-    '#required' => TRUE,
-    '#type' => 'textfield',
-    '#prefix' => '<div>',
-    '#suffix' => '</div><div id="myPicker"></div><script type="text/javascript">stlib_picker.setupPicker(jQuery("#myPicker"), [' . $service_string_markup . '], drupal_st.serviceCallback);</script>',
-    '#title' => t("Choose Your Services."),
-    '#default_value' => t($service_string),
-    '#maxlength' => 1024,
-  );
-  $form['options']['sharethis_option_extras'] = array(
-    '#title' => t('Extra services'),
-    '#description' => t('Select additional services which will be available. These are not officially supported by ShareThis, but are available.'),
-    '#type' => 'checkboxes',
-    '#options' => array(
-      'Google Plus One:plusone' => t('Google Plus One'),
-      'Facebook Like:fblike' => t('Facebook Like'),
-    ),
-    '#default_value' => variable_get('sharethis_option_extras', array()),
-  );
-  $form['additional_settings'] = array(
-    '#type' => 'vertical_tabs',
-  );
-  $form['context'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Context'),
-    '#group' => 'additional_settings',
-    '#description' => t('Configure where the ShareThis widget should appear.'),
-  );
-  $form['context']['sharethis_node_option'] = array(
-    '#title' => t("Node types"),
-    '#description' => t('Select which nodes the ShareThis widget should appear on.'),
-    '#required' => TRUE,
-    '#type' => 'checkboxes',
-    '#options' => $node_type_options,
-    '#default_value' => $nodes_selected
-  );
-  $form['context']['sharethis_teaser_option'] = array(
-    '#title' => t('Only full view'),
-    '#type' => 'checkbox',
-    '#default_value' => $teaser ? 1 : 0,
-    '#description' => t('When checked, will not show the widget on node teasers.'),
-  );
-  $form['context']['sharethis_comments'] = array(
-    '#title' => t('Comments'),
-    '#type' => 'checkbox',
-    '#default_value' => variable_get('sharethis_comments', FALSE),
-    '#description' => t('Display ShareThis on comments.'),
-    '#access' => module_exists('comment'),
-  );
-  $form['context']['sharethis_location'] = array(
-    '#title' => t('Location'),
-    '#type' => 'radios',
-    '#options' => array(
-      'content' => t('Node content'),
-      'block' => t('Block'),
-      'links' => t('Links area'),
-    ),
-    '#default_value' => variable_get('sharethis_location', 'content'),
-    '#description' => t('Choose where the ShareThis widget should appear. When selected to display as a block, you must choose which region to display the <em>ShareThis block</em> in from the <a href="@blocksadmin">Blocks administration</a>.', array('@blocksadmin' => url('admin/structure/block'))),
-  );
-  $form['context']['sharethis_weight'] = array(
-    '#title' => t('Weight'),
-    '#description' => t('The weight of the widget determines the location on the page where it will appear.'),
-    '#required' => FALSE,
-    '#type' => 'select',
-    '#options' => drupal_map_assoc(array(-100, -50, -25, -10, 0, 10, 25, 50, 100)),
-    '#default_value' => variable_get('sharethis_weight', 10),
-  );
-  $form['advanced'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Advanced'),
-    '#group' => 'additional_settings',
-    '#description' => t('The advanced settings can usually be ignored if you have no need for them.'),
-  );
-  $form['advanced']['sharethis_publisherID'] = array(
-    '#title' => t("Insert a publisher key (optional)."),
-    '#description' => t("When you install the module, we create a random publisher key.  You can register the key with ShareThis by contacting customer support.  Otherwise, you can go to <a href='http://www.sharethis.com/account'>ShareThis</a> and create an account.<br />Your official publisher key can be found under 'My Account'.<br />It allows you to get detailed analytics about sharing done on your site."),
-    '#type' => 'textfield',
-    '#default_value' => $publisher
-  );
-  $form['advanced']['sharethis_late_load'] = array(
-    '#title' => t('Late Load'),
-    '#description' => t("You can change the order in which ShareThis widget loads on the user's browser. By default the ShareThis widget loader loads as soon as the browser encounters the JavaScript tag; typically in the tag of your page. ShareThis assets are generally loaded from a CDN closest to the user. However, if you wish to change the default setting so that the widget loads after your web-page has completed loading then you simply tick this option."),
-    '#type' => 'checkbox',
-    '#default_value' => variable_get('sharethis_late_load', FALSE),
-  );
-  $form['advanced']['sharethis_twitter_suffix'] = array(
-    '#title' => t("Twitter Suffix"),
-    '#description' => t("Optionally append a Twitter handle, or text, so that you get pinged when someone shares an article. Example: <em>via @YourNameHere</em>"),
-    '#type' => 'textfield',
-    '#default_value' => variable_get('sharethis_twitter_suffix', ''),
-  );
-  $form['advanced']['sharethis_twitter_handle'] = array(
-    '#title' => t('Twitter Handle'),
-    '#description' => t('Twitter handle to use when sharing.'),
-    '#type' => 'textfield',
-    '#default_value' => variable_get('sharethis_twitter_handle', ''),
-  );
-  $form['advanced']['sharethis_twitter_recommends'] = array(
-    '#title' => t('Twitter recommends'),
-    '#description' => t('Specify a twitter handle to be recommended to the user.'),
-    '#type' => 'textfield',
-    '#default_value' => variable_get('sharethis_twitter_recommends', ''),
-  );
-  $form['advanced']['sharethis_option_onhover'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Display ShareThis widget on hover'),
-    '#description' => t('If disabled, the ShareThis widget will be displayed on click instead of hover.'),
-    '#default_value' => variable_get('sharethis_option_onhover', TRUE),
-  );
-  return system_settings_form($form);
-}
-
-/**
- * Form submission handler for sharethis_configuration_form().
- */
-function sharethis_configuration_form_validate($form, &$form_state) {
-  //Additional filters for the service option input
-
-  // Sanitize the publisher ID option.  Since it's a text field, remove anything that resembles code
-  $form_state['values']['sharethis_service_option'] = filter_xss($form_state['values']['sharethis_service_option'], array());
-
-  //Additional filters for the option extras input
-  $form_state['values']['sharethis_option_extras'] = (isset($form_state['values']['sharethis_option_extras'])) ? $form_state['values']['sharethis_option_extras'] : array();
-
-  // Implode the node options
-  $form_state['values']['sharethis_node_option'] = implode(',', $form_state['values']['sharethis_node_option']);
-
-  // Set a default value for the teaser option
-  $form_state['values']['sharethis_teaser_option'] = (isset($form_state['values']['sharethis_teaser_option'])) ? $form_state['values']['sharethis_teaser_option'] : 0;
-
-  // Sanitize the publisher ID option.  Since it's a text field, remove anything that resembles code
-  $form_state['values']['sharethis_publisherID'] = filter_xss($form_state['values']['sharethis_publisherID'], array());
-
-  // Ensure default value for twitter suffix
-  $form_state['values']['sharethis_twitter_suffix'] = (isset($form_state['values']['sharethis_twitter_suffix'])) ? $form_state['values']['sharethis_twitter_suffix'] : '';
-
-  // Ensure default value for twitter handle
-  $form_state['values']['sharethis_twitter_handle'] = (isset($form_state['values']['sharethis_twitter_handle'])) ? $form_state['values']['sharethis_twitter_handle'] : '';
-
-  // Ensure default value for twitter recommends
-  $form_state['values']['sharethis_twitter_recommends'] = (isset($form_state['values']['sharethis_twitter_recommends'])) ? $form_state['values']['sharethis_twitter_recommends'] : '';
-}
 
  /**
  * Implements hook_menu().
@@ -281,7 +56,8 @@ function sharethis_menu() {
     'description' => 'Choose the widget, button family, and services for using ShareThis to share content online.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('sharethis_configuration_form'),
-    'access arguments' => array('administer sharethis')
+    'access arguments' => array('administer sharethis'),
+    'file' => 'sharethis.admin.inc',
   );
   return $items;
 }
