summaryrefslogtreecommitdiff
path: root/modules/forum
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-09-23 08:47:13 +0000
committerDries Buytaert <dries@buytaert.net>2005-09-23 08:47:13 +0000
commit61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0 (patch)
tree814cc9a6da1ec51a6e3eca921dc001ae6b5dee6a /modules/forum
parente3a4085a07647878142d1c51a6977a5b98f707ea (diff)
downloadbrdo-61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0.tar.gz
brdo-61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0.tar.bz2
- Patch #10056: allow the node title forms to be customized.
Diffstat (limited to 'modules/forum')
-rw-r--r--modules/forum/forum.module6
1 files changed, 5 insertions, 1 deletions
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