Skip to content
Snippets Groups Projects
Commit 57e5f6a4 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- fixed bug in block placement when (1) using a theme with 2 side bars
  and (2) being logged out.
  (reported by Jeroen)
- themed "Editor's note" in theme marvin.
  (reported by Jeroen)
parent 3207add7
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -79,7 +79,7 @@ function theme_blocks($region, $theme) {
break;
case "/index.php":
if ($user->id) $result = db_query("SELECT * FROM blocks b LEFT JOIN layout l ON b.name = l.block WHERE (b.status = 2 OR (b.status AND l.user = '$user->id'))". (($region == "left" || $region == "right") ? ($region == "left" ? " AND b.region = 0" : " AND b.region = 1") : "") ." ORDER BY weight");
else $result = db_query("SELECT * FROM blocks WHERE status = 2 ORDER BY weight");
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_execute($block->module, "block");
$theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"]);
......
......@@ -129,7 +129,7 @@ function abstract($story) {
<TD>
<?PHP
if ($story->updates)
echo "<P><FONT COLOR=\"$this->hlc2\">Editor's note:</FONT>". check_output($story->updates, 1) ."</P>";
if ($story->abstract)
......@@ -224,7 +224,7 @@ function article($story, $reply) {
if ($story->updates)
echo "<P>check_output($story->abstract, 1)</P><P><FONT COLOR=\"$this->hlc2\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$story->editor\">$story->editor</A>:</FONT>$story->updates</P>";
else
else
echo check_output($story->abstract, 1);
if ($story->article)
echo "<P>". check_output($story->article, 1) ."</P>";
......@@ -272,7 +272,7 @@ function comment($comment, $link = "", $thread = "") {
echo " <TR>";
echo " <TD>";
echo " <TABLE BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"0\"WIDTH=\"100%\">";
// Subject:
echo " <TR>";
echo " <TD ALIGN=\"right\" WIDTH=\"5%\">";
......@@ -280,13 +280,13 @@ function comment($comment, $link = "", $thread = "") {
echo " <B>". check_output($subject) ."</B>";
echo " </FONT>";
echo " </TD>";
// Moderation:
echo " <TD BGCOLOR=\"#6C6C6C\" BACKGROUND=\"themes/jeroen/images/menutitle.gif\" ALIGN=\"right\"ROWSPAN=\"2\" VALIGN=\"middle\" WIDTH=\"15%\">";
echo comment_moderation($comment);
echo " </TD>";
echo " </TR>";
// Author:
echo " <TR>";
echo " <TD ALIGN=\"right\"><FONT COLOR=\"#FEFEFE\">Author:</FONT></TD><TD><B>" .format_username($comment->userid) . "</B> ";
......@@ -299,14 +299,14 @@ function comment($comment, $link = "", $thread = "") {
echo " <FONT COLOR=\"#FEFEFE\">on ". format_date($comment->timestamp) ."</FONT>";
echo " </TD>";
echo " </TR>";
echo " </TABLE>";
echo " </TD>";
echo " </TR>";
// Print body of comment:
if ($comment) echo " <TR><TD BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/jeroen/images/sketch.gif\">" . check_output($comment->comment, 1) ."</TD></TR>";
// Print thread (if any):
if ($thread) echo " <TR><TD BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/jeroen/images/sketch.gif\">$thread</TD></TR>";
......@@ -320,7 +320,7 @@ function comment($comment, $link = "", $thread = "") {
echo " </TR>";
echo " </TABLE>";
echo " <BR>";
} // close comment function
function box($subject, $content, $options = "") {
......
......@@ -63,7 +63,7 @@ function abstract($story) {
print " <TR>\n";
print " <TD COLSPAN=\"2\">\n";
if ($story->abstract) print " <P>". check_output($story->abstract, 1) ."</P>\n";
if ($story->updates) print " <P><FONT COLOR=\"$this->bgcolor2\">Editor's note:</FONT> ". check_output($story->updates, 1) ."</P>\n";
if ($story->updates) print " <P><FONT COLOR=\"$this->bgcolor2\">". t("Editor's note") .":</FONT> ". check_output($story->updates, 1) ."</P>\n";
print " </TD>\n";
print " </TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
......@@ -77,16 +77,12 @@ function article($story, $reply = "") {
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">\n";
print " <TR><TD COLSPAN=\"2\"><IMG SRC=\"themes/marvin/images/drop.gif\" ALT=\"\"> &nbsp; <B>". check_output($story->subject) ."</B></TD></TR>\n";
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
print " <TR>\n";
print " <TD>\n";
print " <FONT COLOR=\"#7C7C7C\"><SMALL>". strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"index.php?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL>\n";
print " </TD>\n";
print " </TR>\n";
print " <TR><TD><FONT COLOR=\"#7C7C7C\"><SMALL>". strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"index.php?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL></TD></TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
print " <TR>\n";
print " <TD COLSPAN=\"2\">\n";
if ($story->abstract) print " <P>". check_output($story->abstract, 1) ."</P>\n";
if ($story->updates) print " <P><FONT COLOR=\"$this->bgcolor2\">Editor's note:</FONT>". check_output($story->updates, 1) ."</P>\n";
if ($story->updates) print " <P><FONT COLOR=\"$this->bgcolor2\">". t("Editor's note") .":</FONT>". check_output($story->updates, 1) ."</P>\n";
if ($story->article) print " <P>". check_output($story->article, 1) ."</P>\n";
print " </TD>\n";
print " </TR>\n";
......@@ -105,7 +101,7 @@ function controls() {
print "</TABLE>";
}
function comment($comment, $link = "", $thread = "") {
function comment($comment, $link = "") {
print "<A NAME=\"$comment->cid\">\n";
// Create comment header:
......@@ -145,9 +141,6 @@ function comment($comment, $link = "", $thread = "") {
// Print body of comment:
if ($comment->comment) print " <TR><TD BGCOLOR=\"#FFFFFF\">". check_output($comment->comment, 1) ."</TD></TR>\n";
// Print thread (if any):
if ($thread) print " <TR><TD BGCOLOR=\"$this->bgcolor1\">$thread</TD></TR>\n";
// Print bottom link(s):
print " <TR><TD ALIGN=\"right\" BGCOLOR=\"$this->bgcolor1\">[ $link ]</TD></TR>\n";
print " </TABLE>\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment