--- forward.module +++ (clipboard) @@ -1170,4 +1170,38 @@ function _forward_column_width($column, $width = 35) { return (strlen($column) > $width ? substr($column, 0, $width) .'...' : $column); -} \ No newline at end of file +} + +/******************************************************************************* + * Hook Functions (Share) + ******************************************************************************/ + +/** + * Implementation of hook_share_info(). + */ +function forward_share_info() { + $info = array( + 'id' => 'forward', + 'title' => t('E-mail'), + 'enabled' => TRUE, + 'weight' => 0 + ); + return $info; +} + +/** + * Implementation of hook_share_tab(). + */ +function forward_share_tab($op, $args, $node = NULL) { + switch ($op) { + case 'settings': + $form['forward_settings'] = array( + '#type' => 'item', + '#value' => t('Includes the Forward form.') + ); + return $form; + case 'process': + $path = drupal_get_path_alias('node/'. $node->nid); + return drupal_get_form('forward_form', $path, $node->title); + } +}