summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/theme.inc14
-rw-r--r--themes/example/example.theme4
-rw-r--r--themes/goofy/goofy.theme4
-rw-r--r--themes/jeroen/jeroen.theme4
-rw-r--r--themes/marvin/marvin.theme4
-rw-r--r--themes/unconed/unconed.theme4
-rw-r--r--themes/yaroon/yaroon.theme7
7 files changed, 20 insertions, 21 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index cb071bdb6..e78f313c1 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -18,7 +18,7 @@ function theme_init() {
return new Theme();
}
-function theme_account($theme) {
+function theme_account($region, $theme) {
global $user;
if ($user->id) {
@@ -48,7 +48,7 @@ function theme_account($theme) {
$content .= "<a href=\"account.php?op=logout\">". t("logout") ."</a>\n";
$content .= "</td></tr></table>\n";
- $theme->box($user->userid, $content);
+ $theme->box($user->userid, $content, $region);
}
else {
$output .= "<div align=\"center\">\n";
@@ -60,7 +60,7 @@ function theme_account($theme) {
$output .= " </form>\n";
$output .= "</div>\n";
- $theme->box(t("Login"), $output);
+ $theme->box(t("Login"), $output, $region);
}
}
@@ -72,7 +72,7 @@ function theme_blocks($region, $theme) {
case "/node.php":
if ($region != "left") {
if ($user->id) $node = db_fetch_object(db_query("SELECT * FROM node WHERE nid = '$id'"));
- if ($node->status == $status[queued]) theme_moderation_results($theme, $node);
+ if ($node->status == $status[queued]) theme_moderation_results($theme, $node, $region);
}
break;
case "/index.php":
@@ -80,13 +80,13 @@ function theme_blocks($region, $theme) {
else $result = db_query("SELECT * FROM blocks WHERE status = 2". (($region == "left" || $region == "right") ? ($region == "left" ? " AND region = 0" : " AND region = 1") : "") ." ORDER BY weight");
while ($block = db_fetch_object($result)) {
$blocks = module_invoke($block->module, "block");
- $theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"]);
+ $theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"], $region);
}
break;
}
}
-function theme_moderation_results($theme, $node) {
+function theme_moderation_results($theme, $node, $region) {
foreach (explode(",", $node->users) as $vote) {
if ($vote) {
$data = explode("=", $vote);
@@ -94,7 +94,7 @@ function theme_moderation_results($theme, $node) {
}
}
- $theme->box(t("Moderation results"), ($output ? $output : t("This node has not been moderated yet.")));
+ $theme->box(t("Moderation results"), ($output ? $output : t("This node has not been moderated yet.")), $region);
}
?>
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 "</TABLE>";
} // 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("<table border=\"0\"
} // close stripbreaks function
- function box($subject, $content) {
+ function box($subject, $content, $region = "main") {
print "<script language=\"JavaScript\"><!--\nb(\"". $this->stripbreaks(addslashes($subject)) ."\",\"". $this->stripbreaks(addslashes($content)) ."\"); // -->\n</script>\n";
} // close box function
@@ -139,7 +139,7 @@ function c(subject,mod,author,date,body) {document.writeln("<table border=\"0\"
</td>
<td valign="top">
<?php
- theme_account($this);
+ theme_account("all", $this);
theme_blocks("all", $this);
?>
</td>
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 "<br />\n\n";
}
- function box($subject, $content) {
+ function box($subject, $content, $region = "main") {
print "\n<!-- box: \"$subject\" -->\n";
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\">\n";
print " <tr>\n";
@@ -135,7 +135,7 @@
</td>
<td valign="top" width="200">
<?php
- theme_account($this);
+ theme_account("all", $this);
theme_blocks("all", $this);
?>
</tr>
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 @@
?></TD></TR></TABLE><BR><?php
}
- function box($subject, $content) {
+ function box($subject, $content, $region = "main") {
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
@@ -188,7 +188,7 @@
</TD>
<TD VALIGN="top" WIDTH="20%">
<?php
- theme_account($this);
+ theme_account("all", $this);
theme_blocks("all", $this);
?>
</TD>
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 @@
<?php
- theme_account($this);
+ theme_account("all", $this);
theme_blocks("all", $this);
?>
@@ -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";
}
-?>
-
+?>
<table width="90%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td class="box"><img src="themes/yaroon/images/square.gif" />&nbsp;<b><?php echo $subject; ?></b></td>