]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/options-discussion.php
Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-admin / options-discussion.php
1 <?php
2 require_once('admin.php');
3
4 $title = __('Discussion Settings');
5 $parent_file = 'options-general.php';
6
7 include('admin-header.php');
8 ?>
9
10 <div class="wrap">
11 <h2><?php _e('Discussion Settings') ?></h2>
12 <form method="post" action="options.php">
13 <?php wp_nonce_field('update-options') ?>
14 <table class="form-table">
15 <tr valign="top">
16 <th scope="row"><?php _e('Default article settings') ?></th>
17 <td><fieldset><legend class="hidden"><?php _e('Default article settings') ?></legend>
18 <label for="default_pingback_flag">
19 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
20 <?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label>
21 <br />
22 <label for="default_ping_status">
23 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
24 <?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label>
25 <br />
26 <label for="default_comment_status">
27 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
28 <?php _e('Allow people to post comments on the article') ?></label>
29 <br />
30 <small><em><?php echo '(' . __('These settings may be overridden for individual articles.') . ')'; ?></em></small>
31 </fieldset></td>
32 </tr>
33 <tr valign="top">
34 <th scope="row"><?php _e('E-mail me whenever') ?></th>
35 <td><fieldset><legend class="hidden"><?php _e('E-mail me whenever') ?></legend>
36 <label for="comments_notify">
37 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
38 <?php _e('Anyone posts a comment') ?> </label>
39 <br />
40 <label for="moderation_notify">
41 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
42 <?php _e('A comment is held for moderation') ?> </label>
43 </fieldset></td>
44 </tr>
45 <tr valign="top">
46 <th scope="row"><?php _e('Before a comment appears') ?></th>
47 <td><fieldset><legend class="hidden"><?php _e('Before a comment appears') ?></legend>
48 <label for="comment_moderation">
49 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
50 <?php _e('An administrator must always approve the comment') ?> </label>
51 <br />
52 <label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label>
53 <br />
54 <label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label>
55 </fieldset></td>
56 </tr>
57 <tr valign="top">
58 <th scope="row"><?php _e('Comment Moderation') ?></th>
59 <td><fieldset><legend class="hidden"><?php _e('Comment Moderation') ?></legend>
60 <p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></label></p>
61
62 <p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></label></p>
63 <p>
64 <textarea name="moderation_keys" cols="60" rows="10" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea>
65 </p>
66 </fieldset></td>
67 </tr>
68 <tr valign="top">
69 <th scope="row"><?php _e('Comment Blacklist') ?></th>
70 <td><fieldset><legend class="hidden"><?php _e('Comment Blacklist') ?></legend>
71 <p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></label></p>
72 <p>
73 <textarea name="blacklist_keys" cols="60" rows="10" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
74 </p>
75 </fieldset></td>
76 </tr>
77 </table>
78
79 <h3><?php _e('Avatars') ?></h3>
80
81 <p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites.  Here you can enable the display of avatars for people who comment on your blog.'); ?></p>
82
83 <?php // the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that? ?>
84
85 <table class="form-table">
86 <tr valign="top">
87 <th scope="row"><?php _e('Avatar Display') ?></th>
88 <td><fieldset><legend class="hidden"><?php _e('Avatar display') ?></legend>
89 <?php
90         $yesorno = array(0 => __("Don&#8217;t show Avatars"), 1 => __('Show Avatars'));
91         foreach ( $yesorno as $key => $value) {
92                 $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : '';
93                 echo "\n\t<label><input type='radio' name='show_avatars' value='$key' $selected/> $value</label><br />";
94         }
95 ?>
96 </fieldset></td>
97 </tr>
98 <tr valign="top">
99 <th scope="row"><?php _e('Maximum Rating') ?></th>
100 <td><fieldset><legend class="hidden"><?php _e('Maximum Rating') ?></legend>
101
102 <?php
103 $ratings = array( 'G' => __('G &#8212; Suitable for all audiences'), 'PG' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'), 'R' => __('R &#8212; Intended for adult audiences above 17'), 'X' => __('X &#8212; Even more mature than above'));
104 foreach ($ratings as $key => $rating) :
105         $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : '';
106         echo "\n\t<label><input type='radio' name='avatar_rating' value='$key' $selected/> $rating</label><br />";
107 endforeach;
108 ?>
109
110 </fieldset></td>
111 </tr>
112 <tr valign="top">
113 <th scope="row"><?php _e('Default Avatar') ?></th>
114 <td class="defaultavatarpicker"><fieldset><legend class="hidden"><?php _e('Default Avatar') ?></legend>
115
116 <?php _e('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address.'); ?><br />
117
118 <?php
119 $avatar_defaults = array(
120         'mystery' => __('Mystery Man'),
121         'blank' => __('Blank'),
122         'gravatar_default' => __('Gravatar Logo'),
123         'identicon' => __('Identicon (Generated)'),
124         'wavatar' => __('Wavatar (Generated)'),
125         'monsterid' => __('MonsterID (Generated)')
126 );
127 $avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults);
128 $default = get_option('avatar_default');
129 if ( empty($default) )
130         $default = 'mystery';
131 $size = 32;
132 $avatar_list = '';
133 foreach ( $avatar_defaults as $default_key => $default_name ) {
134         $selected = ($default == $default_key) ? 'checked="checked" ' : '';
135         $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='{$default_key}' {$selected}/> ";
136
137         $avatar = get_avatar( $user_email, $size, $default_key );
138         $avatar_list .= preg_replace("/src='(.+?)'/", "src='\$1&amp;forcedefault=1'", $avatar);
139
140         $avatar_list .= ' ' . $default_name . '</label>';
141         $avatar_list .= '<br />';
142 }
143 echo apply_filters('default_avatar_select', $avatar_list);
144 ?>
145
146 </fieldset></td>
147 </tr>
148
149 </table>
150
151
152 <p class="submit">
153 <input type="hidden" name="action" value="update" />
154 <input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys,show_avatars,avatar_rating,avatar_default" />
155 <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" />
156 </p>
157 </form>
158 </div>
159
160 <?php include('./admin-footer.php'); ?>