From ef0e2d167b114a26ebaf80f96f94e8014d80ed06 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 12 Mar 2001 16:40:33 +0000 Subject: During my nigthly session I fixed a few glitches in the example theme. Read them carefully because the other theme might need updating too (I don't think so though). I could only commit it now because I didn't had the time to write up these comments/remarks yet. So here goes: 1. the comment() function only takes 2 arguments - $thread is no longer needed and shouldn't be used in the code either. 2. I added 2 COLSPAN's to fix a problem in the story() function. 3. home is will not work properly when using drupal in a subdirectory! Simply use home instead - it does matters. ;-) 4. Removed the $timestamp = format_timestamp(...)'s and used them "directly" just like this is done for format_username and others. It's generally more consistent now. :-) --- themes/example/example.theme | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'themes/example/example.theme') diff --git a/themes/example/example.theme b/themes/example/example.theme index ffcb57b28..bea81f153 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -38,14 +38,12 @@ } // close header function function story($story, $reply = 0) { - $timestamp = format_date($story->timestamp); - ?> - @@ -53,17 +51,21 @@ format_username($story->userid), "%b" => $timestamp, "large")) ."; + echo strtr(t("$how by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); +?> + - - "; echo " "; // Moderation: @@ -135,10 +136,10 @@ // Author: echo " "; - echo " "; echo " "; @@ -149,11 +150,8 @@ // Print body of comment: if ($comment) echo " "; - // Print thread (if any): - if ($thread) echo " "; - // Print bottom link(s): - echo " "; + echo " "; echo "
- subject) .""; ?> + + subject); ?>
- section) ."\">$story->section"; + +section) ."\">$story->section"; ?>
+
+ timestamp); + function comment($comment, $link = "") { echo "cid\">\n"; // Create comment header: @@ -124,7 +125,7 @@ echo " ". t("Subject") .":"; echo " "; - echo " ". check_output($comment->subject) .""; + echo " ". check_output($comment->subject); echo "
". t("Author") .":". format_username($comment->userid) .""; + echo " ". t("Author") .":". format_username($comment->userid); // Date: - echo " on ". $timestamp .""; + echo " on ". format_date($comment->timestamp); echo "
" . check_output($comment->comment, 1) ."
$thread
$link
$link
"; echo " "; echo " "; @@ -235,7 +233,7 @@ - HomeFaqSearchDiarySubmit newsAccount + Home Faq Search Diary Submit news Account -- cgit v1.2.3