diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-05-24 10:05:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-05-24 10:05:18 +0000 |
commit | 540fdfc0c62f772c26a847177a83b08c5a5c0840 (patch) | |
tree | 228cd5c3c0b05582288fefd87a8bc862c2672027 | |
parent | b0288a46d8f24b0320da588fd4142060ac75d4fe (diff) | |
download | brdo-540fdfc0c62f772c26a847177a83b08c5a5c0840.tar.gz brdo-540fdfc0c62f772c26a847177a83b08c5a5c0840.tar.bz2 |
- Replaced $theme->story() by a more generic $theme->node(). All themes
required an update (and so will your custom themes).
-rw-r--r-- | modules/book.module | 55 | ||||
-rw-r--r-- | modules/book/book.module | 55 | ||||
-rw-r--r-- | modules/poll.module | 8 | ||||
-rw-r--r-- | modules/poll/poll.module | 8 | ||||
-rw-r--r-- | modules/story.module | 3 | ||||
-rw-r--r-- | modules/story/story.module | 3 | ||||
-rw-r--r-- | themes/example/example.theme | 16 | ||||
-rw-r--r-- | themes/goofy/goofy.theme | 14 | ||||
-rw-r--r-- | themes/jeroen/jeroen.theme | 18 | ||||
-rw-r--r-- | themes/marvin/marvin.theme | 20 | ||||
-rw-r--r-- | themes/unconed/unconed.theme | 13 | ||||
-rw-r--r-- | themes/yaroon/yaroon.theme | 17 |
12 files changed, 128 insertions, 102 deletions
diff --git a/modules/book.module b/modules/book.module index 757b63a03..1c877b685 100644 --- a/modules/book.module +++ b/modules/book.module @@ -25,39 +25,44 @@ function book_location($node, $nodes = array()) { function book_view($node, $main = 0) { global $status, $theme; - if ($node->nid && $node->parent) { - $list = book_parent_query($node->parent); - $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight > '$node->weight' ORDER BY b.weight ASC")); - $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight < '$node->weight' ORDER BY b.weight DESC")); + if ($main) { + $theme->node($node, $main); } + else { + if ($node->nid && $node->parent) { + $list = book_parent_query($node->parent); + $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight > '$node->weight' ORDER BY b.weight ASC")); + $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight < '$node->weight' ORDER BY b.weight DESC")); + } - $output .= "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\">\n"; + $output .= "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\">\n"; - if ($node->title) { - foreach (book_location($node) as $level) { - $location .= "$indent <A HREF=\"node.php?id=$level->nid\">$level->title</A><BR>"; - $indent .= "-"; - } + if ($node->title) { + foreach (book_location($node) as $level) { + $location .= "$indent <A HREF=\"node.php?id=$level->nid\">$level->title</A><BR>"; + $indent .= "-"; + } - $output .= " <TR><TD COLSPAN=\"2\">$location</TD><TD ALIGN=\"right\">". node_control($node) ."</TD></TR>\n"; - $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; - $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; - } + $output .= " <TR><TD COLSPAN=\"2\">$location</TD><TD ALIGN=\"right\">". node_control($node) ."</TD></TR>\n"; + $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; + $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; + } - if ($node->body) { - $output .= " <TR><TD COLSPAN=\"3\"><BR>". check_output($node->body, 1) ."</TD></TR>"; - } + if ($node->body) { + $output .= " <TR><TD COLSPAN=\"3\"><BR>". check_output($node->body, 1) ."</TD></TR>"; + } - if ($node->nid) { - $output .= " <TR><TD COLSPAN=\"3\"><BR>". book_tree($node->nid) ."</TD></TR>"; - } + if ($node->nid) { + $output .= " <TR><TD COLSPAN=\"3\"><BR>". book_tree($node->nid) ."</TD></TR>"; + } - $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; - $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<A HREF=\"node.php?id=$prev->nid\">". t("previous") ."</A>" : t("previous")) ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\"><A HREF=\"module.php?mod=book\">index</A></TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<A HREF=\"node.php?id=$next->nid\">". t("next") ."</A>" : t("next")) ."</TD></TR>\n"; - $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<SMALL>". check_output($prev->title) ."</SMALL>" : " ") ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\">". ($node->parent ? "<A HREF=\"node.php?id=$node->parent\">". t("up") ."</A>" : t("up")) ."</TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<SMALL>". check_output($next->title) ."</SMALL>" : " ") ."</TD></TR>\n"; - $output .= "</TABLE>\n"; + $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; + $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<A HREF=\"node.php?id=$prev->nid\">". t("previous") ."</A>" : t("previous")) ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\"><A HREF=\"module.php?mod=book\">index</A></TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<A HREF=\"node.php?id=$next->nid\">". t("next") ."</A>" : t("next")) ."</TD></TR>\n"; + $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<SMALL>". check_output($prev->title) ."</SMALL>" : " ") ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\">". ($node->parent ? "<A HREF=\"node.php?id=$node->parent\">". t("up") ."</A>" : t("up")) ."</TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<SMALL>". check_output($next->title) ."</SMALL>" : " ") ."</TD></TR>\n"; + $output .= "</TABLE>\n"; - $theme->box(t("Handbook"), $output); + $theme->box(t("Handbook"), $output); + } } function book_search($keys) { diff --git a/modules/book/book.module b/modules/book/book.module index 757b63a03..1c877b685 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -25,39 +25,44 @@ function book_location($node, $nodes = array()) { function book_view($node, $main = 0) { global $status, $theme; - if ($node->nid && $node->parent) { - $list = book_parent_query($node->parent); - $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight > '$node->weight' ORDER BY b.weight ASC")); - $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight < '$node->weight' ORDER BY b.weight DESC")); + if ($main) { + $theme->node($node, $main); } + else { + if ($node->nid && $node->parent) { + $list = book_parent_query($node->parent); + $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight > '$node->weight' ORDER BY b.weight ASC")); + $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND b.weight < '$node->weight' ORDER BY b.weight DESC")); + } - $output .= "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\">\n"; + $output .= "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\">\n"; - if ($node->title) { - foreach (book_location($node) as $level) { - $location .= "$indent <A HREF=\"node.php?id=$level->nid\">$level->title</A><BR>"; - $indent .= "-"; - } + if ($node->title) { + foreach (book_location($node) as $level) { + $location .= "$indent <A HREF=\"node.php?id=$level->nid\">$level->title</A><BR>"; + $indent .= "-"; + } - $output .= " <TR><TD COLSPAN=\"2\">$location</TD><TD ALIGN=\"right\">". node_control($node) ."</TD></TR>\n"; - $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; - $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; - } + $output .= " <TR><TD COLSPAN=\"2\">$location</TD><TD ALIGN=\"right\">". node_control($node) ."</TD></TR>\n"; + $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; + $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; + } - if ($node->body) { - $output .= " <TR><TD COLSPAN=\"3\"><BR>". check_output($node->body, 1) ."</TD></TR>"; - } + if ($node->body) { + $output .= " <TR><TD COLSPAN=\"3\"><BR>". check_output($node->body, 1) ."</TD></TR>"; + } - if ($node->nid) { - $output .= " <TR><TD COLSPAN=\"3\"><BR>". book_tree($node->nid) ."</TD></TR>"; - } + if ($node->nid) { + $output .= " <TR><TD COLSPAN=\"3\"><BR>". book_tree($node->nid) ."</TD></TR>"; + } - $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; - $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<A HREF=\"node.php?id=$prev->nid\">". t("previous") ."</A>" : t("previous")) ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\"><A HREF=\"module.php?mod=book\">index</A></TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<A HREF=\"node.php?id=$next->nid\">". t("next") ."</A>" : t("next")) ."</TD></TR>\n"; - $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<SMALL>". check_output($prev->title) ."</SMALL>" : " ") ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\">". ($node->parent ? "<A HREF=\"node.php?id=$node->parent\">". t("up") ."</A>" : t("up")) ."</TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<SMALL>". check_output($next->title) ."</SMALL>" : " ") ."</TD></TR>\n"; - $output .= "</TABLE>\n"; + $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; + $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<A HREF=\"node.php?id=$prev->nid\">". t("previous") ."</A>" : t("previous")) ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\"><A HREF=\"module.php?mod=book\">index</A></TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<A HREF=\"node.php?id=$next->nid\">". t("next") ."</A>" : t("next")) ."</TD></TR>\n"; + $output .= " <TR><TD ALIGN=\"left\" WIDTH=\"33%\">". ($prev ? "<SMALL>". check_output($prev->title) ."</SMALL>" : " ") ."</TD><TD ALIGN=\"center\" WIDTH=\"34%\">". ($node->parent ? "<A HREF=\"node.php?id=$node->parent\">". t("up") ."</A>" : t("up")) ."</TD><TD ALIGN=\"right\" WIDTH=\"33%\">". ($next ? "<SMALL>". check_output($next->title) ."</SMALL>" : " ") ."</TD></TR>\n"; + $output .= "</TABLE>\n"; - $theme->box(t("Handbook"), $output); + $theme->box(t("Handbook"), $output); + } } function book_search($keys) { diff --git a/modules/poll.module b/modules/poll.module index 533a9b5e7..dfe37ba4b 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -113,7 +113,6 @@ function poll_view($node, $main = 0, $block = 0) { $node->totalvotes = max(1, $node->totalvotes); - if (!$block) $output .= "<small>Posted by " . format_username($node->userid) . " on " . format_date($node->timestamp, "large") . "</small><br>\r\n"; foreach ($node->choice as $key => $value) { if ($value) { if ($main) { @@ -135,7 +134,6 @@ function poll_view($node, $main = 0, $block = 0) { $node->totalvotes = max(1, $node->totalvotes); - if (!$block) $output .= "<small>Posted by " . format_username($node->userid) . " on " . format_date($node->timestamp, "large") . "</small><br><br>\r\n"; $output .= "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"left\">"; foreach ($node->choice as $key => $value) { if ($value) { @@ -147,7 +145,11 @@ function poll_view($node, $main = 0, $block = 0) { $output = form($REQUEST_URI, $output); } - if (!$block) $theme->box($title, $output); + + if (!$block) { + $node->body = $output; + $theme->node($node, 1); + } return array("title" => $title, "content" => $output); } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 533a9b5e7..dfe37ba4b 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -113,7 +113,6 @@ function poll_view($node, $main = 0, $block = 0) { $node->totalvotes = max(1, $node->totalvotes); - if (!$block) $output .= "<small>Posted by " . format_username($node->userid) . " on " . format_date($node->timestamp, "large") . "</small><br>\r\n"; foreach ($node->choice as $key => $value) { if ($value) { if ($main) { @@ -135,7 +134,6 @@ function poll_view($node, $main = 0, $block = 0) { $node->totalvotes = max(1, $node->totalvotes); - if (!$block) $output .= "<small>Posted by " . format_username($node->userid) . " on " . format_date($node->timestamp, "large") . "</small><br><br>\r\n"; $output .= "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"left\">"; foreach ($node->choice as $key => $value) { if ($value) { @@ -147,7 +145,11 @@ function poll_view($node, $main = 0, $block = 0) { $output = form($REQUEST_URI, $output); } - if (!$block) $theme->box($title, $output); + + if (!$block) { + $node->body = $output; + $theme->node($node, 1); + } return array("title" => $title, "content" => $output); } diff --git a/modules/story.module b/modules/story.module index 637a4613a..d4faf74d9 100644 --- a/modules/story.module +++ b/modules/story.module @@ -31,7 +31,8 @@ function story_help() { function story_view($node, $main = 0) { global $theme; - $theme->story($node, $main); + $node->body = ($main ? $node->abstract : "$node->abstract<HR>$node->body"); + $theme->node($node, $main); } function story_form($edit = array()) { diff --git a/modules/story/story.module b/modules/story/story.module index 637a4613a..d4faf74d9 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -31,7 +31,8 @@ function story_help() { function story_view($node, $main = 0) { global $theme; - $theme->story($node, $main); + $node->body = ($main ? $node->abstract : "$node->abstract<HR>$node->body"); + $theme->node($node, $main); } function story_form($edit = array()) { diff --git a/themes/example/example.theme b/themes/example/example.theme index 32b7376de..b09563474 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -47,35 +47,33 @@ } // close header function - function story($story, $main = 0) { + function node($node, $main = 0) { ?> <TABLE BORDER="1" CELLSPACING="0" CELLPADDING="3" WIDTH="100%"> <TR> <TD COLSPAN="2"> - <BIG><?php echo check_output($story->title); ?></BIG> + <BIG><?php echo check_output($node->title); ?></BIG> </TD> </TR> <TR> <TD> <?php - echo strtr(t("by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "small"))); + echo strtr(t("by %a on %b"), array("%a" => format_username($node->userid), "%b" => format_date($node->timestamp, "small"))); ?> </TD> <TD ALIGN="right"> <?php - echo category_name($story->cid) ." / ". topic_name($story->tid); + echo category_name($node->cid) ." / ". topic_name($node->tid); ?> </TD> </TR> <TR> <TD COLSPAN="2"> <?php - echo "<P>". check_output($story->abstract, 1) ."</P>"; - if (!$main && $story->body) - echo "<P>". check_output($story->body, 1) ."</P>"; + echo "<P>". check_output($node->body, 1) ."</P>"; ?> </TD> </TR> @@ -83,7 +81,7 @@ <TD COLSPAN="2"> <?php if ($main) - echo theme_morelink($this, $story); + echo theme_morelink($this, $node); ?> </TD> @@ -93,7 +91,7 @@ <?php - } // close story function + } // close node function function comment($comment, $link = "") { echo "<A NAME=\"$comment->cid\"></A>\n"; diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme index bc6711591..cb11832d7 100644 --- a/themes/goofy/goofy.theme +++ b/themes/goofy/goofy.theme @@ -95,14 +95,14 @@ function c(subject,mod,author,date,body) {document.writeln("<table border=\"0\" } // close linksbar function - function story($story, $main = 0) { - echo "\n<!-- story: \"$story->title\" -->\n"; - $title = check_output($story->title); - $subleft = strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); - $subright = category_name($story->cid) ." / ". topic_name($story->tid); - $body = check_output($story->abstract, 1) . "<br>" . ((!$main && $story->body)?"<br>" . check_output($story->body, 1):"") . "<hr color=\"#404040\" size=\"1\"><div align=\"right\">" . ($main?theme_morelink($this, $story):""); + function node($node, $main = 0) { + echo "\n<!-- node: \"$node->title\" -->\n"; + $title = check_output($node->title); + $subleft = strtr(t("Submitted by %a on %b"), array("%a" => format_username($node->userid), "%b" => format_date($node->timestamp, "large"))); + $subright = category_name($node->cid) ." / ". topic_name($node->tid); + $body = check_output($node->body, 1) . "<hr color=\"#404040\" size=\"1\"><div align=\"right\">" . ($main?theme_morelink($this, $node):""); print "<script language=\"JavaScript\"><!--\ns(\"". $this->stripbreaks(addslashes($title)) ."\",\"". $this->stripbreaks(addslashes($subleft)) ."\",\"". $this->stripbreaks(addslashes($subright)) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n"; - } // close story function + } // close node function diff --git a/themes/jeroen/jeroen.theme b/themes/jeroen/jeroen.theme index c93b8f4bc..f9b8a8c0d 100644 --- a/themes/jeroen/jeroen.theme +++ b/themes/jeroen/jeroen.theme @@ -81,7 +81,7 @@ } // close header function - function story($story, $main = 0) { + function node($node, $main = 0) { ?> @@ -89,7 +89,7 @@ <tr> <td align="left" valign="bottom" width="20" height="20" background="themes/jeroen/images/<?php echo (rand(0, 1) ? "news1.gif" : "news3.gif"); ?>" nowrap> </td> <td align="center" valign="top" width="100%" background="themes/jeroen/images/newsmiddle.gif" nowrap> - <B><?php echo "". check_output($story->title) .""; ?></B> + <B><?php echo "". check_output($node->title) .""; ?></B> </td> <td align="right" valign="bottom" width="20" background="themes/jeroen/images/<?php echo (rand(0, 1) == 0) ? "news2.gif" : "news4.gif"; if (rand(0,100) == 50) "news5.gif"; ?>" nowrap> </td> </tr> @@ -114,12 +114,12 @@ case 12: $how = "Forged"; break; default: $how = "Sneaked through"; } - echo "<FONT SIZE=\"-1\">". strtr(t("$how by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp), "large")) ."</FONT>"; + echo "<FONT SIZE=\"-1\">". strtr(t("$how by %a on %b"), array("%a" => format_username($node->userid), "%b" => format_date($node->timestamp), "large")) ."</FONT>"; ?> </FONT> </td> <?php - echo "<td align=\"right\" background=\"themes/jeroen/images/menutitle.gif\" nowrap><b>". category_name($story->cid) ." / ". topic_name($story->tid) ."</b>"; + echo "<td align=\"right\" background=\"themes/jeroen/images/menutitle.gif\" nowrap><b>". category_name($node->cid) ." / ". topic_name($node->tid) ."</b>"; ?> </td> </tr> @@ -127,11 +127,7 @@ <td colspan="2" valign="top" width="100%"> <?php - - echo "<br />". check_output($story->abstract, 1) ."<br />"; - if (!$main && $story->body) - echo "<br />". check_output($story->body, 1) ."<br />"; - + echo "<br />". check_output($node->body, 1) ."<br />"; ?> </td> @@ -140,7 +136,7 @@ <td colspan="2" align="right"> <?php if ($main) - echo "<FONT COLOR=\"#E09226\">". theme_morelink($this, $story) ."</FONT>"; + echo "<FONT COLOR=\"#E09226\">". theme_morelink($this, $node) ."</FONT>"; ?> @@ -157,7 +153,7 @@ <?php - } // close story function + } // close node function function comment($comment, $link = "") { echo "<A NAME=\"$comment->cid\"></a>\n"; diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index 5a7e33545..dbc438d65 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -67,6 +67,26 @@ print "<BR><BR>\n\n"; } + function node($node, $main = 0) { + print "\n<!-- node: \"$node->title\" -->\n"; + print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">\n"; + print " <TR><TD COLSPAN=\"2\"><IMG SRC=\"themes/marvin/images/drop.gif\" ALT=\"\"> <B>". check_output($node->title) ."</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($node->userid), "%b" => format_date($node->timestamp, "large"))); ?><?php print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL>". category_name($node->cid) ." / ". topic_name($node->tid) ."</SMALL>\n"; + print " </TD>\n"; + print " </TR>\n"; + print " <TR><TD COLSPAN=\"2\"> </TD></TR>\n"; + print " <TR>\n"; + print " <TD COLSPAN=\"2\"><P>". check_output($node->body, 1) ."</P></TD>\n"; + print " </TR>\n"; + print " <TR><TD COLSPAN=\"2\"> </TD></TR>\n"; + if ($main) print " <TR><TD COLSPAN=\"2\">". theme_morelink($this, $node) ."</TD></TR>\n"; + print "</TABLE>\n"; + print "<BR><BR>\n\n"; + } + function comment($comment, $link = "") { print "<A NAME=\"$comment->cid\">\n"; diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme index 0282eeb90..137c05a36 100644 --- a/themes/unconed/unconed.theme +++ b/themes/unconed/unconed.theme @@ -78,31 +78,30 @@ <?php } - function story($story, $main = 0) { + function node($node, $main = 0) { - print "\n<!-- story: \"$story->title\" -->\n"; + print "\n<!-- node: \"$node->title\" -->\n"; ?> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%"> <TR><TD> <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%"> - <TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "". check_output($story->title) .""; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="themes/<?php print $this->themename; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR> + <TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "". check_output($node->title) .""; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="themes/<?php print $this->themename; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR> <TR BGCOLOR="<?php echo $this->bgcolor2; ?>"> <?php - print "<TD WIDTH=\"70%\" BGCOLOR=\"$this->bgcolor2\"><SMALL>" . strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))) . "</TD><TD WIDTH=\"30%\" BGCOLOR=\"$this->bgcolor2\" ALIGN=\"center\" NOWRAP><B>". category_name($story->cid) ." / ". topic_name($story->tid) ."</B>"; + print "<TD WIDTH=\"70%\" BGCOLOR=\"$this->bgcolor2\"><SMALL>" . strtr(t("Submitted by %a on %b"), array("%a" => format_username($node->userid), "%b" => format_date($node->timestamp, "large"))) . "</TD><TD WIDTH=\"30%\" BGCOLOR=\"$this->bgcolor2\" ALIGN=\"center\" NOWRAP><B>". category_name($node->cid) ." / ". topic_name($node->tid) ."</B>"; ?> </TD> </TR> <TR BGCOLOR="<?php echo $this->bgcolor2; ?>"> <TD BGCOLOR="<?php echo $this->bgcolor2 ?>" COLSPAN="2"> <?php - echo "<P>". check_output($story->abstract, 1) ."</P>"; - if (!$main && $story->body) print "<P>". check_output($story->body, 1) ."</P>\n"; + echo "<P>". check_output($node->body, 1) ."</P>"; ?> </TD> </TR> <?php if ($main) - echo "<TR BGCOLOR=\"". $this->bgcolor3 ."\"><TD BGCOLOR=\"". $this->bgcolor3 ."\" ALIGN=\"right\" COLSPAN=\"2\">". theme_morelink($this, $story) ."</TD></TR>"; + echo "<TR BGCOLOR=\"". $this->bgcolor3 ."\"><TD BGCOLOR=\"". $this->bgcolor3 ."\" ALIGN=\"right\" COLSPAN=\"2\">". theme_morelink($this, $node) ."</TD></TR>"; ?> </TABLE></TD></TR></TABLE><BR> <?php diff --git a/themes/yaroon/yaroon.theme b/themes/yaroon/yaroon.theme index a6e05998d..7c3f1e05d 100644 --- a/themes/yaroon/yaroon.theme +++ b/themes/yaroon/yaroon.theme @@ -109,9 +109,9 @@ } // close header function - function story($story, $main = 0) { + function node($node, $main = 0) { - switch ($story->tid) { + switch ($node->tid) { case 0: $color = "#c4a2a2"; $img = "square2.gif"; break; case 1: $color = "#a2c4a7"; $img = "square3.gif"; break; case 2: $color = "#c2c4a2"; $img = "square4.gif"; break; @@ -127,8 +127,8 @@ <table border="0" cellpadding="0" cellspacing="1" width="100%"> <tr> <td> - <a href="index.php?topic=<?php echo $story->tid; ?>"><img src="themes/yaroon/images/<?php echo $img; ?>" border="0" /></a> <b style="font-size: 12pt"><?php echo check_output($story->title); ?></b> - <?php echo strtr(t("by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp), "small")); ?> + <a href="index.php?topic=<?php echo $node->tid; ?>"><img src="themes/yaroon/images/<?php echo $img; ?>" border="0" /></a> <b style="font-size: 12pt"><?php echo check_output($node->title); ?></b> + <?php echo strtr(t("by %a on %b"), array("%a" => format_username($node->userid), "%b" => format_date($node->timestamp), "small")); ?> </td> </tr> <tr><td bgcolor="<?php echo $color; ?>"><img src="themes/yaroon/images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr> @@ -136,17 +136,14 @@ <td> <?php - - echo "<br />". check_output($story->abstract, 1) ."<br />"; - if (!$main && $story->body) - echo "<br />". check_output($story->body, 1) ."<br />"; + echo "<br />". check_output($node->body, 1) ."<br />"; echo" </td> </tr> <tr> <td align=\"right\"> <font color=\"". $color ."\">"; if ($main) - echo "". theme_morelink($this, $story) .""; + echo "". theme_morelink($this, $node) .""; echo"</font>"; ?> @@ -157,7 +154,7 @@ </table> <?php - } // close story function + } // close node function function comment($comment, $link = "") { echo "<a name=\"$comment->cid\"></a>\n"; |