Commit d684b1f1 authored by Dries's avatar Dries

- various smaller updates before I start watching Formula 1 with [a] a
  0.5 liter box of Haagen-Dhaz (Belgian Choclate) and [b] my laptop on
  my lap for drupal hacking.  Life hardly can get any better than this.
parent 167594dc
...@@ -29,12 +29,10 @@ drupal 2.00, 15/03/2001 ...@@ -29,12 +29,10 @@ drupal 2.00, 15/03/2001
+ improved parser to support more "generic" RDF/RSS/XML backend + improved parser to support more "generic" RDF/RSS/XML backend
* improved module module * improved module module
* improved watchdog module * improved watchdog module
* improved database abstraction layer
* added CREDITS file * added CREDITS file
* added directory "misc" * added directory "misc"
* added new scripts to directory "scripts" * added new scripts to directory "scripts"
* improved database abstraction layer
+ added db_insert_id()
- revised documentation - revised documentation
drupal 1.00, 15/01/2001 drupal 1.00, 15/01/2001
......
...@@ -12,15 +12,12 @@ $db_name = "database"; ...@@ -12,15 +12,12 @@ $db_name = "database";
# Administrative information # Administrative information
# #
$site_name = "site name"; $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"; $site_email = "info@yourdomain.com";
# #
# Comment votes: # Comment votes:
# the keys of this associative array are displayed in each # 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'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", $comment_votes = array("none" => "none",
"-1" => "- 1", "-1" => "- 1",
...@@ -43,8 +40,7 @@ $anonymous = "Anonymous Chicken"; ...@@ -43,8 +40,7 @@ $anonymous = "Anonymous Chicken";
# #
# Themes: # Themes:
# the first theme listed in this associative array will # The first theme listed in this associative array will automatically become the default theme.
# automatically become the default theme.
# #
$themes = array("UnConeD" => array( $themes = array("UnConeD" => array(
"themes/unconed/unconed.theme", "themes/unconed/unconed.theme",
...@@ -55,35 +51,22 @@ $themes = array("UnConeD" => array( ...@@ -55,35 +51,22 @@ $themes = array("UnConeD" => array(
# #
# Languages / translation / internationalization: # Languages / translation / internationalization:
# the first language listed in this associative array will # 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.
# automatically become the default language. You can add # 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.
# a lanaguage but make sure your SQL table, called locales #$languages = array("en" => "English");
# is updated appropriatly.
#
$languages = array("en" => "English");
# #
# Submission moderation votes: # Submission moderation votes:
# the keys of this associative array are displayed in each # 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.
# submission's selection box whereas the corresponding values # 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.
# 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", $submission_votes = array("neutral (+0)" => "+ 0",
"post it (+1)" => "+ 1", "post it (+1)" => "+ 1",
"dump it (-1)" => "- 1"); "dump it (-1)" => "- 1");
# #
# Submission rate: # Submission rate:
# defines the submission rate for the different types of content # 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.
# submission. It is supposed to stop malicious attempts to screw # Example: '"comment" => 60' means that there is only one new comment allowed from the same IP-address every 60 seconds.
# 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 $submission_rate = array("comment" => "60", // 60 seconds = 1 minute
"diary" => "300", // 300 seconds = 5 minutes "diary" => "300", // 300 seconds = 5 minutes
...@@ -91,8 +74,7 @@ $submission_rate = array("comment" => "60", // 60 seconds = 1 minute ...@@ -91,8 +74,7 @@ $submission_rate = array("comment" => "60", // 60 seconds = 1 minute
# #
# Submission size: # Submission size:
# the maximum length (i.e. the maximum number of characters) a # The maximum length (i.e. the maximum number of characters) a story, a diary entry, or a comment is allowed to be.
# story, a diary entry, or a comment is allowed to be.
# #
$submission_size = 12000; // 12.000 characters is appr. 300 lines $submission_size = 12000; // 12.000 characters is appr. 300 lines
......
...@@ -6,7 +6,8 @@ function locale_init() { ...@@ -6,7 +6,8 @@ function locale_init() {
} }
function t($string) { function t($string) {
return locale($string); global $languages;
return ($languages ? locale($string) : $string);
} }
?> ?>
\ No newline at end of file
...@@ -37,13 +37,10 @@ function ban_admin_new($mask, $category, $reason) { ...@@ -37,13 +37,10 @@ function ban_admin_new($mask, $category, $reason) {
function ban_display($category = "") { function ban_display($category = "") {
global $type2index; global $type2index;
// initialize variable:
$category = $category ? $category : 1; $category = $category ? $category : 1;
// Perform query:
$result = db_query("SELECT * FROM bans WHERE type = $category ORDER BY mask"); $result = db_query("SELECT * FROM bans WHERE type = $category ORDER BY mask");
// Generate output:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n"; $output .= " <TR>\n";
$output .= " <TH COLSPAN=\"3\">\n"; $output .= " <TH COLSPAN=\"3\">\n";
...@@ -57,11 +54,7 @@ function ban_display($category = "") { ...@@ -57,11 +54,7 @@ function ban_display($category = "") {
$output .= " </FORM>\n"; $output .= " </FORM>\n";
$output .= " </TH>\n"; $output .= " </TH>\n";
$output .= " </TR>\n"; $output .= " </TR>\n";
$output .= " <TR>\n"; $output .= " <TR><TH>mask</TH><TH>reason</TH><TH>operations</TH></TR>\n";
$output .= " <TH>mask</TH>\n";
$output .= " <TH>reason</TH>\n";
$output .= " <TH>operations</TH>\n";
$output .= " </TR>\n";
while ($ban = db_fetch_object($result)) { 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"; $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() { ...@@ -76,16 +69,17 @@ function ban_admin_add() {
$output .= "<H3>Add new ban:</H3>\n"; $output .= "<H3>Add new ban:</H3>\n";
$output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n"; $output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n";
$output .= "<B>Banmask:</B><BR>\n"; $output .= "<B>Banmask:</B><BR>\n";
$output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n"; $output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n";
$output .= "<B>Type:</B><BR>\n"; $output .= "<B>Type:</B><BR>\n";
$output .= "<SELECT NAME=\"category\"\">\n"; for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n";
for (reset($type2index); $cur = current($type2index); next($type2index)) { $output .= "<SELECT NAME=\"category\"\">$options</SELECT><P>\n";
$output .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n";
}
$output .= "</SELECT><P>\n";
$output .= "<B>Reason:</B><BR>\n"; $output .= "<B>Reason:</B><BR>\n";
$output .= "<TEXTAREA NAME=\"reason\" COLS=\"50\" ROWS=\"5\"></TEXTAREA><P>\n"; $output .= "<TEXTAREA NAME=\"reason\" COLS=\"50\" ROWS=\"5\"></TEXTAREA><P>\n";
$output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add ban\"><BR>\n"; $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add ban\"><BR>\n";
$output .= "</FORM>\n"; $output .= "</FORM>\n";
...@@ -103,14 +97,14 @@ function ban_admin_check() { ...@@ -103,14 +97,14 @@ function ban_admin_check() {
$output .= "<H3>Ban check:</H3>\n"; $output .= "<H3>Ban check:</H3>\n";
$output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n"; $output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n";
$output .= "<B>Banmask:</B><BR>\n"; $output .= "<B>Banmask:</B><BR>\n";
$output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n"; $output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n";
$output .= "<B>Type:</B><BR>\n"; $output .= "<B>Type:</B><BR>\n";
$output .= "<SELECT NAME=\"category\"\">\n"; for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n";
for (reset($type2index); $cur = current($type2index); next($type2index)) { $output .= "<SELECT NAME=\"category\"\">$options</SELECT><P>\n";
$output .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n";
}
$output .= "</SELECT><P>\n";
$output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Check ban\"><BR>\n"; $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Check ban\"><BR>\n";
$output .= "</FORM>\n"; $output .= "</FORM>\n";
......
...@@ -165,8 +165,9 @@ function footer() { ...@@ -165,8 +165,9 @@ function footer() {
<TR> <TR>
<TD ALIGN="center" COLSPAN="3"> <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> </TD>
</TR> </TR>
</TABLE> </TABLE>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment