1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @name ElkArte Forum |
5
|
|
|
* @copyright ElkArte Forum contributors |
6
|
|
|
* @license BSD http://opensource.org/licenses/BSD-3-Clause |
7
|
|
|
* |
8
|
|
|
* This file contains code covered by: |
9
|
|
|
* copyright: 2011 Simple Machines (http://www.simplemachines.org) |
10
|
|
|
* license: BSD, See included LICENSE.TXT for terms and conditions. |
11
|
|
|
* |
12
|
|
|
* @version 1.1 |
13
|
|
|
* |
14
|
|
|
*/ |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Interface to allow notification enable/disable. |
18
|
|
|
*/ |
19
|
|
|
function template_notification_settings() |
20
|
|
|
{ |
21
|
|
|
global $context, $txt, $scripturl; |
22
|
|
|
|
23
|
|
|
echo ' |
24
|
|
|
<h2 class="category_header hdicon cat_img_mail"> |
25
|
|
|
', $txt['notify'], ' |
26
|
|
|
</h2> |
27
|
|
|
<div class="well centertext"> |
28
|
|
|
<p>', $context['notification_set'] ? $txt['notify_deactivate'] : $txt['notify_request'], '</p> |
29
|
|
|
<p> |
30
|
|
|
<strong><a href="', $scripturl, '?action=notify;sa=', $context['notification_set'] ? 'off' : 'on', ';topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $context['topic_href'], '">', $txt['no'], '</a></strong> |
31
|
|
|
</p> |
32
|
|
|
</div>'; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Interface for board notifications toggle. |
37
|
|
|
*/ |
38
|
|
|
function template_notify_board() |
39
|
|
|
{ |
40
|
|
|
global $context, $txt, $scripturl; |
41
|
|
|
|
42
|
|
|
echo ' |
43
|
|
|
<h2 class="category_header hdicon cat_img_mail"> |
44
|
|
|
', $txt['notify'], ' |
45
|
|
|
</h2> |
46
|
|
|
<div class="well centertext"> |
47
|
|
|
<p>', $context['notification_set'] ? $txt['notifyboard_turnoff'] : $txt['notifyboard_turnon'], '</p> |
48
|
|
|
<p> |
49
|
|
|
<strong><a href="', $scripturl, '?action=notifyboard;sa=', $context['notification_set'] ? 'off' : 'on', ';board=', $context['current_board'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $context['board_href'], '">', $txt['no'], '</a></strong> |
50
|
|
|
</p> |
51
|
|
|
</div>'; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Something to show confirmation when they have unsubscribed from mention/topic/board/etc |
56
|
|
|
*/ |
57
|
|
|
function template_notify_unsubscribe() |
58
|
|
|
{ |
59
|
|
|
global $context, $txt; |
60
|
|
|
|
61
|
|
|
echo ' |
62
|
|
|
<h2 class="category_header hdicon cat_img_mail"> |
63
|
|
|
', $txt['unnotify'], ' |
64
|
|
|
</h2> |
65
|
|
|
<div class="well centertext"> |
66
|
|
|
<p>', $context['unsubscribe_message'], '</p> |
67
|
|
|
</div>'; |
68
|
|
|
} |