summaryrefslogtreecommitdiff
path: root/themes/example/example.theme
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-03-12 16:40:33 +0000
committerDries Buytaert <dries@buytaert.net>2001-03-12 16:40:33 +0000
commitef0e2d167b114a26ebaf80f96f94e8014d80ed06 (patch)
treef49de9f8895d0edda67b8285211b42cea41389b5 /themes/example/example.theme
parenta4b93e3cc4622a7348a951554e944a88a7c5993a (diff)
downloadbrdo-ef0e2d167b114a26ebaf80f96f94e8014d80ed06.tar.gz
brdo-ef0e2d167b114a26ebaf80f96f94e8014d80ed06.tar.bz2
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 <TD> problem in the story() function. 3. <A HREF="">home</A> is will not work properly when using drupal in a subdirectory! Simply use <A HREF="index.php">home</A> 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. :-)
Diffstat (limited to 'themes/example/example.theme')
-rw-r--r--themes/example/example.theme34
1 files changed, 16 insertions, 18 deletions
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);
-
?>
<TABLE BORDER="1">
<TR>
- <TD>
- <?php echo "". check_output($story->subject) .""; ?>
+ <TD COLSPAN="2">
+ <?php echo check_output($story->subject); ?>
</TD>
</TR>
<TR>
@@ -53,17 +51,21 @@
<?php
- echo "". strtr(t("$how by %a on %b"), array("%a" => 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")));
+?>
+
</TD>
<TD>
- <A HREF=\"search.php?category=". urlencode($story->section) ."\">$story->section</A>";
+
+<?php
+ echo "<A HREF=\"search.php?category=". urlencode($story->section) ."\">$story->section</A>";
?>
</TD>
</TR>
<TR>
- <TD>
+ <TD COLSPAN="2">
<?php
@@ -77,7 +79,7 @@
</TD>
</TR>
<TR>
- <TD>
+ <TD COLSPAN="2">
<?php
@@ -102,8 +104,7 @@
echo comment_controls();
}
- function comment($comment, $link = "", $thread = "") {
- $timestamp = format_date($comment->timestamp);
+ function comment($comment, $link = "") {
echo "<A NAME=\"$comment->cid\"></A>\n";
// Create comment header:
@@ -124,7 +125,7 @@
echo " ". t("Subject") .":";
echo " </TD>";
echo " <TD >";
- echo " ". check_output($comment->subject) ."";
+ echo " ". check_output($comment->subject);
echo " </TD>";
// Moderation:
@@ -135,10 +136,10 @@
// Author:
echo " <TR>";
- echo " <TD>". t("Author") .":</FONT></TD><TD>". format_username($comment->userid) ."";
+ echo " <TD>". t("Author") .":</FONT></TD><TD>". format_username($comment->userid);
// Date:
- echo " on ". $timestamp ."";
+ echo " on ". format_date($comment->timestamp);
echo " </TD>";
echo " </TR>";
@@ -149,11 +150,8 @@
// Print body of comment:
if ($comment) echo " <TR><TD>" . check_output($comment->comment, 1) ."</TD></TR>";
- // Print thread (if any):
- if ($thread) echo " <TR><TD>$thread</TD></TR>";
-
// Print bottom link(s):
- echo " <TR><TD> $link</TD></TR>";
+ echo " <TR><TD>$link</TD></TR>";
echo " </TABLE>";
echo " </TD>";
echo " </TR>";
@@ -235,7 +233,7 @@
<TD></TD>
<TD>
<!-- These are just some links from my theme as an example. -->
- <A HREF="">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>
+ <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>