summaryrefslogtreecommitdiff
path: root/modules/forum
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-08-06 23:00:42 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-08-06 23:00:42 +0000
commit129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f (patch)
tree6ff2bc019570712eabe871cd5d6c0c5b1c7194b8 /modules/forum
parent0299beb05ee4af647fbb25ae113018e05aeb39ba (diff)
downloadbrdo-129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f.tar.gz
brdo-129c8eb18c47bf7b0e0fe35ac6bc1b7ee38d177f.tar.bz2
#62340 by chx, webchick, Jaza, Eaton, mathieu, and myself. Configurable node types.
Diffstat (limited to 'modules/forum')
-rw-r--r--modules/forum/forum.module16
1 files changed, 11 insertions, 5 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index d6c2f0e8e..ec1caa25d 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -33,8 +33,6 @@ function forum_help($section) {
return t('<p>Containers help you organize your forums. The job of a container is to hold, or contain, other forums that are related. For example, a container named "Food" might hold two forums named "Fruit" and "Vegetables".</p>');
case 'admin/content/forum/add/forum':
return t('<p>A forum holds discussion topics that are related. For example, a forum named "Fruit" might contain topics titled "Apples" and "Bananas".</p>');
- case 'node/add#forum':
- return t('Create a new topic for discussion in the forums.');
}
}
@@ -107,7 +105,14 @@ function forum_menu($may_cache) {
* Implementation of hook_node_info().
*/
function forum_node_info() {
- return array('forum' => array('name' => t('forum topic'), 'base' => 'forum'));
+ return array(
+ 'forum' => array(
+ 'name' => t('forum topic'),
+ 'module' => 'forum',
+ 'description' => t('Create a new topic for discussion in the forums.'),
+ 'title_label' => t('Subject'),
+ )
+ );
}
/**
@@ -383,7 +388,8 @@ function forum_update($node) {
* Implementation of hook_form().
*/
function forum_form(&$node) {
- $form['title'] = array('#type' => 'textfield', '#title' => t('Subject'), '#default_value' => $node->title, '#required' => TRUE, '#weight' => -5);
+ $type = node_get_types('type', $node);
+ $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#default_value' => $node->title, '#required' => TRUE, '#weight' => -5);
if ($node->nid) {
$forum_terms = taxonomy_node_get_terms_by_vocabulary(_forum_get_vid(), $node->nid);
@@ -392,7 +398,7 @@ function forum_form(&$node) {
$form['shadow'] = array('#type' => 'checkbox', '#title' => t('Leave shadow copy'), '#default_value' => $shadow, '#description' => t('If you move this topic, you can leave a link in the old forum to the new forum.'));
}
- $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => check_plain($type->body_label), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
$form['body_filter']['format'] = filter_form($node->format);
return $form;