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

Contents of /contributions/modules/commentmail/commentmail.admin.inc

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


Revision 1.2 - (show annotations) (download) (as text)
Thu Mar 12 19:52:14 2009 UTC (8 months, 2 weeks ago) by maartenvg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -1 lines
File MIME type: text/x-php
#399956 by seanr: Make the maxlength of the commentmail_to textfield 256 characters long.
1 <?php
2
3 /**
4 * Settings page callback function.
5 */
6 function commentmail_admin_settings() {
7 $form['commentmail_to'] = array(
8 '#type' => 'textfield',
9 '#title' => t('Send to'),
10 '#default_value' => variable_get('commentmail_to', variable_get('site_mail', '')),
11 '#description' => t('A mail message will be sent here when new comments are posted to the site. Separate multiple addresses with a comma.'),
12 '#maxlength' => 256,
13 );
14
15 $form['commentmail_mode'] = array(
16 '#type' => 'radios',
17 '#title' => t('Send mail for'),
18 '#default_value' => variable_get('commentmail_mode', 'approval'),
19 '#options' => array(
20 'all' => t('all new comments'),
21 'approval' => t('just comments needing approval'),
22 'disable' => t('none (disabled)'),
23 ),
24 );
25
26 $placeholders = t("The following placeholders are available:
27 <dl>
28 <dt>@site</dt>
29 <dd>The name of your site.</dd>
30
31 <dt>@node</dt>
32 <dd>The title of the post this comment was submitted for.</dd>
33
34 <dt>@quick_approve</dt>
35 <dd>The address the recipient can visit to view/edit/delete/approve the comment - recommended.</dd>
36
37 <dt>@approval_url</dt>
38 <dd>The address the recipient can visit to publish the comment.</dd>
39
40 <dt>@delete_url</dt>
41 <dd>The address the recipient can visit to delete the comment.</dd>
42
43 <dt>@ban_url</dt>
44 <dd>The address the recipient can visit to delete the comment and ban the user who submitted the comment.</dd>
45
46 <dt>@edit_url</dt>
47 <dd>The address the recipient can visit to edit the comment.</dd>
48
49 <dt>@view_url</dt>
50 <dd>The address the recipient can visit to view the comment.</dd>
51
52 <dt>@admin_url</dt>
53 <dd>The address of the comment moderation.</dd>
54
55 <dt>@queue_url</dt>
56 <dd>The address of the comment moderation approval queue.</dd>
57
58 <dt>@host</dt>
59 <dd>The host name of the user who submitted the comment.</dd>
60
61 <dt>@user</dt>
62 <dd>The name of the user who submitted the comment.</dd>
63
64 <dt>@mail</dt>
65 <dd>The e-mail address of the user who submitted the comment.</dd>
66
67 <dt>@homepage</dt>
68 <dd>The homepage of the user who submitted the comment.</dd>
69
70 <dt>@subject</dt>
71 <dd>The comment's subject line.</dd>
72
73 <dt>@comment</dt>
74 <dd>The actual comment text the user submitted.</dd>");
75
76 $form['commentmail_mail_approve'] = array(
77 '#type' => 'textarea',
78 '#title' => t('Body text for approval mails'),
79 '#default_value' => variable_get('commentmail_mail_approve', t(COMMENTMAIL_DEFAULT_APPROVE)),
80 '#description' => $placeholders,
81 '#cols' => 60,
82 '#rows' => 25,
83 );
84
85 $form['commentmail_mail_notify'] = array(
86 '#type' => 'textarea',
87 '#title' => t('Body text for notification mails'),
88 '#default_value' => variable_get('commentmail_mail_notify', t(COMMENTMAIL_DEFAULT_NOTIFY)),
89 '#description' => $placeholders,
90 '#cols' => 60,
91 '#rows' => 25,
92 );
93
94 return system_settings_form($form);
95 }

  ViewVC Help
Powered by ViewVC 1.1.2