diff options
Diffstat (limited to 'modules/settings.module')
-rw-r--r-- | modules/settings.module | 37 |
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; } |