Advertisement
sgluskin

og_mailinglist_common.inc edits

Feb 18th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. /**
  2.  * Returns HTML for email footer.
  3.  *
  4.  * @param $variables
  5.  *   An array containing 'node' => $node object.
  6.  * @return
  7.  *   HTML code for footer.
  8.  */
  9. function theme_og_mailinglist_mail_footer($variables) {
  10.   $node = $variables['node'];
  11.   if (!$node) {
  12.     return;
  13.   }
  14.  
  15.   $absolute = array('absolute' => TRUE);
  16.   $full = url("node/" . $node->nid, $absolute);
  17.   $subscriptions = url("og_mailinglist/subscriptions", $absolute);
  18.   $unsubscribe = url("og_mailinglist/unsubscribe/" . $node->nid, $absolute);
  19.   $grouppage = url("node/" . $node->og_group_ref['und'][0]['target_id'], $absolute); //Shai added this line to link to the group page where a user can click the unsubscribe link generated by organic groups
  20.  
  21.   $footer = '--<br />'
  22.     . t('Read or respond on the web: @link', array('@link' => $full))
  23.     . '<br />'
  24.     . t('Manage group subscription: @link', array('@link' => $grouppage))
  25.     . '<br />';
  26. // Shai removed broken link   . t('Manage my subscriptions: @link', array('@link' => $subscriptions))
  27. // Shai remove   . '<br />'
  28. // Shai removed broken link   . t('Stop emails for this post: @link', array('@link' => $unsubscribe))
  29. // Shai  . '<br />';
  30.   return $footer;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement