From 0cadc4e68340e02e6b51c29a672db7bb92386fa7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 23 Dec 2000 15:13:34 +0000 Subject: - intermediate commit: some bugfixes, changes and some drastic changes to block and module support --- includes/widget.inc | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'includes/widget.inc') diff --git a/includes/widget.inc b/includes/widget.inc index 2ea57a246..96fe68ab4 100644 --- a/includes/widget.inc +++ b/includes/widget.inc @@ -1,5 +1,21 @@ $block) { + $theme->box($block["subject"], $block["content"]); + } + } + } + + module_iterate("display_block"); +} + function display_morelink($theme, $story) { return ($story->article) ? "[ id\">hlcolor2\">read more | ". strlen($story->article) ." bytes | id\">hlcolor2\">". format_plural($story->comments, "comment", "comments") ." ]" : "[ id\">hlcolor2\">". format_plural($story->comments, "comment", "comments") ." ]"; } @@ -72,20 +88,6 @@ function display_comment_moderation($id, $author, $score, $votes) { return $output; } -function display_new_diaries($theme, $num = 20) { - $result = db_query("SELECT u.userid, d.timestamp FROM diaries d LEFT JOIN users u ON d.author = u.id ORDER BY timestamp DESC LIMIT $num"); - - while ($diary = db_fetch_object($result)) { - if ($time != date("F jS", $diary->timestamp)) { - $content .= "

". date("l, M jS", $diary->timestamp) ."

\n"; - $time = date("F jS", $diary->timestamp); - } - $content .= "
  • userid\">$diary->userid
  • \n"; - } - $content .= "

    [ hlcolor2\">more ]

    "; - $theme->box("Recent diary entries", $content); -} - function display_new_headlines($theme, $num = 10) { global $user; @@ -115,7 +117,7 @@ function display_account($theme) { $content .= "

    \n"; $content .= "

  • edit your diary
  • \n"; $content .= "
  • edit your information
  • \n"; - $content .= "
  • edit your settings
  • \n"; + $content .= "
  • edit your settings
  • \n"; $content .= "

    \n"; $content .= "

  • view your diary
  • \n"; $content .= "
  • view your information
  • \n"; -- cgit v1.2.3