/[drupal]/contributions/modules/comment_subscribe/comment_subscribe.admin.inc
ViewVC logotype

Diff of /contributions/modules/comment_subscribe/comment_subscribe.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

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

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2