diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-05-10 13:54:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-05-10 13:54:38 +0000 |
commit | 7aa28ea114535de15e5b15304c64f163d89ec385 (patch) | |
tree | 1d671a842f49da6fed8119ad62a7fa136f0accd5 /modules/node/node.module | |
parent | c886dfd05eb39bbd1be1628627b7e568fa62ee57 (diff) | |
download | brdo-7aa28ea114535de15e5b15304c64f163d89ec385.tar.gz brdo-7aa28ea114535de15e5b15304c64f163d89ec385.tar.bz2 |
- Added an option to make "node previews" optional. Patch by n8. See
"site configuration > modules > node".
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 5c0c884ca..aa0c8b2b1 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -450,6 +450,7 @@ function node_search($keys) { function node_settings() { $output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display on overview pages such as the main page.")); $output .= form_select(t("Length of trimmed posts"), "teaser_length", variable_get("teaser_length", 600), array(0 => t("Unlimited"), 200 => t("200 characters"), 400 => t("400 characters"), 600 => t("600 characters"), 800 => t("800 characters"), 1000 => t("1000 characters"), 1200 => t("1200 characters"), 1400 => t("1400 characters"), 1600 => t("1600 characters"), 1800 => t("1800 characters"), 2000 => t("2000 characters")), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'.")); + $output .= form_select(t("Preview post"), "node_preview", variable_get("node_preview", 0), array(t("Optional"), t("Required")), t("Must users preview posts before submitting?")); return $output; } @@ -1060,6 +1061,9 @@ function node_form($edit, $error = NULL) { if ($edit->title && $edit->type && !$error) { $output .= form_submit(t("Submit")); } + elseif (!variable_get("node_preview", 0)) { + $output .= form_submit(t("Submit")); + } if ($edit->nid && node_access("delete", $edit)) { $output .= form_submit(t("Delete")); |