diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-04-14 19:29:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-04-14 19:29:27 +0000 |
commit | d32216f8b6cfca4901ad31f634bb6b846c832f48 (patch) | |
tree | d78d9863d13bf510b41e276a8edfc1d3ba45b20a | |
parent | d7fefa2a6b4722e4ecd6f9cde2d8e8832d750d86 (diff) | |
download | brdo-d32216f8b6cfca4901ad31f634bb6b846c832f48.tar.gz brdo-d32216f8b6cfca4901ad31f634bb6b846c832f48.tar.bz2 |
- 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
-rw-r--r-- | includes/database.inc | 4 | ||||
-rw-r--r-- | modules/settings.module | 16 | ||||
-rw-r--r-- | themes/example/example.theme | 7 | ||||
-rw-r--r-- | themes/marvin/marvin.theme | 2 |
4 files changed, 18 insertions, 11 deletions
diff --git a/includes/database.inc b/includes/database.inc index 139dee1b4..634ec55ef 100644 --- a/includes/database.inc +++ b/includes/database.inc @@ -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) { diff --git a/modules/settings.module b/modules/settings.module index 3cdb70233..2dad1d72d 100644 --- a/modules/settings.module +++ b/modules/settings.module @@ -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"; @@ -69,6 +65,18 @@ function settings_conf() { $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; } diff --git a/themes/example/example.theme b/themes/example/example.theme index e78ce60d5..a1984fb4f 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -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> diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index 05e761e59..4bab35078 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -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> |