From a45fc1a20e1e9b8bf64c286db7a672d3954e88d9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 24 Mar 2001 17:50:08 +0000 Subject: - themes now get there header/footer links through theme_link(); - tidied up example.theme --- includes/theme.inc | 10 +++++ themes/example/example.theme | 102 +++++++++++++++++-------------------------- themes/goofy/goofy.theme | 2 +- themes/jeroen/jeroen.theme | 6 +-- themes/marvin/marvin.theme | 4 +- 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("". t("home") ."", + "". t("search") ."", + "". t("submit") ."", + "". t("diary") ."", + "". t("account") ."", + "". t("help") .""); + 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 @@ Logo? - + @@ -40,7 +45,7 @@ function story($story, $reply = 0) { ?> -
- + + + +
+
"; + echo " "; + echo " "; + echo " "; + + // Body of comment: + echo " "; + echo " "; + echo " "; + echo "
title); ?> @@ -106,59 +111,41 @@ echo "cid\">\n"; // Create comment header: - echo " "; + echo "
"; echo " "; echo " "; echo " "; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - - // Print body of comment: - if ($comment) echo " "; - - // Print bottom link(s): - echo " "; - echo "
"; - echo " "; - - // Subject: - echo " "; - echo " "; - echo " "; + echo t("Subject") .":"; + echo " "; + echo " "; // Moderation: - echo " "; - echo " "; - - // Author: - echo " "; - echo " "; - echo " "; - - echo "
"; - echo " ". t("Subject") .":"; - echo " "; - echo " ". check_output($comment->subject); - echo " "; + echo " ". check_output($comment->subject); + echo " "; - echo comment_moderation($comment); - echo "
". t("Author") .":". format_username($comment->userid); - - // Date: - echo " on ". format_date($comment->timestamp); - echo "
"; - echo "
" . check_output($comment->comment, 1) ."
$link
"; - echo "
"; + echo "
"; + echo comment_moderation($comment); echo "
"; - echo "
"; + // Author and date: + echo "
"; + echo t("Author") .":"; + echo " "; + echo format_username($comment->userid) ." on ". format_date($comment->timestamp); + echo "
"; + echo check_output($comment->comment, 1); + + // Print navigation / control links: + echo "

$link

"; + echo "
"; } // close comment function function box($subject, $content, $options = "") { @@ -224,20 +211,11 @@ - - - - - - - - -
- - Home Faq Search Diary Submit news Account -
+ + - 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 @@ -
home | faq | diary | search | submit news | user account
+
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 @@ home
- faq
+ help
search diary
- submit news
+ submit
account @@ -307,7 +307,7 @@   - [ Home | Faq | Search | Diary| Submit news | Account ] + [ ]   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 @@ ". t("home") ." | ". t("faq") ." | ". t("diary") ." | ". t("search") ." | ". t("submit") ." | ". t("wiki") ." | ". t("user account") ."\n"; + print "". theme_link(" | ") ."\n"; ?> @@ -145,7 +145,7 @@ [ ". t("home") ." | ". t("faq") ." | ". t("diary") ." | ". t("search") ." | ". t("submit news") ." | ". t("user account") ." ]

\n"; + print "[ ". theme_link(" | ") ." ]

\n"; ?> 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 @@ -
home | faq | diary | search | submit news | user account
+
-
home | faq | diary | search | submit news | user account
+
-- cgit v1.2.3