From 61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 23 Sep 2005 08:47:13 +0000 Subject: - Patch #10056: allow the node title forms to be customized. --- modules/forum/forum.module | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 7e6ce4a0c..b87d6ab15 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -517,6 +517,8 @@ function forum_validate(&$node) { // Make sure all fields are set properly: $node->icon = $node->icon ? $node->icon : ''; + node_validate_title($node,t('You have to specify a subject.')); + if ($node->taxonomy) { // Extract the node's proper topic ID. $vocabulary = variable_get('forum_nav_vocabulary', ''); @@ -558,6 +560,8 @@ function forum_update($node) { * Implementation of hook_form(). */ function forum_form(&$node) { + $output = form_textfield(t('Subject'), 'title', $node->title, 60, 128, NULL, NULL, TRUE); + if (!$node->nid) { // new topic $node->taxonomy[] = arg(3); @@ -566,7 +570,7 @@ function forum_form(&$node) { $node->taxonomy = array($node->tid); } - $output = implode('', taxonomy_node_form('forum', $node)); + $output .= implode('', taxonomy_node_form('forum', $node)); if ($node->nid) { // if editing, give option to leave shadows -- cgit v1.2.3