| 1 |
<?php
|
| 2 |
// $Id: comment_subscribe.admin.inc $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Admin page callbacks for the comment_subscribe module.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/*
|
| 10 |
*Function for mail subscription
|
| 11 |
*/
|
| 12 |
function comment_subscribe_settings() {
|
| 13 |
$form['comment_subscribe_settings'] = array();
|
| 14 |
$form['comment_subscribe_settings'][
|
| 15 |
'comment_subscribe_regged_checkbox'] = array(
|
| 16 |
'#type' => 'checkbox',
|
| 17 |
'#title' => t('Let registered users save their preferences in their profile.'),
|
| 18 |
'#return_value' => 1,
|
| 19 |
'#default_value' => variable_get(
|
| 20 |
'comment_subscribe_regged_checkbox', TRUE),
|
| 21 |
'#description' => t('Letting registered users select/unselect if
|
| 22 |
they want to be notified. If this is disabled, this setting is propagated from their user profile, hence reducing
|
| 23 |
and clutter and confusion.')
|
| 24 |
);
|
| 25 |
$form['comment_subscribe_settings'][
|
| 26 |
'comment_subscribe_node_alert'] = array(
|
| 27 |
'#type' => 'checkbox',
|
| 28 |
'#title' => t('Subscribe to node instead of subscribing to comments.'),
|
| 29 |
'#return_value' => 1,
|
| 30 |
'#default_value' => variable_get(
|
| 31 |
'comment_subscribe_node_alert', FALSE),
|
| 32 |
'#description' => t('Show a subscribe to node checkbox instead of subscribe to replies. When a user subscribe for a
|
| 33 |
node he will recieve all notification about all the comments to that node. Subscribing to comments sends
|
| 34 |
notification only about replies to that particular comment. Leave unchecked to enable subscribe to replies.')
|
| 35 |
);
|
| 36 |
$form['comment_subscribe_settings'][
|
| 37 |
'comment_subscribe_default_anon_mailalert'] = array(
|
| 38 |
'#type' => 'checkbox',
|
| 39 |
'#title' => t('Fill checkbox for followup with YES by default for
|
| 40 |
anonymous users, so they will get an email
|
| 41 |
alert for follow up comments if they do not uncheck it then'),
|
| 42 |
'#return_value' => 1,
|
| 43 |
'#default_value' => variable_get(
|
| 44 |
'comment_subscribe_default_anon_mailalert', TRUE),
|
| 45 |
'#description' => t('This flag presets the flag for the follow-up
|
| 46 |
notification on the form that anonymous users will
|
| 47 |
see when posting a comment')
|
| 48 |
);
|
| 49 |
$form['comment_subscribe_settings'][
|
| 50 |
'comment_subscribe_default_mailtext'] = array(
|
| 51 |
'#type' => 'textarea',
|
| 52 |
'#title' => t('Default mail text for sending out the
|
| 53 |
notifications.'),
|
| 54 |
'#description' => t("You can use the following variables to be
|
| 55 |
replaced
|
| 56 |
<ul>
|
| 57 |
<li> !commname = the username who posted the comment
|
| 58 |
<li> !commtext = the text of the posted comment
|
| 59 |
<li> !commsubj = the subject of the posted comment
|
| 60 |
<li> !comment_url = the full url of the post and comment - note:
|
| 61 |
if you have paging enabled, this does not work
|
| 62 |
correct - set your max comments per page so that all fit on one
|
| 63 |
page or reverse order them
|
| 64 |
<li> !node_title = the title of the node that was commented on
|
| 65 |
<li> !node_teaser = the teaser of the node that was commented
|
| 66 |
on
|
| 67 |
<li> !node_body = the body of the node that was commented on
|
| 68 |
<li> !mission = site_mission text
|
| 69 |
<li> !name = username receiving the alert
|
| 70 |
<li> !site = your site
|
| 71 |
<li> !uri = base_url of site
|
| 72 |
<li> !uri_brief = base_url of site w/o http
|
| 73 |
<li> !date = the current time
|
| 74 |
<li> !login_uri uri to login the user
|
| 75 |
<li> !edit_uri = uri to edit user profile
|
| 76 |
<li> !link1 the QUICKLINK to disable future follow-up mail
|
| 77 |
notifications for the article
|
| 78 |
<li> !link2 the QUICKLINK to disable future reply mail
|
| 79 |
notifications for the user's comment
|
| 80 |
</ul>"),
|
| 81 |
'#default_value' => variable_get(
|
| 82 |
'comment_subscribe_default_mailtext', t(DEFAULT_MAILTEXT) ),
|
| 83 |
'#return_value' => 1,
|
| 84 |
'#cols' => 80,
|
| 85 |
'#rows' => 15
|
| 86 |
);
|
| 87 |
return system_settings_form($form);
|
| 88 |
}
|