summaryrefslogtreecommitdiff
path: root/modules/settings.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-04-11 19:44:24 +0000
committerDries Buytaert <dries@buytaert.net>2001-04-11 19:44:24 +0000
commit4711869f52897077b52f76b54a74982de3ff0e9b (patch)
treef2633c6f760e9faba9a825d5feb1a30af566f955 /modules/settings.module
parentdc93ff3260b15f4660ea40901a9ea227e60b43f1 (diff)
downloadbrdo-4711869f52897077b52f76b54a74982de3ff0e9b.tar.gz
brdo-4711869f52897077b52f76b54a74982de3ff0e9b.tar.bz2
- fixed a small SQL bug in page.module
- slightly improved story.module, node.module and book.module - made the "default theme" a setting from the setting page - polished a bit on the export function: we can now export the book or parts thereof through the following url: 1. http://drop.org/export/book/ (full book) 2. http://drop.org/export/book/nid (where nid is the node id to start with) The export routine demonstrates how it can be done yet the output is too basic and can only improve over time.
Diffstat (limited to 'modules/settings.module')
-rw-r--r--modules/settings.module37
1 files changed, 22 insertions, 15 deletions
diff --git a/modules/settings.module b/modules/settings.module
index 1bbe64fdb..3cdb70233 100644
--- a/modules/settings.module
+++ b/modules/settings.module
@@ -3,7 +3,7 @@
$module = array("admin" => "settings_admin");
function settings_conf() {
- global $conf, $cmodes, $corder;
+ global $conf, $cmodes, $corder, $themes;
$output .= "<H3>General settings</H3>\n";
@@ -23,46 +23,53 @@ function settings_conf() {
$output .= "<INPUT NAME=\"edit[anonymous]\" MAXLENGTH=\"55\" SIZE=\"30\" VALUE=\"". variable_get(anonymous, "Anonymous") ."\"><BR>\n";
$output .= "<I><SMALL>The name displayed for anonymous users.</SMALL></I><P>\n";
+ $output .= "<B>Default theme:</B><BR>\n";
+ foreach ($themes as $key=>$value) $options1 .= "<OPTION VALUE=\"$key\"". (variable_get(default_theme, key($themes)) == $key ? " SELECTED" : "") .">$key</OPTION>\n";
+ $output .= "<SELECT NAME=\"edit[default_theme]\">$options1</SELECT><BR>\n";
+ $output .= "<I><SMALL>The default theme displayed for anonymous users.</SMALL></I><P>\n";
+
$output .= "<HR>\n";
- $output .= "<H3>Comment system</H3>\n";
+ $output .= "<H3>Comment settings</H3>\n";
$output .= "<B>Default display mode:</B><BR>\n";
- foreach ($cmodes as $key=>$value) $options1 .= "<OPTION VALUE=\"$key\"". ($conf[default_comment_mode] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[default_comment_mode]\">$options1</SELECT><BR>\n";
+ foreach ($cmodes as $key=>$value) $options2 .= "<OPTION VALUE=\"$key\"". ($conf[default_comment_mode] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
+ $output .= "<SELECT NAME=\"edit[default_comment_mode]\">$options2</SELECT><BR>\n";
$output .= "<I><SMALL>The default mode in which comments are displayed.</SMALL></I><P>\n";
$output .= "<B>Default display mode:</B><BR>\n";
- foreach ($corder as $key=>$value) $options2 .= "<OPTION VALUE=\"$key\"". ($conf[default_comment_order] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[default_comment_order]\">$options2</SELECT><BR>\n";
+ foreach ($corder as $key=>$value) $options3 .= "<OPTION VALUE=\"$key\"". ($conf[default_comment_order] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
+ $output .= "<SELECT NAME=\"edit[default_comment_order]\">$options3</SELECT><BR>\n";
$output .= "<I><SMALL>The default mode in which comments are displayed.</SMALL></I><P>\n";
$output .= "<B>Default threshold:</B><BR>\n";
- for ($i = -1; $i < 6; $i++) $options3 .= " <OPTION VALUE=\"$i\"". ($conf[default_comment_threshold] == $i ? " SELECTED" : "") .">Filter - $i</OPTION>";
- $output .= "<SELECT NAME=\"edit[default_comment_threshold]\">$options3</SELECT><BR>\n";
+ for ($i = -1; $i < 6; $i++) $options4 .= " <OPTION VALUE=\"$i\"". ($conf[default_comment_threshold] == $i ? " SELECTED" : "") .">Filter - $i</OPTION>";
+ $output .= "<SELECT NAME=\"edit[default_comment_threshold]\">$options4</SELECT><BR>\n";
$output .= "<I><SMALL>The default threshold used to filter comments.</SMALL></I><P>\n";
$output .= "<HR>\n";
- $output .= "<H3>Submission system</H3>\n";
+ $output .= "<H3>Submission settings</H3>\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 .= "<B>Maximum submission size:</B><BR>\n";
- foreach ($size as $key=>$value) $options4 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_input_size, 10000) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[max_input_size]\">$options4</SELECT><BR>\n";
+ foreach ($size as $key=>$value) $options5 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_input_size, 10000) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
+ $output .= "<SELECT NAME=\"edit[max_input_size]\">$options5</SELECT><BR>\n";
$output .= "<I><SMALL>The maximum number of characters someone can enter in a form.</SMALL></I><P>\n";
$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 .= "<B>Maximum node rate:</B><BR>\n";
- foreach ($rate as $key=>$value) $options5 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_node_rate, 900) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[max_node_rate]\">$options5</SELECT><BR>\n";
+ foreach ($rate as $key=>$value) $options6 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_node_rate, 900) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
+ $output .= "<SELECT NAME=\"edit[max_node_rate]\">$options6</SELECT><BR>\n";
$output .= "<I><SMALL>The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks.</SMALL></I><P>\n";
$output .= "<B>Maximum comment rate:</B><BR>\n";
- foreach ($rate as $key=>$value) $options6 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_comment_rate, 120) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[max_comment_rate]\"$options6</SELECT><BR>\n";
+ foreach ($rate as $key=>$value) $options7 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_comment_rate, 120) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
+ $output .= "<SELECT NAME=\"edit[max_comment_rate]\"$options7</SELECT><BR>\n";
$output .= "<I><SMALL>The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks.</SMALL></I><P>\n";
+ $output .= "<HR>\n";
+
return $output;
}