diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-03-24 17:50:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-03-24 17:50:08 +0000 |
commit | a45fc1a20e1e9b8bf64c286db7a672d3954e88d9 (patch) | |
tree | 620f3318bdd4c9bb09b24c74f8e450a2e90c4be8 | |
parent | 8b6e78075c9baf831bd49d8dc0b461401c5174d8 (diff) | |
download | brdo-a45fc1a20e1e9b8bf64c286db7a672d3954e88d9.tar.gz brdo-a45fc1a20e1e9b8bf64c286db7a672d3954e88d9.tar.bz2 |
- themes now get there header/footer links through theme_link();
- tidied up example.theme
-rw-r--r-- | includes/theme.inc | 10 | ||||
-rw-r--r-- | themes/example/example.theme | 102 | ||||
-rw-r--r-- | themes/goofy/goofy.theme | 2 | ||||
-rw-r--r-- | themes/jeroen/jeroen.theme | 6 | ||||
-rw-r--r-- | themes/marvin/marvin.theme | 4 | ||||
-rw-r--r-- | themes/unconed/unconed.theme | 4 |
6 files changed, 58 insertions, 70 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index cc9909468..f7fe640dc 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -12,6 +12,16 @@ function theme_init() { return new Theme(); } +function theme_link($separator = " | ") { + $links = array("<A HREF=\"index.php\">". t("home") ."</A>", + "<A HREF=\"search.php\">". t("search") ."</A>", + "<A HREF=\"submit.php\">". t("submit") ."</A>", + "<A HREF=\"module.php?mod=diary\">". t("diary") ."</A>", + "<A HREF=\"account.php\">". t("account") ."</A>", + "<A HREF=\"module.php?mod=book\">". t("help") ."</A>"); + return implode($separator, $links); +} + function theme_menu($name, $module) { global $menu; if ($module["menu"]) $menu = ($menu) ? array_merge($menu, $module["menu"]()) : $module["menu"](); diff --git a/themes/example/example.theme b/themes/example/example.theme index 73037482e..15787c598 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -17,9 +17,14 @@ <TABLE BORDER="1"> <TR> <TD> - </TD> Logo? <!-- I left a TD to add a logo of some kind --> - <TD> + </TD> + <TD ALIGN="right" COLSPAN="2"> + +<?php + print theme_link(" | "); +?> + </TD> </TR> <TR> @@ -40,7 +45,7 @@ function story($story, $reply = 0) { ?> - <TABLE BORDER="1"> + <TABLE BORDER="1" WIDTH="100%"> <TR> <TD COLSPAN="2"> <?php echo check_output($story->title); ?> @@ -106,59 +111,41 @@ echo "<A NAME=\"$comment->cid\"></A>\n"; // Create comment header: - echo " <TABLE>"; + echo " <TABLE BORDER=\"1\" WIDTH=\"100%\">"; echo " <TR>"; echo " <TD>"; - echo " <TABLE BORDER=\"1\">"; - echo " <TR>"; - echo " <TD>"; - echo " <TABLE>"; - echo " <TR>"; - echo " <TD>"; - echo " <TABLE BORDER=\"1\">"; - - // Subject: - echo " <TR>"; - echo " <TD>"; - echo " ". t("Subject") .":"; - echo " </TD>"; - echo " <TD >"; - echo " ". check_output($comment->subject); - echo " </TD>"; + echo t("Subject") .":"; + echo " </TD>"; + echo " <TD>"; + echo " ". check_output($comment->subject); + echo " </TD>"; // Moderation: - echo " <TD>"; - echo comment_moderation($comment); - echo " </TD>"; - echo " </TR>"; - - // Author: - echo " <TR>"; - echo " <TD>". t("Author") .":</FONT></TD><TD>". format_username($comment->userid); - - // Date: - echo " on ". format_date($comment->timestamp); - echo " </TD>"; - echo " </TR>"; - - echo " </TABLE>"; - echo " </TD>"; - echo " </TR>"; - - // Print body of comment: - if ($comment) echo " <TR><TD>" . check_output($comment->comment, 1) ."</TD></TR>"; - - // Print bottom link(s): - echo " <TR><TD>$link</TD></TR>"; - echo " </TABLE>"; - echo " </TD>"; - echo " </TR>"; - echo " </TABLE>"; + echo " <TD>"; + echo comment_moderation($comment); echo " </TD>"; echo " </TR>"; - echo " </TABLE>"; - echo " <BR>"; + // Author and date: + echo " <TR>"; + echo " <TD>"; + echo t("Author") .":"; + echo " </TD>"; + echo " <TD COLSPAN=\"2\">"; + echo format_username($comment->userid) ." on ". format_date($comment->timestamp); + echo " </TD>"; + echo " </TR>"; + + // Body of comment: + echo " <TR>"; + echo " <TD COLSPAN=\"3\">"; + echo check_output($comment->comment, 1); + + // Print navigation / control links: + echo " <P>$link</P>"; + echo " </TD>"; + echo " </TR>"; + echo " </TABLE>"; } // close comment function function box($subject, $content, $options = "") { @@ -224,20 +211,11 @@ </TD> </TR> <TR> - <TD></TD> - <TD> - <TABLE BORDER="1"> - <TR> - <TD></TD> - <TD> - <!-- These are just some links from my theme as an example. --> - <A HREF="index.php">Home</A> <A HREF="module.php?mod=faq">Faq</A> <A HREF="search.php">Search</A> <A HREF="module.php?mod=diary">Diary</A> <A HREF="submit.php">Submit news</A> <A HREF="account.php">Account</A> - </TD> - <TD></TD> - </TR> - </TABLE> + <TD ALIGN="center" COLSPAN="3"> +<?php + print theme_link(" | "); +?> </TD> - <TD></TD> </TR> </TABLE> </BODY> diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme index 6d30feefd..96dc3ce58 100644 --- a/themes/goofy/goofy.theme +++ b/themes/goofy/goofy.theme @@ -77,7 +77,7 @@ </tr> <tr> <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td> - <td class="lgcnt" width="100%" valign="top"><div align="center"><big><a href="index.php">home</a> | <a href="module.php?mod=faq">faq</a> | <a href="module.php?mod=diary">diary</a> | <a href="search.php">search</a> | <a href="submit.php">submit news</a> | <a href="account.php">user account</a></big></div></td> + <td class="lgcnt" width="100%" valign="top"><div align="center"><big><?php print theme_link(" | "); ?></big></div></td> <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td> </tr> <tr> diff --git a/themes/jeroen/jeroen.theme b/themes/jeroen/jeroen.theme index db665f810..31e868db3 100644 --- a/themes/jeroen/jeroen.theme +++ b/themes/jeroen/jeroen.theme @@ -46,12 +46,12 @@ <tr> <td align=\"left\" valign=\"top\"> <a href=\"index.php\">home</A><br /> - <a href=\"module.php?mod=faq\">faq</A><br /> + <a href=\"module.php?mod=book\">help</A><br /> <a href=\"search.php\">search</A> </td> <td align=\"right\" valign=\"top\"> <a href=\"module.php?mod=diary\">diary</A><br /> - <a href=\"submit.php\">submit news</A><br /> + <a href=\"submit.php\">submit</A><br /> <a href=\"account.php\">account</A> </td> </tr> @@ -307,7 +307,7 @@ <tr> <td align="left" width="20" height="20" background="themes/jeroen/images/footerleft.gif" nowrap> </td> <td width="100%" background="themes/jeroen/images/footer.gif" align="center" valign="middle"> - <FONT COLOR="#E09226" SIZE="2">[ <a href="index.php">Home</A> | <a href="module.php?mod=faq">Faq</A> | <a href="search.php">Search</A> | <a href="module.php?mod=diary">Diary</A>| <a href="submit.php">Submit news</A> | <a href="account.php">Account</A> ] </FONT> + <FONT COLOR="#E09226" SIZE="2">[ <?php print theme_link(" | "); ?> ] </FONT> </td> <td align="right" width="20" background="themes/jeroen/images/footerright.gif" nowrap> </td> </tr> diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index a4614a090..ed99333c5 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -26,7 +26,7 @@ <TR> <TD ALIGN="right" COLSPAN="2"> <?php - print "<SMALL><A HREF=\"index.php\">". t("home") ."</A> | <A HREF=\"module.php?mod=faq\">". t("faq") ."</A> | <A HREF=\"module.php?mod=diary\">". t("diary") ."</A> | <A HREF=\"search.php\">". t("search") ."</A> | <A HREF=\"submit.php\">". t("submit") ."</A> | <A HREF=\"module.php?mod=wiki\">". t("wiki") ."</A> | <A HREF=\"account.php\">". t("user account") ."</A></SMALL>\n"; + print "<SMALL>". theme_link(" | ") ."</SMALL>\n"; ?> </TD> </TR> @@ -145,7 +145,7 @@ <TR> <TD ALIGN="center" COLSPAN="3"> <?php - print "<SMALL>[ <A HREF=\"index.php\">". t("home") ."</A> | <A HREF=\"module.php?mod=faq\">". t("faq") ."</A> | <A HREF=\"module.php?mod=diary\">". t("diary") ."</A> | <A HREF=\"search.php\">". t("search") ."</A> | <A HREF=\"submit.php\">". t("submit news") ."</A> | <A HREF=\"account.php\">". t("user account") ."</A> ]</SMALL><P>\n"; + print "<SMALL>[ ". theme_link(" | ") ." ]</SMALL><P>\n"; ?> </TD> </TR> diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme index 3b3f61a79..4af49aec7 100644 --- a/themes/unconed/unconed.theme +++ b/themes/unconed/unconed.theme @@ -62,7 +62,7 @@ </TR> <TR> <TD COLSPAN="2" ALIGN="CENTER"> - <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><BIG><A HREF="index.php">home</A> | <A HREF="module.php?mod=faq">faq</A> | <A HREF="module.php?mod=diary">diary</A> | <A HREF="search.php">search</A> | <A HREF="submit.php">submit news</A> | <A HREF="account.php">user account</A></BIG></TD></TR></TABLE></TD></TR></TABLE> + <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><BIG><?php print theme_link(" | "); ?></BIG></TD></TR></TABLE></TD></TR></TABLE> </TD> </TR> <TR><TD COLSPAN="2"><?php @@ -215,7 +215,7 @@ ?></TD></TR> <TR> <TD COLSPAN="2"> - <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><BIG><A HREF="index.php">home</A> | <A HREF="module.php?mod=faq">faq</A> | <A HREF="module.php?mod=diary">diary</A> | <A HREF="search.php">search</A> | <A HREF="submit.php">submit news</A> | <A HREF="account.php">user account</A></BIG></TD></TR></TABLE></TD></TR></TABLE> + <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><BIG><?php print theme_link(" | "); ?></BIG></TD></TR></TABLE></TD></TR></TABLE> </TD> </TR> </TABLE> |