function display_module_blocks() { global $repository, $theme; function display_block($name, $module) { global $theme; if ($blocks = module_execute($name, "block")) { foreach ($blocks as $id=>$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") ." ]"; } function display_moderation_results($theme, $story) { global $user; if ($user->id && $story->id && $vote = user_getHistory($user->history, "s$story->id")) { $output .= "
You voted `$vote'.
\n"; $output .= "\n";
$output .= "Other people voted:
\n";
$result = db_query("SELECT * FROM users WHERE id != $user->id AND history LIKE '%s$story->id%'");
while ($account = db_fetch_object($result)) {
$output .= "". format_username($account->userid) ." voted `". user_getHistory($account->history, "s$story->id") ."'.
";
}
$theme->box("Moderation results", $output);
}
}
function display_related_links($theme, $story) {
### Parse story for -tags:
$text = stripslashes("$story->abstract $story->updates $story->article");
while ($text = stristr($text, "") + 4);
$text = stristr($text, "");
if (!stristr($link, "mailto:")) $content .= "
". date("l, M jS", $story->timestamp) ."
\n"; $time = date("F jS", $story->timestamp); } $content .= "[ hlcolor2\">more ]
"; $theme->box("Older headlines", $content); } function display_comment_moderation($id, $author, $score, $votes) { global $user, $comment_votes; if ($user->id && $user->userid != $author && !user_getHistory($user->history, "c$id")) { $output .= "\n"; } else { $output .= "score: | ". format_data($score) ." |
votes: | ". format_data($votes) ." |
[ hlcolor2\">more ]
"; $theme->box("Latest headlines", $content); } function display_account($theme) { global $user, $site_name; if ($user->id) { function submission_number() { $result = db_query("SELECT COUNT(id) FROM stories WHERE status = 1"); return ($result) ? db_result($result, 0) : 0; } ### Display account settings: $content .= "\n"; $content .= "
\n"; $content .= "
\n"; $content .= "
\n"; $content .= "