Skip to content

Commit

Permalink
#1059 Replace unsubscribe url with link to topic/forum to unsubscribe…
Browse files Browse the repository at this point in the history
… in email notification
  • Loading branch information
Quy authored and franzliedke committed Jun 16, 2016
1 parent d169725 commit ee2523a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lang/English/mail_templates/new_reply.tpl
Expand Up @@ -4,7 +4,7 @@ Subject: Reply to topic: '<topic_subject>'

The post is located at <post_url>

You can unsubscribe by going to <unsubscribe_url>
You can unsubscribe by going to <unsubscribe_url> and clicking the Unsubscribe link at the bottom of the page.

--
<board_mailer> Mailer
Expand Down
2 changes: 1 addition & 1 deletion lang/English/mail_templates/new_reply_full.tpl
Expand Up @@ -11,7 +11,7 @@ The message reads as follows:

-----------------------------------------------------------------------

You can unsubscribe by going to <unsubscribe_url>
You can unsubscribe by going to <unsubscribe_url> and clicking the Unsubscribe link at the bottom of the page.

--
<board_mailer> Mailer
Expand Down
2 changes: 1 addition & 1 deletion lang/English/mail_templates/new_topic.tpl
Expand Up @@ -4,7 +4,7 @@ Subject: New topic in forum: '<forum_name>'

The topic is located at <topic_url>

You can unsubscribe by going to <unsubscribe_url>
You can unsubscribe by going to <unsubscribe_url> and clicking the Unsubscribe link at the bottom of the page.

--
<board_mailer> Mailer
Expand Down
2 changes: 1 addition & 1 deletion lang/English/mail_templates/new_topic_full.tpl
Expand Up @@ -11,7 +11,7 @@ The message reads as follows:

-----------------------------------------------------------------------

You can unsubscribe by going to <unsubscribe_url>
You can unsubscribe by going to <unsubscribe_url> and clicking the Unsubscribe link at the bottom of the page.

--
<board_mailer> Mailer
Expand Down
8 changes: 4 additions & 4 deletions post.php
Expand Up @@ -256,15 +256,15 @@
$mail_message = str_replace('<topic_subject>', $cur_posting['subject'], $mail_message);
$mail_message = str_replace('<replier>', $username, $mail_message);
$mail_message = str_replace('<post_url>', get_base_url().'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $mail_message);
$mail_message = str_replace('<unsubscribe_url>', get_base_url().'/misc.php?action=unsubscribe&tid='.$tid, $mail_message);
$mail_message = str_replace('<unsubscribe_url>', get_base_url().'/viewtopic.php?id='.$tid.'#unsubscribe', $mail_message);
$mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);

$mail_subject_full = str_replace('<topic_subject>', $cur_posting['subject'], $mail_subject_full);
$mail_message_full = str_replace('<topic_subject>', $cur_posting['subject'], $mail_message_full);
$mail_message_full = str_replace('<replier>', $username, $mail_message_full);
$mail_message_full = str_replace('<message>', $cleaned_message, $mail_message_full);
$mail_message_full = str_replace('<post_url>', get_base_url().'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $mail_message_full);
$mail_message_full = str_replace('<unsubscribe_url>', get_base_url().'/misc.php?action=unsubscribe&tid='.$tid, $mail_message_full);
$mail_message_full = str_replace('<unsubscribe_url>', get_base_url().'/viewtopic.php?id='.$tid.'#unsubscribe', $mail_message_full);
$mail_message_full = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message_full);

$notification_emails[$cur_subscriber['language']][0] = $mail_subject;
Expand Down Expand Up @@ -369,7 +369,7 @@
$mail_message = str_replace('<forum_name>', $cur_posting['forum_name'], $mail_message);
$mail_message = str_replace('<poster>', $username, $mail_message);
$mail_message = str_replace('<topic_url>', get_base_url().'/viewtopic.php?id='.$new_tid, $mail_message);
$mail_message = str_replace('<unsubscribe_url>', get_base_url().'/misc.php?action=unsubscribe&fid='.$cur_posting['id'], $mail_message);
$mail_message = str_replace('<unsubscribe_url>', get_base_url().'/viewforum.php?id='.$cur_posting['id'].'#unsubscribe', $mail_message);
$mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);

$mail_subject_full = str_replace('<forum_name>', $cur_posting['forum_name'], $mail_subject_full);
Expand All @@ -378,7 +378,7 @@
$mail_message_full = str_replace('<poster>', $username, $mail_message_full);
$mail_message_full = str_replace('<message>', $cleaned_message, $mail_message_full);
$mail_message_full = str_replace('<topic_url>', get_base_url().'/viewtopic.php?id='.$new_tid, $mail_message_full);
$mail_message_full = str_replace('<unsubscribe_url>', get_base_url().'/misc.php?action=unsubscribe&fid='.$cur_posting['id'], $mail_message_full);
$mail_message_full = str_replace('<unsubscribe_url>', get_base_url().'/viewforum.php?id='.$cur_posting['id'].'#unsubscribe', $mail_message_full);
$mail_message_full = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message_full);

$notification_emails[$cur_subscriber['language']][0] = $mail_subject;
Expand Down
2 changes: 1 addition & 1 deletion viewforum.php
Expand Up @@ -104,7 +104,7 @@
if ($pun_config['o_forum_subscriptions'] == '1')
{
if ($cur_forum['is_subscribed'])
$forum_actions[] = '<span>'.$lang_forum['Is subscribed'].' - </span><a href="misc.php?action=unsubscribe&amp;fid='.$id.$token_url.'">'.$lang_forum['Unsubscribe'].'</a>';
$forum_actions[] = '<span>'.$lang_forum['Is subscribed'].' - </span><a id="unsubscribe" href="misc.php?action=unsubscribe&amp;fid='.$id.$token_url.'">'.$lang_forum['Unsubscribe'].'</a>';
else
$forum_actions[] = '<a href="misc.php?action=subscribe&amp;fid='.$id.$token_url.'">'.$lang_forum['Subscribe'].'</a>';
}
Expand Down
2 changes: 1 addition & 1 deletion viewtopic.php
Expand Up @@ -162,7 +162,7 @@

if ($cur_topic['is_subscribed'])
// I apologize for the variable naming here. It's a mix of subscription and action I guess :-)
$subscraction = "\t\t".'<p class="subscribelink clearb"><span>'.$lang_topic['Is subscribed'].' - </span><a href="misc.php?action=unsubscribe&amp;tid='.$id.$token_url.'">'.$lang_topic['Unsubscribe'].'</a></p>'."\n";
$subscraction = "\t\t".'<p class="subscribelink clearb"><span>'.$lang_topic['Is subscribed'].' - </span><a id="unsubscribe" href="misc.php?action=unsubscribe&amp;tid='.$id.$token_url.'">'.$lang_topic['Unsubscribe'].'</a></p>'."\n";
else
$subscraction = "\t\t".'<p class="subscribelink clearb"><a href="misc.php?action=subscribe&amp;tid='.$id.$token_url.'">'.$lang_topic['Subscribe'].'</a></p>'."\n";
}
Expand Down

0 comments on commit ee2523a

Please sign in to comment.