From 9e4984588c7f70ddc8012859cd1e97a00c0829ad Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sun, 10 Jun 2001 13:53:44 +0000 Subject: Changes - created a BaseTheme class in theme.inc. - added links($links = array(), $status = 0, $node = 0) to BaseTheme. - modified all themes to extend from BaseTheme. - modiefied theme_link() to take advantage of $theme->links(). - theme_morelink() does not require a $theme argument. Todo - add the other standard variables and functions to BaseTheme. - some themes could use some more modifications. Weird - marvin.theme still has a story() function. --- themes/example/example.theme | 9 ++++----- themes/marvin/marvin.theme | 12 ++++++------ themes/unconed/unconed.theme | 12 ++++++------ 3 files changed, 16 insertions(+), 17 deletions(-) (limited to 'themes') diff --git a/themes/example/example.theme b/themes/example/example.theme index 20e567173..ad8a92cff 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -9,7 +9,7 @@ *********************************************************************/ - class Theme { + class Theme extends BaseTheme { // General colorset that can be used for this theme var $foreground = "#000000"; var $background = "#FFFFFF"; @@ -30,7 +30,7 @@ @@ -50,7 +50,7 @@ } // close header function - function node($node, $main = 0) { + function node($node, $main = 0, $links = 0) { ?> @@ -83,8 +83,7 @@ diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index 67746ab24..ab76f8fe1 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -10,7 +10,7 @@ *********************************************************************/ - class Theme { + class Theme extends BaseTheme { var $link = "#666699"; // General colorset that can be used for this theme @@ -39,7 +39,7 @@ @@ -66,12 +66,12 @@ print " \n"; print " \n"; print " \n"; - if ($main) print " \n"; + if ($main || $links) print " \n"; print "
links($links, $main, $node); ?>
". theme_link(" | ") ."\n"; + print "". theme_link() ."\n"; ?>
 
". theme_morelink($this, $story) ."
". $this->links($links, $main, $node) ."
\n"; print "

\n\n"; } - function node($node, $main = 0) { + function node($node, $main = 0, $links = 0) { print "\n\n"; print "\n"; print " \n"; @@ -86,7 +86,7 @@ print " \n"; print " \n"; print " \n"; - if ($main) print " \n"; + if ($main || $links) print " \n"; print "
\"\"   ". check_output($node->title) ."

". check_output($node->body, 1) ."

 
". theme_morelink($this, $node) ."
". $this->links($links, $main, $node) ."
\n"; print "

\n\n"; } @@ -168,7 +168,7 @@ [ ". theme_link(" | ") ." ]

". variable_get(site_footer, "") ."

\n"; + print "

[ ". theme_link() ." ]

". variable_get(site_footer, "") ."

\n"; ?> diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme index 08ea6fe3c..54c938dd5 100644 --- a/themes/unconed/unconed.theme +++ b/themes/unconed/unconed.theme @@ -10,7 +10,7 @@ *********************************************************************/ - class Theme { + class Theme extends BaseTheme { var $foreground = "#000000"; var $background = "#FFFFFF"; @@ -65,7 +65,7 @@ -
+
title\" -->\n"; ?> @@ -103,8 +103,8 @@ bgcolor3 ."\">bgcolor3 ."\" ALIGN=\"right\" COLSPAN=\"2\">". theme_morelink($this, $node) .""; + if ($main || $links) + echo "bgcolor3 ."\">bgcolor3 ."\" ALIGN=\"right\" COLSPAN=\"2\">". $this->links($links, $main, $node) .""; ?>
-
+
-- cgit v1.2.3