- added new variable: theme_footer which can be used to provide a

footer message like a copyright notice. Themes should use this!
- small improvement to example theme
- added theme_footer to theme marvin
- small improvement to database.inc
3-00
Dries Buytaert 2001-04-14 19:29:27 +00:00
parent d7fefa2a6b
commit d32216f8b6
4 changed files with 18 additions and 11 deletions

View File

@ -8,9 +8,9 @@ function db_connect($host, $user, $pass, $name) {
function db_query($query, $debug = 0) {
$result = mysql_query($query);
if ($debug) print "<P>query: $query<BR>error". mysql_error() ."</P>";
if ($debug) print "<P>query: $query<BR>error:". mysql_error() ."</P>";
if ($result) return $result;
else watchdog("error", "database: ". mysql_error() ."<BR>query: ". htmlspecialchars($query));
else watchdog("error", "database: ". mysql_error() ."\nquery: ". htmlspecialchars($query));
}
function db_fetch_object($qid) {

View File

@ -23,10 +23,6 @@ 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 settings</H3>\n";
@ -68,6 +64,18 @@ function settings_conf() {
$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";
$output .= "<H3>Theme settings</H3>\n";
$output .= "<B>Default theme:</B><BR>\n";
foreach ($themes as $key=>$value) $options1 .= "<OPTION VALUE=\"$key\"". (variable_get(theme_default, key($themes)) == $key ? " SELECTED" : "") .">$key</OPTION>\n";
$output .= "<SELECT NAME=\"edit[theme_default]\">$options1</SELECT><BR>\n";
$output .= "<I><SMALL>The default theme displayed for anonymous users.</SMALL></I><P>\n";
$output .= "<B>Footer message:</B><BR>\n";
$output .= "<TEXTAREA NAME=\"edit[theme_footer]\" COLS=\"35\" ROWS=\"5\" WRAP=\"virtual\">". variable_get(theme_footer, "") ."</TEXTAREA><BR>\n";
$output .= "<I><SMALL>This text will be displayed at the bottom of each page. Useful to add a copyright notice to your pages.</SMALL></I><P>\n";
$output .= "<HR>\n";
return $output;

View File

@ -22,7 +22,7 @@
<TABLE BORDER="1">
<TR>
<TD>
Logo? <!-- I left a TD to add a logo of some kind -->
<BIG><A HREF="index.php"><?php print variable_get(site_name, "drupal"); ?></A></BIG>
</TD>
<TD ALIGN="right" COLSPAN="2">
@ -191,9 +191,8 @@
</TR>
<TR>
<TD ALIGN="center" COLSPAN="3">
<?php
print theme_link(" | ");
?>
<P><?php print theme_link(" | "); ?></P>
<P><SMALL><?php print variable_get(theme_footer, ""); ?></SMALL></P>
</TD>
</TR>
</TABLE>

View File

@ -145,7 +145,7 @@
<TR>
<TD ALIGN="center" COLSPAN="3">
<?php
print "<SMALL>[ ". theme_link(" | ") ." ]</SMALL><P>\n";
print "<P><SMALL>[ ". theme_link(" | ") ." ]</SMALL></P><P>". varaible_get(theme_footer, "") ."</P>\n";
?>
</TD>
</TR>