From e62e3417f7cbdbb1206f20f2f663b606a2b7b12a Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sat, 14 Jul 2001 01:01:45 +0000 Subject: Update of the box function in themes to allow a difference in style/output/look of a box() depending on the position on the page. Basically this is a 'nice version' of a hack that you could do as a theme author. I've updated all the standard themes, but 3rd party themes will of course have to be updated by their authors, in the following manner: - Replace the box() declaration: < function box($subject, $content) { > function box($subject, $content, $region = "main") { - Replace the theme_account call: < theme_account($this); > theme_account("region", $this); Note that you'll have to replace "region" with the correct region that the box is placed in. However if you have a one-column theme, you should use "all", and not for example "left" (if all boxes are on the left). Usually the "region" here should be the same as the nearest theme_blocks() call. Those theme authors who want to can make boxes that appear in the center look different from those that appear in the sides for example. --- themes/example/example.theme | 4 ++-- themes/goofy/goofy.theme | 4 ++-- themes/jeroen/jeroen.theme | 4 ++-- themes/marvin/marvin.theme | 4 ++-- themes/unconed/unconed.theme | 4 ++-- themes/yaroon/yaroon.theme | 7 +++---- 6 files changed, 13 insertions(+), 14 deletions(-) (limited to 'themes') diff --git a/themes/example/example.theme b/themes/example/example.theme index 67e857339..af4d900b4 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -136,7 +136,7 @@ echo ""; } // close comment function - function box($subject, $content) { + function box($subject, $content, $region = "main") { ?> @@ -169,7 +169,7 @@ global $PHP_SELF; - theme_account($this); + theme_account("right", $this); theme_blocks("right", $this); ?> diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme index 601125dff..b2b7bea4c 100644 --- a/themes/goofy/goofy.theme +++ b/themes/goofy/goofy.theme @@ -129,7 +129,7 @@ function c(subject,mod,author,date,body) {document.writeln("\n\n"; } // close box function @@ -139,7 +139,7 @@ function c(subject,mod,author,date,body) {document.writeln("
diff --git a/themes/jeroen/jeroen.theme b/themes/jeroen/jeroen.theme index 952faed57..7c9a1a03f 100644 --- a/themes/jeroen/jeroen.theme +++ b/themes/jeroen/jeroen.theme @@ -226,7 +226,7 @@ } // close comment function - function box($subject, $content) { + function box($subject, $content, $region = "main") { $img = (rand(0, 50) == 25) ? "boxbottomright2.gif" : "boxbottomright1.gif"; $width = rand(10, 200); $img2 = (rand(0, 100) == 50) ? "boxtopleftside2.gif" : "boxtopleftside1.gif"; @@ -296,7 +296,7 @@ global $PHP_SELF; - theme_account($this); + theme_account("right", $this); theme_blocks("right", $this); ?> diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index d5eec8fb9..c1ed292eb 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -115,7 +115,7 @@ print "
\n\n"; } - function box($subject, $content) { + function box($subject, $content, $region = "main") { print "\n\n"; print "
\n"; print " \n"; @@ -135,7 +135,7 @@ diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme index 7a8913096..76e9d4301 100644 --- a/themes/unconed/unconed.theme +++ b/themes/unconed/unconed.theme @@ -165,7 +165,7 @@ ?>

diff --git a/themes/yaroon/yaroon.theme b/themes/yaroon/yaroon.theme index db2cebcbb..880dabad9 100644 --- a/themes/yaroon/yaroon.theme +++ b/themes/yaroon/yaroon.theme @@ -94,7 +94,7 @@ @@ -192,7 +192,7 @@ } // close comment function - function box($subject, $content) { + function box($subject, $content, $region = "main") { switch (rand(0,7)) { case 0: $img = "square.gif"; break; @@ -205,8 +205,7 @@ default: $img = "square.gif"; } -?> - +?>
@@ -188,7 +188,7 @@
-- cgit v1.2.3