diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | includes/hostname.conf | 40 | ||||
-rw-r--r-- | includes/locale.inc | 3 | ||||
-rw-r--r-- | modules/ban.module | 30 | ||||
-rw-r--r-- | themes/marvin/marvin.theme | 3 |
5 files changed, 28 insertions, 52 deletions
@@ -29,12 +29,10 @@ drupal 2.00, 15/03/2001 + improved parser to support more "generic" RDF/RSS/XML backend * improved module module * improved watchdog module + * improved database abstraction layer * added CREDITS file * added directory "misc" * added new scripts to directory "scripts" - * improved database abstraction layer - + added db_insert_id() - - revised documentation drupal 1.00, 15/01/2001 diff --git a/includes/hostname.conf b/includes/hostname.conf index 882b319db..19cd94b0f 100644 --- a/includes/hostname.conf +++ b/includes/hostname.conf @@ -12,15 +12,12 @@ $db_name = "database"; # Administrative information # $site_name = "site name"; -$site_url = "http://yourdomain.com/"; // add a trailing slash +$site_url = "http://yourdomain.com/"; // add a trailing slash $site_email = "info@yourdomain.com"; # # Comment votes: -# the keys of this associative array are displayed in each -# comment's selection box whereas the corresponding values -# represent the mathematical calculation to be performed -# to update a comment's value. +# The keys of this associative array are displayed in each comment's selection box whereas the corresponding values represent the mathematical calculation to be performed to update a comment's value. # $comment_votes = array("none" => "none", "-1" => "- 1", @@ -43,8 +40,7 @@ $anonymous = "Anonymous Chicken"; # # Themes: -# the first theme listed in this associative array will -# automatically become the default theme. +# The first theme listed in this associative array will automatically become the default theme. # $themes = array("UnConeD" => array( "themes/unconed/unconed.theme", @@ -55,35 +51,22 @@ $themes = array("UnConeD" => array( # # Languages / translation / internationalization: -# the first language listed in this associative array will -# automatically become the default language. You can add -# a lanaguage but make sure your SQL table, called locales -# is updated appropriatly. -# -$languages = array("en" => "English"); +# The first language listed in this associative array will automatically become the default language. You can add a language but make sure your SQL table, called locales is updated appropriately. +# Translation support - as provided by the default locale module add significant overhead to your site in exchange for excessive maintenance capabilities. If your site does not require translation support, disable it by commenting out the $language variable below. +#$languages = array("en" => "English"); # # Submission moderation votes: -# the keys of this associative array are displayed in each -# submission's selection box whereas the corresponding values -# represent the mathematical calculation to be performed to -# update a comment's value. -# Warning: changing $submission_votes will affect the integrity -# of all pending stories in the open submission queue. Do not -# change this setting unless there are no pending stories in the -# submission queue or unless you know what you are doing. +# The keys of this associative array are displayed in each submission's selection box whereas the corresponding values represent the mathematical calculation to be performed to update a comment's value. +# Warning: changing $submission_votes will affect the integrity of all pending stories in the open submission queue. Do not change this setting unless there are no pending stories in the submission queue or unless you know what you are doing. $submission_votes = array("neutral (+0)" => "+ 0", "post it (+1)" => "+ 1", "dump it (-1)" => "- 1"); # # Submission rate: -# defines the submission rate for the different types of content -# submission. It is supposed to stop malicious attempts to screw -# with the database and to stop denial of service attacks. -# Example: -# '"comment" => 60' means that there is only one new comment -# allowed from the same IP-address every 60 seconds. +# Defines the submission rate for the different types of content submission. It is supposed to stop malicious attempts to screw with the database and to stop denial of service attacks. +# Example: '"comment" => 60' means that there is only one new comment allowed from the same IP-address every 60 seconds. # $submission_rate = array("comment" => "60", // 60 seconds = 1 minute "diary" => "300", // 300 seconds = 5 minutes @@ -91,8 +74,7 @@ $submission_rate = array("comment" => "60", // 60 seconds = 1 minute # # Submission size: -# the maximum length (i.e. the maximum number of characters) a -# story, a diary entry, or a comment is allowed to be. +# The maximum length (i.e. the maximum number of characters) a story, a diary entry, or a comment is allowed to be. # $submission_size = 12000; // 12.000 characters is appr. 300 lines diff --git a/includes/locale.inc b/includes/locale.inc index 8b717b3ef..c295d23f4 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -6,7 +6,8 @@ function locale_init() { } function t($string) { - return locale($string); + global $languages; + return ($languages ? locale($string) : $string); } ?>
\ No newline at end of file diff --git a/modules/ban.module b/modules/ban.module index b370e2da7..a6586ab4d 100644 --- a/modules/ban.module +++ b/modules/ban.module @@ -37,13 +37,10 @@ function ban_admin_new($mask, $category, $reason) { function ban_display($category = "") { global $type2index; - // initialize variable: $category = $category ? $category : 1; - // Perform query: $result = db_query("SELECT * FROM bans WHERE type = $category ORDER BY mask"); - // Generate output: $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= " <TR>\n"; $output .= " <TH COLSPAN=\"3\">\n"; @@ -57,11 +54,7 @@ function ban_display($category = "") { $output .= " </FORM>\n"; $output .= " </TH>\n"; $output .= " </TR>\n"; - $output .= " <TR>\n"; - $output .= " <TH>mask</TH>\n"; - $output .= " <TH>reason</TH>\n"; - $output .= " <TH>operations</TH>\n"; - $output .= " </TR>\n"; + $output .= " <TR><TH>mask</TH><TH>reason</TH><TH>operations</TH></TR>\n"; while ($ban = db_fetch_object($result)) { $output .= " <TR><TD>$ban->mask</TD><TD>$ban->reason</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?mod=ban&op=delete&category=$category&id=$ban->id\">delete</A></TD></TR>\n"; } @@ -76,16 +69,17 @@ function ban_admin_add() { $output .= "<H3>Add new ban:</H3>\n"; $output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n"; + $output .= "<B>Banmask:</B><BR>\n"; $output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n"; + $output .= "<B>Type:</B><BR>\n"; - $output .= "<SELECT NAME=\"category\"\">\n"; - for (reset($type2index); $cur = current($type2index); next($type2index)) { - $output .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; - } - $output .= "</SELECT><P>\n"; + for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; + $output .= "<SELECT NAME=\"category\"\">$options</SELECT><P>\n"; + $output .= "<B>Reason:</B><BR>\n"; $output .= "<TEXTAREA NAME=\"reason\" COLS=\"50\" ROWS=\"5\"></TEXTAREA><P>\n"; + $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add ban\"><BR>\n"; $output .= "</FORM>\n"; @@ -103,14 +97,14 @@ function ban_admin_check() { $output .= "<H3>Ban check:</H3>\n"; $output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n"; + $output .= "<B>Banmask:</B><BR>\n"; $output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n"; + $output .= "<B>Type:</B><BR>\n"; - $output .= "<SELECT NAME=\"category\"\">\n"; - for (reset($type2index); $cur = current($type2index); next($type2index)) { - $output .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; - } - $output .= "</SELECT><P>\n"; + for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; + $output .= "<SELECT NAME=\"category\"\">$options</SELECT><P>\n"; + $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Check ban\"><BR>\n"; $output .= "</FORM>\n"; diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index cae7f7e2d..96b32a4a9 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -165,8 +165,9 @@ <TR> <TD ALIGN="center" COLSPAN="3"> <? - print "<SMALL>[ <A HREF=\"index.php\">". t("home") ."</A> | <A HREF=\"module.php?mod=faq\">". t("faq") ."</A> | <A HREF=\"module.php?mod=diary\">". t("diary") ."</A> | <A HREF=\"search.php\">". t("search") ."</A> | <A HREF=\"submit.php\">". t("submit news") ."</A> | <A HREF=\"account.php\">". t("user account") ."</A> ]</SMALL>\n"; + print "<SMALL>[ <A HREF=\"index.php\">". t("home") ."</A> | <A HREF=\"module.php?mod=faq\">". t("faq") ."</A> | <A HREF=\"module.php?mod=diary\">". t("diary") ."</A> | <A HREF=\"search.php\">". t("search") ."</A> | <A HREF=\"submit.php\">". t("submit news") ."</A> | <A HREF=\"account.php\">". t("user account") ."</A> ]</SMALL><P>\n"; ?> + <CENTER><SMALL><I><FONT COLOR="#7C7C7C">Powered by <A HREF="http://drop.org/module.php?mod=drupal">drupal</A>.</FONT></I></SMALL></CENTER> </TD> </TR> </TABLE> |