summaryrefslogtreecommitdiff
path: root/modules/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-25 10:11:59 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-25 10:11:59 +0000
commitb1b1e2045f9a3bcc645293c372516e756f0dcb57 (patch)
tree0ec8a2fa3f65161af09a13a327b66a833386a43b /modules/comment.module
parent924dda1fa4f227c295f5a6e28f2c6e57d7871ecc (diff)
downloadbrdo-b1b1e2045f9a3bcc645293c372516e756f0dcb57.tar.gz
brdo-b1b1e2045f9a3bcc645293c372516e756f0dcb57.tar.bz2
- Patch #37798 by Neil: allow non-workflow form elements on the node type settings page.
Diffstat (limited to 'modules/comment.module')
-rw-r--r--modules/comment.module9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 36f81ac93..12a23143a 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -231,15 +231,18 @@ function comment_link($type, $node = 0, $main = 0) {
return $links;
}
+function comment_form_alter($form_id, &$form) {
+ if (substr($form_id, -14) == '_node_settings') {
+ $form['workflow']['comment_'. $node->type] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $node->type, COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
+ }
+}
+
/**
* Implementation of hook_nodeapi().
*
*/
function comment_nodeapi(&$node, $op, $arg = 0) {
switch ($op) {
- case 'settings':
- $form['comment_'. $node->type] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $node->type, COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
- return $form;
case 'fields':
return array('comment');