--- service_links.module +++ (clipboard) @@ -464,3 +464,51 @@ return $links_show; } + +/******************************************************************************* + * Hook Functions (Share) + ******************************************************************************/ + +/** + * Implementation of hook_share_info(). + */ +function service_links_share_info() { + $info = array( + 'id' => 'service_links', + 'title' => t('Social web'), + 'enabled' => TRUE, + 'weight' => 0 + ); + return $info; +} + +/** + * Implementation of hook_share_tab(). + */ +function service_links_share_tab($op, $args, $node = NULL) { + switch ($op) { + case 'settings': + $form['service_links_settings'] = array( + '#type' => 'item', + '#value' => t('Usings the Service Links settings from /admin/settings/servicelinks.') + ); + return $form; + case 'process': + $service_links = service_links_render($node); + return theme('service_links_share_tab', $service_links); + } +} + +/******************************************************************************* + * Theme Functions + ******************************************************************************/ + +function theme_service_links_share_tab($service_links) { + drupal_add_css(drupal_get_path('module', 'service_links') .'/service_links.css'); + $output = '