From 3d73a48edcf62bed0033fcea1aebcedb23e7c197 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 17 Jun 2001 20:35:48 +0000 Subject: - Merged "system settings" and "module settings" into one page. IMHO it wasn't a good idea to split them up in first place, and it turned out to be quite hard to decide where to put some variables. Also moved some variables around and even renamed a few variables while doing so. - Added a page_header() and page_footer() to all top-level .php pages. --- modules/account.module | 7 ++++++- modules/conf.module | 45 ++++++++++++++------------------------------- modules/node.module | 5 +++++ modules/node/node.module | 5 +++++ 4 files changed, 30 insertions(+), 32 deletions(-) (limited to 'modules') diff --git a/modules/account.module b/modules/account.module index fe654f5a6..56ad34737 100644 --- a/modules/account.module +++ b/modules/account.module @@ -32,6 +32,11 @@ function account_help() { access control | account listings | search account | add account | overview | help
"; + print "access control | add new account | account listings | search account | overview | help
"; $query = $query ? $query : 0; $name = $name ? $name : $edit[name]; diff --git a/modules/conf.module b/modules/conf.module index 340308c90..4a03a1a99 100644 --- a/modules/conf.module +++ b/modules/conf.module @@ -12,7 +12,7 @@ function conf_help() { \n"; - // account settings: - $output .= "

Account settings

\n"; - $output .= form_select(t("Allow registrations"), "account_reg_allow", variable_get("account_reg_allow", 1), array("Disabled", "Enabled")); - $output .= "
\n"; - - // node settings: - $output .= "

Node settings

\n"; - $output .= form_select(t("Default number of nodes to display"), "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 nodes to display on the main page.")); + // submission settings: + $output .= "

Submission settings

\n"; + $size = array(1000 => "1.000 characters", 5000 => "5.000 characters", 10000 => "10.000 characters", 15000 => "15.000 characters", 30.000 => "30.000 characters", 50000 => "50.000 characters", 100000 => "100.000 characters"); + $output .= form_select(t("Maximum submission size"), "max_input_size", variable_get("max_input_size", 10000), $size, t("The maximum number of characters someone can enter in a form.")); + $rate = array(1 => "Maximum 1 every second", 5 => "Maximum 1 every 5 seconds", 15 => "Maximum 1 every 15 seconds", 30 => "Maximum 1 every 30 seconds", 60 => "Maximum 1 every minute", 300 => "Maximum 1 every 5 minutes", 900 => "Maximum 1 every 15 minutes", 1800 => "Maximum 1 every 30 minutes", 3600 => "Maximum 1 every hour", 21600 => "Maximum 1 every 6 hour", 43200 => "Maximum 1 every 12 hour"); + $output .= form_select(t("Maximum node rate"), "max_node_rate", variable_get("max_node_rate", 900), $rate, t("The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks.")); + $output .= form_select(t("Maximum comment rate"), "max_comment_rate", variable_get("max_comment_rate", 120), $rate, t("The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks.")); $output .= "
\n"; // comment settings: @@ -42,17 +41,8 @@ function conf_view_system() { $output .= form_select(t("Default filter threshold"), "default_comment_threshold", $conf[default_comment_threshold], $threshold, t("The default threshold used to filter comments.")); $output .= "
\n"; - // submission settings: - $output .= "

Submission settings

\n"; - $size = array(1000 => "1.000 characters", 5000 => "5.000 characters", 10000 => "10.000 characters", 15000 => "15.000 characters", 30.000 => "30.000 characters", 50000 => "50.000 characters", 100000 => "100.000 characters"); - $output .= form_select(t("Maximum submission size"), "max_input_size", variable_get("max_input_size", 10000), $size, t("The maximum number of characters someone can enter in a form.")); - $rate = array(1 => "Maximum 1 every second", 5 => "Maximum 1 every 5 seconds", 15 => "Maximum 1 every 15 seconds", 30 => "Maximum 1 every 30 seconds", 60 => "Maximum 1 every minute", 300 => "Maximum 1 every 5 minutes", 900 => "Maximum 1 every 15 minutes", 1800 => "Maximum 1 every 30 minutes", 3600 => "Maximum 1 every hour", 21600 => "Maximum 1 every 6 hour", 43200 => "Maximum 1 every 12 hour"); - $output .= form_select(t("Maximum node rate"), "max_node_rate", variable_get("max_node_rate", 900), $rate, t("The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks.")); - $output .= form_select(t("Maximum comment rate"), "max_comment_rate", variable_get("max_comment_rate", 120), $rate, t("The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks.")); - $output .= "
\n"; - - // theme settings: - $output .= "

Theme settings

\n"; + // layout settings: + $output .= "

Layout settings

\n"; foreach ($themes as $key=>$value) $options .= "\n"; $output .= form_item(t("Default theme"), "", t("The default theme as seen by new visitors and anonymous users.")); $output .= "
\n"; @@ -62,10 +52,6 @@ function conf_view_system() { $output .= form_select(t("Display timer information"), "dev_timer", variable_get("dev_timer", 0), array("Disabled", "Enabled"), t("Display the time it took to generate a page. For Drupal development only.")); $output .= "
\n"; - return $output; -} - -function conf_view_module() { foreach (module_list() as $name) { if (module_hook($name, "conf_options")) { $output .= "

". ucfirst($name) ." settings

". module_invoke($name, "conf_options") ."
\n"; @@ -74,7 +60,7 @@ function conf_view_module() { return $output; } -function conf_view_filter() { +function conf_view_filters() { foreach (module_list() as $name) { if (module_hook($name, "conf_filters")) { $output .= module_invoke($name, "conf_filters"); @@ -98,13 +84,10 @@ function conf_view($type) { switch ($type) { case "filter": - $form = conf_view_filter(); - break; - case "module": - $form = conf_view_module(); + $form = conf_view_filters(); break; default: - $form = conf_view_system(); + $form = conf_view_options(); } $form .= form_submit("Save configuration"); @@ -116,7 +99,7 @@ function conf_view($type) { function conf_admin() { global $edit, $op, $type; - print "system settings | module settings | content filters | help
\n"; + print "site settings | content filters | help
\n"; switch ($op) { case "help": diff --git a/modules/node.module b/modules/node.module index 5a68ec7dd..3415a9fc2 100644 --- a/modules/node.module +++ b/modules/node.module @@ -26,6 +26,11 @@ function node_help() { } } +function node_conf_options() { + $output .= form_select(t("Default number of nodes to display"), "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 nodes to display on the main page.")); + return $output; +} + function node_conf_filters() { $output .= form_select(t("Enable HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Strip HTML and PHP tags.")); $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "