diff options
Diffstat (limited to 'modules')
41 files changed, 561 insertions, 501 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module index fd932f3cb..c44dbd5fc 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -124,7 +124,7 @@ function import_update() { } } -function import_theme_format_item($item, $feed = 0) { +function theme_import_format_item($item, $feed = 0) { global $user; if ($user->uid && module_exist("blog") && user_access("maintain personal blog")) { @@ -148,7 +148,7 @@ function import_bundle_block($attributes) { $items = array(); while ($item = db_fetch_object($result)) { - $items[] = theme("import_theme_format_item", $item); + $items[] = theme("import_format_item", $item); } $output = "<div class=\"import-block\"><div class=\"bundle\">"; @@ -163,11 +163,11 @@ function import_feed_block($feed) { $items = array(); while ($item = db_fetch_object($result)) { - $items[] = theme("import_theme_format_item", $item); + $items[] = theme("import_format_item", $item); } $output = "<div class=\"import-block\"><div class=\"feed\">"; - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); $output .= "</div></div>"; return $output; @@ -656,10 +656,10 @@ function import_page_last() { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", t("Latest news"), $output); + print theme("footer"); } function import_page_feed($fid) { @@ -691,11 +691,11 @@ function import_page_feed($fid) { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", $feed->title, $header); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", $feed->title, $header); + print theme("box", t("Latest news"), $output); + print theme("footer"); } function import_page_bundle($bid) { @@ -730,11 +730,11 @@ function import_page_bundle($bid) { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", $bundle->title, $header); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", $bundle->title, $header); + print theme("box", t("Latest news"), $output); + print theme("footer"); } @@ -750,10 +750,10 @@ function import_page_sources() { $output .= "<div style=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."</div><br />"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", t("News sources"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", t("News sources"), $output); + print theme("footer"); } function import_page_fd() { @@ -788,8 +788,8 @@ function import_page_feeds() { function import_page_blocks($blocks) { - theme("header"); - theme("box", t("News feeds"), import_page_info()); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); print "<table cellpadding=\"0\" cellspacing=\"5\" border=\"0\" style=\"width: 100%;\">\n"; print " <tr>\n"; @@ -797,7 +797,7 @@ function import_page_blocks($blocks) { $i = 1; print " <td style=\"vertical-align: top; width: 33%;\">\n"; while ($block = each($blocks)) { - theme("box", $block["value"]["subject"], $block["value"]["content"]); + print theme("box", $block["value"]["subject"], $block["value"]["content"]); if ($i == ceil(count($blocks) / 3)) { break; } @@ -808,7 +808,7 @@ function import_page_blocks($blocks) { print " </tr>\n"; print "</table>\n"; - theme("footer"); + print theme("footer"); } function import_page() { diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index fd932f3cb..c44dbd5fc 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -124,7 +124,7 @@ function import_update() { } } -function import_theme_format_item($item, $feed = 0) { +function theme_import_format_item($item, $feed = 0) { global $user; if ($user->uid && module_exist("blog") && user_access("maintain personal blog")) { @@ -148,7 +148,7 @@ function import_bundle_block($attributes) { $items = array(); while ($item = db_fetch_object($result)) { - $items[] = theme("import_theme_format_item", $item); + $items[] = theme("import_format_item", $item); } $output = "<div class=\"import-block\"><div class=\"bundle\">"; @@ -163,11 +163,11 @@ function import_feed_block($feed) { $items = array(); while ($item = db_fetch_object($result)) { - $items[] = theme("import_theme_format_item", $item); + $items[] = theme("import_format_item", $item); } $output = "<div class=\"import-block\"><div class=\"feed\">"; - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); $output .= "</div></div>"; return $output; @@ -656,10 +656,10 @@ function import_page_last() { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", t("Latest news"), $output); + print theme("footer"); } function import_page_feed($fid) { @@ -691,11 +691,11 @@ function import_page_feed($fid) { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", $feed->title, $header); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", $feed->title, $header); + print theme("box", t("Latest news"), $output); + print theme("footer"); } function import_page_bundle($bid) { @@ -730,11 +730,11 @@ function import_page_bundle($bid) { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", $bundle->title, $header); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", $bundle->title, $header); + print theme("box", t("Latest news"), $output); + print theme("footer"); } @@ -750,10 +750,10 @@ function import_page_sources() { $output .= "<div style=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."</div><br />"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", t("News sources"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", t("News sources"), $output); + print theme("footer"); } function import_page_fd() { @@ -788,8 +788,8 @@ function import_page_feeds() { function import_page_blocks($blocks) { - theme("header"); - theme("box", t("News feeds"), import_page_info()); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); print "<table cellpadding=\"0\" cellspacing=\"5\" border=\"0\" style=\"width: 100%;\">\n"; print " <tr>\n"; @@ -797,7 +797,7 @@ function import_page_blocks($blocks) { $i = 1; print " <td style=\"vertical-align: top; width: 33%;\">\n"; while ($block = each($blocks)) { - theme("box", $block["value"]["subject"], $block["value"]["content"]); + print theme("box", $block["value"]["subject"], $block["value"]["content"]); if ($i == ceil(count($blocks) / 3)) { break; } @@ -808,7 +808,7 @@ function import_page_blocks($blocks) { print " </tr>\n"; print "</table>\n"; - theme("footer"); + print theme("footer"); } function import_page() { diff --git a/modules/archive.module b/modules/archive.module index a8a5e0cb8..0677b1766 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -197,7 +197,7 @@ function archive_page() { $op = $_POST["op"]; $edit = $_POST["edit"]; - theme("header"); + print theme("header"); if (user_access("access content")) { if ($op == t("Show")) { @@ -224,7 +224,7 @@ function archive_page() { $start = "<div class=\"container-inline\">"; $start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show")); $start .= "</div>"; - theme("box", t("Archives"), form($start)); + print theme("box", t("Archives"), form($start)); /* ** Fetch nodes for the selected date, or current date if none @@ -243,7 +243,7 @@ function archive_page() { message_access(); } - theme("footer"); + print theme("footer"); } function archive_settings() { diff --git a/modules/archive/archive.module b/modules/archive/archive.module index a8a5e0cb8..0677b1766 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -197,7 +197,7 @@ function archive_page() { $op = $_POST["op"]; $edit = $_POST["edit"]; - theme("header"); + print theme("header"); if (user_access("access content")) { if ($op == t("Show")) { @@ -224,7 +224,7 @@ function archive_page() { $start = "<div class=\"container-inline\">"; $start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show")); $start .= "</div>"; - theme("box", t("Archives"), form($start)); + print theme("box", t("Archives"), form($start)); /* ** Fetch nodes for the selected date, or current date if none @@ -243,7 +243,7 @@ function archive_page() { message_access(); } - theme("footer"); + print theme("footer"); } function archive_settings() { diff --git a/modules/blog.module b/modules/blog.module index c8aa80a43..9acaf7bb0 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -119,7 +119,7 @@ function blog_page_user($uid) { $breadcrumb[] = l(t("Home"), NULL); $breadcrumb[] = l(t("Blogs"), "blog"); $breadcrumb[] = t("%name's blog", array("%name" => $account->name)); - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); $result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND uid = '$account->uid' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); while ($node = db_fetch_object($result)) { @@ -135,7 +135,7 @@ function blog_page_last() { // Breadcrumb navigation: $breadcrumb[] = l(t("Home"), NULL); $breadcrumb[] = t("Blogs"); - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); $result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); @@ -153,7 +153,7 @@ function blog_validate(&$node) { */ if (isset($node->body) && count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) { - $error["body"] = theme("theme_error", t("The body of your blog is too short.")); + $error["body"] = theme("error", t("The body of your blog is too short.")); } return $error; @@ -207,20 +207,20 @@ function blog_page() { } break; default: - theme("header"); + print theme("header"); if (arg(1)) { blog_page_user(arg(1)); } else { blog_page_last(); } - theme("footer"); + print theme("footer"); } } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } @@ -237,12 +237,12 @@ function blog_view($node, $main = 0) { $breadcrumb[] = l(t("Home"), NULL); $breadcrumb[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid"); // print the breadcrumb - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); } // prepair the node content $node = blog_content($node); // print the node - theme("node", $node, $main); + print theme("node", $node, $main); } function blog_link($type, $node = 0, $main) { diff --git a/modules/blog/blog.module b/modules/blog/blog.module index c8aa80a43..9acaf7bb0 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -119,7 +119,7 @@ function blog_page_user($uid) { $breadcrumb[] = l(t("Home"), NULL); $breadcrumb[] = l(t("Blogs"), "blog"); $breadcrumb[] = t("%name's blog", array("%name" => $account->name)); - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); $result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND uid = '$account->uid' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); while ($node = db_fetch_object($result)) { @@ -135,7 +135,7 @@ function blog_page_last() { // Breadcrumb navigation: $breadcrumb[] = l(t("Home"), NULL); $breadcrumb[] = t("Blogs"); - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); $result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); @@ -153,7 +153,7 @@ function blog_validate(&$node) { */ if (isset($node->body) && count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) { - $error["body"] = theme("theme_error", t("The body of your blog is too short.")); + $error["body"] = theme("error", t("The body of your blog is too short.")); } return $error; @@ -207,20 +207,20 @@ function blog_page() { } break; default: - theme("header"); + print theme("header"); if (arg(1)) { blog_page_user(arg(1)); } else { blog_page_last(); } - theme("footer"); + print theme("footer"); } } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } @@ -237,12 +237,12 @@ function blog_view($node, $main = 0) { $breadcrumb[] = l(t("Home"), NULL); $breadcrumb[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid"); // print the breadcrumb - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); } // prepair the node content $node = blog_content($node); // print the node - theme("node", $node, $main); + print theme("node", $node, $main); } function blog_link($type, $node = 0, $main) { diff --git a/modules/book.module b/modules/book.module index ec8555095..5b94c60fe 100644 --- a/modules/book.module +++ b/modules/book.module @@ -390,7 +390,7 @@ function book_view($node, $main = 0) { */ if ($main) { - theme("node", $node, $main); + print theme("node", $node, $main); } else { if ($node->moderate) { @@ -400,10 +400,10 @@ function book_view($node, $main = 0) { if (arg(1) == "view") { $node = book_navigation($node); // Print the breadcrumb - theme("breadcrumb", $node->breadcrumb); + print theme("breadcrumb", $node->breadcrumb); } // Print the node - theme("node", $node, $main); + print theme("node", $node, $main); } } @@ -441,8 +441,8 @@ function book_show($node, $cid) { /* ** View the node */ - theme("breadcrumb", $node->breadcrumb); - theme("node", $node, 0); + print theme("breadcrumb", $node->breadcrumb); + print theme("node", $node, 0); } else { @@ -621,9 +621,9 @@ function book_render() { } } - theme("header"); - theme("box", t("Books"), "$output"); - theme("footer"); + print theme("header"); + print theme("box", t("Books"), "$output"); + print theme("footer"); } function book_page() { @@ -632,9 +632,9 @@ function book_page() { switch (arg(1)) { case "view": $node = node_load(array("nid" => arg(2))); - theme("header"); + print theme("header"); book_show($node, arg(3)); - theme("footer"); + print theme("footer"); break; case "print": print book_print(arg(2), $depth = 1); @@ -644,9 +644,9 @@ function book_page() { } } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } diff --git a/modules/book/book.module b/modules/book/book.module index ec8555095..5b94c60fe 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -390,7 +390,7 @@ function book_view($node, $main = 0) { */ if ($main) { - theme("node", $node, $main); + print theme("node", $node, $main); } else { if ($node->moderate) { @@ -400,10 +400,10 @@ function book_view($node, $main = 0) { if (arg(1) == "view") { $node = book_navigation($node); // Print the breadcrumb - theme("breadcrumb", $node->breadcrumb); + print theme("breadcrumb", $node->breadcrumb); } // Print the node - theme("node", $node, $main); + print theme("node", $node, $main); } } @@ -441,8 +441,8 @@ function book_show($node, $cid) { /* ** View the node */ - theme("breadcrumb", $node->breadcrumb); - theme("node", $node, 0); + print theme("breadcrumb", $node->breadcrumb); + print theme("node", $node, 0); } else { @@ -621,9 +621,9 @@ function book_render() { } } - theme("header"); - theme("box", t("Books"), "$output"); - theme("footer"); + print theme("header"); + print theme("box", t("Books"), "$output"); + print theme("footer"); } function book_page() { @@ -632,9 +632,9 @@ function book_page() { switch (arg(1)) { case "view": $node = node_load(array("nid" => arg(2))); - theme("header"); + print theme("header"); book_show($node, arg(3)); - theme("footer"); + print theme("footer"); break; case "print": print book_print(arg(2), $depth = 1); @@ -644,9 +644,9 @@ function book_page() { } } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } diff --git a/modules/cloud.module b/modules/cloud.module index b60628017..0983dc84e 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -192,9 +192,9 @@ function cloud_page() { if (user_access("access site cloud")) { - theme("header"); - theme("box", t("Site cloud"), cloud_help("cloud") . cloud_list(100)); - theme("footer"); + print theme("header"); + print theme("box", t("Site cloud"), cloud_help("cloud") . cloud_list(100)); + print theme("footer"); } } diff --git a/modules/comment.module b/modules/comment.module index 14c57ae5b..d6bc2457f 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -242,17 +242,17 @@ function comment_reply($pid, $nid) { */ if (node_comment_mode($nid) != 2) { - theme("box", t("Reply"), t("This discussion is closed: you can't post new comments.")); + print theme("box", t("Reply"), t("This discussion is closed: you can't post new comments.")); } else if (user_access("post comments")) { - theme("box", t("Reply"), comment_form(array("pid" => $pid, "nid" => $nid))); + print theme("box", t("Reply"), comment_form(array("pid" => $pid, "nid" => $nid))); } else { - theme("box", t("Reply"), t("You are not authorized to post comments.")); + print theme("box", t("Reply"), t("You are not authorized to post comments.")); } } else { - theme("box", t("Reply"), t("You are not authorized to view comments.")); + print theme("box", t("Reply"), t("You are not authorized to view comments.")); } } @@ -277,7 +277,7 @@ function comment_preview($edit) { comment_view($comment, t("reply to this comment")); - theme("box", t("Reply"), comment_form($edit)); + print theme("box", t("Reply"), comment_form($edit)); if ($edit["pid"]) { $comment = db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0", $edit["pid"])); @@ -528,7 +528,7 @@ function comment_links($comment, $return = 1) { } } - if ($moderation = comment_moderation_form($comment)) { + if ($moderation = theme("comment_moderation_form", $comment)) { $links[] = $moderation; } @@ -550,10 +550,10 @@ function comment_view($comment, $links = "", $visible = 1) { if ($visible) { $comment->comment = check_output($comment->comment); - theme("comment", $comment, $links); + print theme("comment", $comment, $links); } else { - theme("comment_folded", $comment); + print theme("comment_folded", $comment); } } @@ -722,7 +722,7 @@ function comment_render($node, $cid = 0) { if (db_num_rows($result) && (variable_get("comment_controls", 0) == 0 || variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("comment_controls", $threshold, $mode, $order, $comments_per_page); + print theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -734,16 +734,16 @@ function comment_render($node, $cid = 0) { $comment->depth = count(explode(".", $comment->thread)) - 1; if ($mode == 1) { - theme("comment_flat_collapsed", $comment, $threshold_min); + print theme("comment_flat_collapsed", $comment, $threshold_min); } else if ($mode == 2) { - theme("comment_flat_expanded", $comment, $threshold_min); + print theme("comment_flat_expanded", $comment, $threshold_min); } else if ($mode == 3) { - theme("comment_thread_min", $comment, $threshold_min); + print theme("comment_thread_min", $comment, $threshold_min); } else if ($mode == 4) { - theme("comment_thread_max", $comment, $threshold_min); + print theme("comment_thread_max", $comment, $threshold_min); } } @@ -763,7 +763,7 @@ function comment_render($node, $cid = 0) { if (db_num_rows($result) && (variable_get("comment_controls", 0) == 1 || variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("comment_controls", $threshold, $mode, $order, $comments_per_page); + print theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -774,7 +774,7 @@ function comment_render($node, $cid = 0) { */ if (user_access("post comments") && node_comment_mode($nid) == 2 && variable_get("comment_form_location", 0)) { - theme("box", t("Post new comment"), comment_form(array("nid" => $nid))); + print theme("box", t("Post new comment"), comment_form(array("nid" => $nid))); } /* @@ -874,9 +874,9 @@ function comment_page() { switch ($op) { case "edit": - theme("header"); + print theme("header"); comment_edit(check_query(arg(2))); - theme("footer"); + print theme("footer"); break; case t("Moderate comments"): case t("Moderate comment"): @@ -884,21 +884,21 @@ function comment_page() { drupal_goto(url(comment_referer_load())); break; case "reply": - theme("header"); + print theme("header"); comment_reply(check_query(arg(3)), check_query(arg(2))); - theme("footer"); + print theme("footer"); break; case t("Preview comment"): - theme("header"); + print theme("header"); comment_preview($edit); - theme("footer"); + print theme("footer"); break; case t("Post comment"): list($error_title, $error_body) = comment_post($edit); if ($error_body) { - theme("header"); - theme("box", $error_title, $error_body); - theme("footer"); + print theme("header"); + print theme("box", $error_title, $error_body); + print theme("footer"); } else { drupal_goto(url(comment_referer_load())); @@ -1005,7 +1005,7 @@ function comment_admin_overview($status = 0) { $result = pager_query($sql, 50); while ($comment = db_fetch_object($result)) { - $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid")); + $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid")); } if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) { @@ -1264,7 +1264,7 @@ function comment_admin() { ** overridden by themes. */ -function comment_mode_form($mode) { +function theme_comment_mode_form($mode) { $modes = _comment_get_modes(); foreach ($modes as $key => $value) { @@ -1274,7 +1274,7 @@ function comment_mode_form($mode) { return "<select name=\"mode\">$options</select>\n"; } -function comment_order_form($order) { +function theme_comment_order_form($order) { $orders = _comment_get_orders(); foreach ($orders as $key=>$value) { @@ -1284,14 +1284,14 @@ function comment_order_form($order) { return "<select name=\"order\">$options</select>\n"; } -function comment_per_page_form($comments_per_page) { +function theme_comment_per_page_form($comments_per_page) { for ($i = 10; $i < 100; $i = $i + 20) { $options .= " <option value=\"$i\"". ($comments_per_page == $i ? " selected=\"selected\"" : "") .">". t("%a comments per page", array("%a" => $i)) ."</option>"; } return "<select name=\"comments_per_page\">$options</select>\n"; } -function comment_threshold($threshold) { +function theme_comment_threshold($threshold) { $result = db_query("SELECT fid, filter FROM {moderation_filters} "); $options .= " <option value=\"0\">". t("-- threshold --") ."</option>"; while ($filter = db_fetch_object($result)) { @@ -1302,14 +1302,14 @@ function comment_threshold($threshold) { } } -function comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_page = 50) { +function theme_comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_page = 50) { static $output; if (!$output) { - $output .= comment_mode_form($mode); - $output .= comment_order_form($order); - $output .= comment_per_page_form($comments_per_page); - $output .= comment_threshold($threshold); + $output .= theme("comment_mode_form", $mode); + $output .= theme("comment_order_form", $order); + $output .= theme("comment_per_page_form", $comments_per_page); + $output .= theme("comment_threshold", $threshold); $output .= " ". form_submit(t("Save settings")); @@ -1319,7 +1319,7 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_p return theme("box", t("Comment viewing options"), $output); } -function comment_moderation_form($comment) { +function theme_comment_moderation_form($comment) { global $comment_votes, $user, $node; static $votes; @@ -1360,9 +1360,9 @@ function comment_moderation_form($comment) { return $output; } -function comment($comment, $links = 0) { +function theme_comment($comment, $links = 0) { $output .= "<div class=\"comment\">"; - $output .= "<div class=\"subject\">$comment->subject". ($comment->new ? " ". theme("theme_mark") : "") ."</div>"; + $output .= "<div class=\"subject\">$comment->subject". ($comment->new ? " ". theme("mark") : "") ."</div>"; $output .= "<div class=\"moderation\">". $comment->moderation ."</div>"; $output .= "<div class=\"credit\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div>"; $output .= "<div class=\"body\">". check_output($comment->comment) ."</div>"; @@ -1371,21 +1371,21 @@ function comment($comment, $links = 0) { print $output; } -function comment_folded($comment) { +function theme_comment_folded($comment) { print "<div class=\"comment-folded\"><span class=\"subject\">". l($comment->subject, comment_referer_load() ."/$comment->cid#$comment->cid") ."</span> <span class=\"credit\">". t("by") ." ". format_name($comment) ."</span></div>"; } -function comment_flat_collapsed($comment, $threshold) { +function theme_comment_flat_collapsed($comment, $threshold) { if (comment_visible($comment, $threshold)) { print comment_view($comment, "", 0); } } -function comment_flat_expanded($comment, $threshold) { +function theme_comment_flat_expanded($comment, $threshold) { comment_view($comment, comment_links($comment, 0), comment_visible($comment, $threshold)); } -function comment_thread_min($comment, $threshold, $pid = 0) { +function theme_comment_thread_min($comment, $threshold, $pid = 0) { if (comment_visible($comment, $threshold)) { print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td width=\"". ($comment->depth * 25) ."\"><br /></td><td>\n"; print comment_view($comment, "", 0); @@ -1394,7 +1394,7 @@ function comment_thread_min($comment, $threshold, $pid = 0) { } } -function comment_thread_max($comment, $threshold, $level = 0) { +function theme_comment_thread_max($comment, $threshold, $level = 0) { /* ** We had quite a few browser specific issues: expanded comments below ** the top level got truncated on the right hand side. A range of @@ -1415,7 +1415,7 @@ function comment_thread_max($comment, $threshold, $level = 0) { } } -function comment_post_forbidden() { +function theme_comment_post_forbidden() { global $user; if ($user->uid) { return t("You can't post comments."); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 14c57ae5b..d6bc2457f 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -242,17 +242,17 @@ function comment_reply($pid, $nid) { */ if (node_comment_mode($nid) != 2) { - theme("box", t("Reply"), t("This discussion is closed: you can't post new comments.")); + print theme("box", t("Reply"), t("This discussion is closed: you can't post new comments.")); } else if (user_access("post comments")) { - theme("box", t("Reply"), comment_form(array("pid" => $pid, "nid" => $nid))); + print theme("box", t("Reply"), comment_form(array("pid" => $pid, "nid" => $nid))); } else { - theme("box", t("Reply"), t("You are not authorized to post comments.")); + print theme("box", t("Reply"), t("You are not authorized to post comments.")); } } else { - theme("box", t("Reply"), t("You are not authorized to view comments.")); + print theme("box", t("Reply"), t("You are not authorized to view comments.")); } } @@ -277,7 +277,7 @@ function comment_preview($edit) { comment_view($comment, t("reply to this comment")); - theme("box", t("Reply"), comment_form($edit)); + print theme("box", t("Reply"), comment_form($edit)); if ($edit["pid"]) { $comment = db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0", $edit["pid"])); @@ -528,7 +528,7 @@ function comment_links($comment, $return = 1) { } } - if ($moderation = comment_moderation_form($comment)) { + if ($moderation = theme("comment_moderation_form", $comment)) { $links[] = $moderation; } @@ -550,10 +550,10 @@ function comment_view($comment, $links = "", $visible = 1) { if ($visible) { $comment->comment = check_output($comment->comment); - theme("comment", $comment, $links); + print theme("comment", $comment, $links); } else { - theme("comment_folded", $comment); + print theme("comment_folded", $comment); } } @@ -722,7 +722,7 @@ function comment_render($node, $cid = 0) { if (db_num_rows($result) && (variable_get("comment_controls", 0) == 0 || variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("comment_controls", $threshold, $mode, $order, $comments_per_page); + print theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -734,16 +734,16 @@ function comment_render($node, $cid = 0) { $comment->depth = count(explode(".", $comment->thread)) - 1; if ($mode == 1) { - theme("comment_flat_collapsed", $comment, $threshold_min); + print theme("comment_flat_collapsed", $comment, $threshold_min); } else if ($mode == 2) { - theme("comment_flat_expanded", $comment, $threshold_min); + print theme("comment_flat_expanded", $comment, $threshold_min); } else if ($mode == 3) { - theme("comment_thread_min", $comment, $threshold_min); + print theme("comment_thread_min", $comment, $threshold_min); } else if ($mode == 4) { - theme("comment_thread_max", $comment, $threshold_min); + print theme("comment_thread_max", $comment, $threshold_min); } } @@ -763,7 +763,7 @@ function comment_render($node, $cid = 0) { if (db_num_rows($result) && (variable_get("comment_controls", 0) == 1 || variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("comment_controls", $threshold, $mode, $order, $comments_per_page); + print theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -774,7 +774,7 @@ function comment_render($node, $cid = 0) { */ if (user_access("post comments") && node_comment_mode($nid) == 2 && variable_get("comment_form_location", 0)) { - theme("box", t("Post new comment"), comment_form(array("nid" => $nid))); + print theme("box", t("Post new comment"), comment_form(array("nid" => $nid))); } /* @@ -874,9 +874,9 @@ function comment_page() { switch ($op) { case "edit": - theme("header"); + print theme("header"); comment_edit(check_query(arg(2))); - theme("footer"); + print theme("footer"); break; case t("Moderate comments"): case t("Moderate comment"): @@ -884,21 +884,21 @@ function comment_page() { drupal_goto(url(comment_referer_load())); break; case "reply": - theme("header"); + print theme("header"); comment_reply(check_query(arg(3)), check_query(arg(2))); - theme("footer"); + print theme("footer"); break; case t("Preview comment"): - theme("header"); + print theme("header"); comment_preview($edit); - theme("footer"); + print theme("footer"); break; case t("Post comment"): list($error_title, $error_body) = comment_post($edit); if ($error_body) { - theme("header"); - theme("box", $error_title, $error_body); - theme("footer"); + print theme("header"); + print theme("box", $error_title, $error_body); + print theme("footer"); } else { drupal_goto(url(comment_referer_load())); @@ -1005,7 +1005,7 @@ function comment_admin_overview($status = 0) { $result = pager_query($sql, 50); while ($comment = db_fetch_object($result)) { - $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid")); + $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid")); } if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) { @@ -1264,7 +1264,7 @@ function comment_admin() { ** overridden by themes. */ -function comment_mode_form($mode) { +function theme_comment_mode_form($mode) { $modes = _comment_get_modes(); foreach ($modes as $key => $value) { @@ -1274,7 +1274,7 @@ function comment_mode_form($mode) { return "<select name=\"mode\">$options</select>\n"; } -function comment_order_form($order) { +function theme_comment_order_form($order) { $orders = _comment_get_orders(); foreach ($orders as $key=>$value) { @@ -1284,14 +1284,14 @@ function comment_order_form($order) { return "<select name=\"order\">$options</select>\n"; } -function comment_per_page_form($comments_per_page) { +function theme_comment_per_page_form($comments_per_page) { for ($i = 10; $i < 100; $i = $i + 20) { $options .= " <option value=\"$i\"". ($comments_per_page == $i ? " selected=\"selected\"" : "") .">". t("%a comments per page", array("%a" => $i)) ."</option>"; } return "<select name=\"comments_per_page\">$options</select>\n"; } -function comment_threshold($threshold) { +function theme_comment_threshold($threshold) { $result = db_query("SELECT fid, filter FROM {moderation_filters} "); $options .= " <option value=\"0\">". t("-- threshold --") ."</option>"; while ($filter = db_fetch_object($result)) { @@ -1302,14 +1302,14 @@ function comment_threshold($threshold) { } } -function comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_page = 50) { +function theme_comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_page = 50) { static $output; if (!$output) { - $output .= comment_mode_form($mode); - $output .= comment_order_form($order); - $output .= comment_per_page_form($comments_per_page); - $output .= comment_threshold($threshold); + $output .= theme("comment_mode_form", $mode); + $output .= theme("comment_order_form", $order); + $output .= theme("comment_per_page_form", $comments_per_page); + $output .= theme("comment_threshold", $threshold); $output .= " ". form_submit(t("Save settings")); @@ -1319,7 +1319,7 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_p return theme("box", t("Comment viewing options"), $output); } -function comment_moderation_form($comment) { +function theme_comment_moderation_form($comment) { global $comment_votes, $user, $node; static $votes; @@ -1360,9 +1360,9 @@ function comment_moderation_form($comment) { return $output; } -function comment($comment, $links = 0) { +function theme_comment($comment, $links = 0) { $output .= "<div class=\"comment\">"; - $output .= "<div class=\"subject\">$comment->subject". ($comment->new ? " ". theme("theme_mark") : "") ."</div>"; + $output .= "<div class=\"subject\">$comment->subject". ($comment->new ? " ". theme("mark") : "") ."</div>"; $output .= "<div class=\"moderation\">". $comment->moderation ."</div>"; $output .= "<div class=\"credit\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div>"; $output .= "<div class=\"body\">". check_output($comment->comment) ."</div>"; @@ -1371,21 +1371,21 @@ function comment($comment, $links = 0) { print $output; } -function comment_folded($comment) { +function theme_comment_folded($comment) { print "<div class=\"comment-folded\"><span class=\"subject\">". l($comment->subject, comment_referer_load() ."/$comment->cid#$comment->cid") ."</span> <span class=\"credit\">". t("by") ." ". format_name($comment) ."</span></div>"; } -function comment_flat_collapsed($comment, $threshold) { +function theme_comment_flat_collapsed($comment, $threshold) { if (comment_visible($comment, $threshold)) { print comment_view($comment, "", 0); } } -function comment_flat_expanded($comment, $threshold) { +function theme_comment_flat_expanded($comment, $threshold) { comment_view($comment, comment_links($comment, 0), comment_visible($comment, $threshold)); } -function comment_thread_min($comment, $threshold, $pid = 0) { +function theme_comment_thread_min($comment, $threshold, $pid = 0) { if (comment_visible($comment, $threshold)) { print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td width=\"". ($comment->depth * 25) ."\"><br /></td><td>\n"; print comment_view($comment, "", 0); @@ -1394,7 +1394,7 @@ function comment_thread_min($comment, $threshold, $pid = 0) { } } -function comment_thread_max($comment, $threshold, $level = 0) { +function theme_comment_thread_max($comment, $threshold, $level = 0) { /* ** We had quite a few browser specific issues: expanded comments below ** the top level got truncated on the right hand side. A range of @@ -1415,7 +1415,7 @@ function comment_thread_max($comment, $threshold, $level = 0) { } } -function comment_post_forbidden() { +function theme_comment_post_forbidden() { global $user; if ($user->uid) { return t("You can't post comments."); diff --git a/modules/drupal.module b/modules/drupal.module index 888253a1f..a2621e59d 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -157,9 +157,9 @@ function drupal_auth($username, $password, $server) { function drupal_page() { - theme("header"); - theme("box", "Drupal", drupal_help("user/help#drupal")); - theme("footer"); + print theme("header"); + print theme("box", "Drupal", drupal_help("user/help#drupal")); + print theme("footer"); } function drupal_login($arguments) { diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 888253a1f..a2621e59d 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -157,9 +157,9 @@ function drupal_auth($username, $password, $server) { function drupal_page() { - theme("header"); - theme("box", "Drupal", drupal_help("user/help#drupal")); - theme("footer"); + print theme("header"); + print theme("box", "Drupal", drupal_help("user/help#drupal")); + print theme("footer"); } function drupal_login($arguments) { diff --git a/modules/forum.module b/modules/forum.module index 63755b56e..e305d025c 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -149,12 +149,12 @@ function forum_view($node, $main = 0) { $breadcrumb[] = l(t("Forums"), "forum"); $breadcrumb[] = l($term_data->name, "forum/$term_data->tid"); // print the breadcrumb - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); } // prepair the node content $node = forum_content($node); // print the node - theme("node", $node, $main); + print theme("node", $node, $main); } function forum_validate(&$node) { @@ -434,28 +434,44 @@ function forum_page() { $topics = forum_get_topics($tid, $sortby, $forum_per_page); } - theme("forum_theme_display", $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset); + print theme("forum_display", $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset); } else { $message = t("Warning"); - theme("header", $message); - theme("box", $message, _forum_message_taxonomy()); - theme("footer"); + print theme("header", $message); + print theme("box", $message, _forum_message_taxonomy()); + print theme("footer"); } } else { $message = t("Access denied"); - theme("header", $message); - theme("box", $message, message_access()); - theme("footer"); + print theme("header", $message); + print theme("box", $message, message_access()); + print theme("footer"); } } -/* -** Theme functions -*/ +/** + @addtogroup theme_system -function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset) { + Forum module specific theme functions. + @{ +**/ + +/** + Controls the output of the forum body. + + @param forums + @param topics + @param parents + @param tid + @param sortby + @param forum_per_page + @param offset + + @return string the output for the forum body. +**/ +function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset) { // forum list, topics list, topic browser and "add new topic" link $title = t("Forums"); @@ -480,10 +496,10 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p if (count($forums) || count($parents)) { $output = "<div id=\"forum\">"; - $output .= theme("forum_theme_list", $forums, $parents, $tid); + $output .= theme("forum_list", $forums, $parents, $tid); if ($tid && !in_array($tid, variable_get("forum_containers", array()))) { - $output .= theme("forum_theme_topic_list", $tid, $topics, $sortby, $forum_per_page, $offset); + $output .= theme("forum_topic_list", $tid, $topics, $sortby, $forum_per_page, $offset); } $output .= "</div>"; } @@ -492,13 +508,22 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p $output = ''; } - theme("header", $title); - theme("breadcrumb", $breadcrumb); - theme("box", $title, $output); - theme("footer"); + print theme("header", $title); + print theme("breadcrumb", $breadcrumb); + print theme("box", $title, $output); + print theme("footer"); } -function forum_theme_list($forums, $parents, $tid) { +/** + Outputs the forum listing. + + @param forums + @param parents + @param tid + + @return string the output for the forum listing. +**/ +function theme_forum_list($forums, $parents, $tid) { global $user; if ($forums) { @@ -552,8 +577,18 @@ function forum_theme_list($forums, $parents, $tid) { return table($header, $rows); } +/** + Outputs the topic listing. + + @param tid + @param topics + @param sortby + @param forum_per_page + @param offset -function forum_theme_topic_list($tid, $topics, $sortby, $forum_per_page, $offset) { + @return string the output for the topic list. +**/ +function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset) { global $id, $status, $user, $pager_total, $forum_topic_list_header; if ($topics) { @@ -593,6 +628,8 @@ function forum_theme_topic_list($tid, $topics, $sortby, $forum_per_page, $offset return $output; } +/** @} End of addtogroup theme_system **/ + function _forum_icon($new_posts, $num_posts = 0, $comment_mode = 0) { $base_path = variable_get("forum_icon_path", ""); diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 63755b56e..e305d025c 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -149,12 +149,12 @@ function forum_view($node, $main = 0) { $breadcrumb[] = l(t("Forums"), "forum"); $breadcrumb[] = l($term_data->name, "forum/$term_data->tid"); // print the breadcrumb - theme("breadcrumb", $breadcrumb); + print theme("breadcrumb", $breadcrumb); } // prepair the node content $node = forum_content($node); // print the node - theme("node", $node, $main); + print theme("node", $node, $main); } function forum_validate(&$node) { @@ -434,28 +434,44 @@ function forum_page() { $topics = forum_get_topics($tid, $sortby, $forum_per_page); } - theme("forum_theme_display", $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset); + print theme("forum_display", $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset); } else { $message = t("Warning"); - theme("header", $message); - theme("box", $message, _forum_message_taxonomy()); - theme("footer"); + print theme("header", $message); + print theme("box", $message, _forum_message_taxonomy()); + print theme("footer"); } } else { $message = t("Access denied"); - theme("header", $message); - theme("box", $message, message_access()); - theme("footer"); + print theme("header", $message); + print theme("box", $message, message_access()); + print theme("footer"); } } -/* -** Theme functions -*/ +/** + @addtogroup theme_system -function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset) { + Forum module specific theme functions. + @{ +**/ + +/** + Controls the output of the forum body. + + @param forums + @param topics + @param parents + @param tid + @param sortby + @param forum_per_page + @param offset + + @return string the output for the forum body. +**/ +function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset) { // forum list, topics list, topic browser and "add new topic" link $title = t("Forums"); @@ -480,10 +496,10 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p if (count($forums) || count($parents)) { $output = "<div id=\"forum\">"; - $output .= theme("forum_theme_list", $forums, $parents, $tid); + $output .= theme("forum_list", $forums, $parents, $tid); if ($tid && !in_array($tid, variable_get("forum_containers", array()))) { - $output .= theme("forum_theme_topic_list", $tid, $topics, $sortby, $forum_per_page, $offset); + $output .= theme("forum_topic_list", $tid, $topics, $sortby, $forum_per_page, $offset); } $output .= "</div>"; } @@ -492,13 +508,22 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p $output = ''; } - theme("header", $title); - theme("breadcrumb", $breadcrumb); - theme("box", $title, $output); - theme("footer"); + print theme("header", $title); + print theme("breadcrumb", $breadcrumb); + print theme("box", $title, $output); + print theme("footer"); } -function forum_theme_list($forums, $parents, $tid) { +/** + Outputs the forum listing. + + @param forums + @param parents + @param tid + + @return string the output for the forum listing. +**/ +function theme_forum_list($forums, $parents, $tid) { global $user; if ($forums) { @@ -552,8 +577,18 @@ function forum_theme_list($forums, $parents, $tid) { return table($header, $rows); } +/** + Outputs the topic listing. + + @param tid + @param topics + @param sortby + @param forum_per_page + @param offset -function forum_theme_topic_list($tid, $topics, $sortby, $forum_per_page, $offset) { + @return string the output for the topic list. +**/ +function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset) { global $id, $status, $user, $pager_total, $forum_topic_list_header; if ($topics) { @@ -593,6 +628,8 @@ function forum_theme_topic_list($tid, $topics, $sortby, $forum_per_page, $offset return $output; } +/** @} End of addtogroup theme_system **/ + function _forum_icon($new_posts, $num_posts = 0, $comment_mode = 0) { $base_path = variable_get("forum_icon_path", ""); diff --git a/modules/import.module b/modules/import.module index fd932f3cb..c44dbd5fc 100644 --- a/modules/import.module +++ b/modules/import.module @@ -124,7 +124,7 @@ function import_update() { } } -function import_theme_format_item($item, $feed = 0) { +function theme_import_format_item($item, $feed = 0) { global $user; if ($user->uid && module_exist("blog") && user_access("maintain personal blog")) { @@ -148,7 +148,7 @@ function import_bundle_block($attributes) { $items = array(); while ($item = db_fetch_object($result)) { - $items[] = theme("import_theme_format_item", $item); + $items[] = theme("import_format_item", $item); } $output = "<div class=\"import-block\"><div class=\"bundle\">"; @@ -163,11 +163,11 @@ function import_feed_block($feed) { $items = array(); while ($item = db_fetch_object($result)) { - $items[] = theme("import_theme_format_item", $item); + $items[] = theme("import_format_item", $item); } $output = "<div class=\"import-block\"><div class=\"feed\">"; - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); $output .= "</div></div>"; return $output; @@ -656,10 +656,10 @@ function import_page_last() { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", t("Latest news"), $output); + print theme("footer"); } function import_page_feed($fid) { @@ -691,11 +691,11 @@ function import_page_feed($fid) { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", $feed->title, $header); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", $feed->title, $header); + print theme("box", t("Latest news"), $output); + print theme("footer"); } function import_page_bundle($bid) { @@ -730,11 +730,11 @@ function import_page_bundle($bid) { } $output .= "</table>\n"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", $bundle->title, $header); - theme("box", t("Latest news"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", $bundle->title, $header); + print theme("box", t("Latest news"), $output); + print theme("footer"); } @@ -750,10 +750,10 @@ function import_page_sources() { $output .= "<div style=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."</div><br />"; - theme("header"); - theme("box", t("News feeds"), import_page_info()); - theme("box", t("News sources"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); + print theme("box", t("News sources"), $output); + print theme("footer"); } function import_page_fd() { @@ -788,8 +788,8 @@ function import_page_feeds() { function import_page_blocks($blocks) { - theme("header"); - theme("box", t("News feeds"), import_page_info()); + print theme("header"); + print theme("box", t("News feeds"), import_page_info()); print "<table cellpadding=\"0\" cellspacing=\"5\" border=\"0\" style=\"width: 100%;\">\n"; print " <tr>\n"; @@ -797,7 +797,7 @@ function import_page_blocks($blocks) { $i = 1; print " <td style=\"vertical-align: top; width: 33%;\">\n"; while ($block = each($blocks)) { - theme("box", $block["value"]["subject"], $block["value"]["content"]); + print theme("box", $block["value"]["subject"], $block["value"]["content"]); if ($i == ceil(count($blocks) / 3)) { break; } @@ -808,7 +808,7 @@ function import_page_blocks($blocks) { print " </tr>\n"; print "</table>\n"; - theme("footer"); + print theme("footer"); } function import_page() { diff --git a/modules/jabber.module b/modules/jabber.module index 67b6d483a..19aaa2fbc 100644 --- a/modules/jabber.module +++ b/modules/jabber.module @@ -162,9 +162,9 @@ function jabber_auth($username, $password, $server) { function jabber_page() { - theme("header"); - theme("box", "Jabber", jabber_help("user/help#jabber")); - theme("footer"); + print theme("header"); + print theme("box", "Jabber", jabber_help("user/help#jabber")); + print theme("footer"); } function jabber_user($type, $edit, $user) { diff --git a/modules/node.module b/modules/node.module index 847d83682..5ac010d76 100644 --- a/modules/node.module +++ b/modules/node.module @@ -73,11 +73,11 @@ function node_title_list($result, $title = NULL) { $items[] = l($node->title, "node/view/$node->nid", array("title" => format_plural($number, "%count comment", "%count comments"))); } - return theme("theme_node_list", $items, $title); + return theme("node_list", $items, $title); } function theme_node_list($items, $title = NULL) { - return theme("theme_item_list", $items, $title); + return theme("item_list", $items, $title); } // Update the 'last viewed' timestamp of the specified node for current user. @@ -407,7 +407,7 @@ function node_view($node, $main = 0) { $node->teaser = check_output($node->teaser); $node->body = check_output($node->body); - theme("node", $node, $main); + print theme("node", $node, $main); } } @@ -991,7 +991,7 @@ function node_validate($node, &$error) { if (isset($node->title)) { $node->title = strip_tags($node->title); if (!$node->title) { - $error["title"] = theme("theme_error", t("You have to specify a valid title.")); + $error["title"] = theme("error", t("You have to specify a valid title.")); } } @@ -1041,7 +1041,7 @@ function node_validate($node, &$error) { $node->uid = $account->uid; } else { - $error["name"] = theme("theme_error", t("The name '%u' does not exist.", array ("%u" => $node->name))); + $error["name"] = theme("error", t("The name '%u' does not exist.", array ("%u" => $node->name))); } /* @@ -1052,7 +1052,7 @@ function node_validate($node, &$error) { $node->created = strtotime($node->date); } else { - $error["date"] = theme("theme_error", t("You have to specifiy a valid date.")); + $error["date"] = theme("error", t("You have to specifiy a valid date.")); } } else { @@ -1482,29 +1482,29 @@ function node_page() { $node = node_load(array("nid" => arg(2), "status" => 1), $_GET["revision"]); } - theme("header", $node->title); + print theme("header", $node->title); $name = module_invoke(arg(2), "node", "name"); switch ($op) { case "add": - theme("box", t("Submit %name", array("%name" => $name)), node_add(arg(2))); + print theme("box", t("Submit %name", array("%name" => $name)), node_add(arg(2))); break; case "edit": - theme("box", t("Edit %name", array("%name" => $name)), node_edit(arg(2))); + print theme("box", t("Edit %name", array("%name" => $name)), node_edit(arg(2))); break; case "view": print node_show($node, arg(3)); break; case t("Preview"): $edit = node_validate($edit, $error); - theme("box", t("Preview %name", array("%name" => $name)), node_preview($edit, $error)); + print theme("box", t("Preview %name", array("%name" => $name)), node_preview($edit, $error)); break; case t("Submit"): - theme("box", t("Submit %name", array("%name" => $name)), node_submit($edit)); + print theme("box", t("Submit %name", array("%name" => $name)), node_submit($edit)); break; case t("Delete"): - theme("box", t("Delete %name", array("%name" => $name)), node_delete($edit)); + print theme("box", t("Delete %name", array("%name" => $name)), node_delete($edit)); break; default: $result = pager_query("SELECT nid, type FROM {node} WHERE promote = '1' AND status = '1' ORDER BY static DESC, created DESC", variable_get("default_nodes_main", 10)); @@ -1515,12 +1515,12 @@ function node_page() { print pager_display(NULL, variable_get("default_nodes_main", 10)); } - theme("footer"); + print theme("footer"); } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } diff --git a/modules/node/node.module b/modules/node/node.module index 847d83682..5ac010d76 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -73,11 +73,11 @@ function node_title_list($result, $title = NULL) { $items[] = l($node->title, "node/view/$node->nid", array("title" => format_plural($number, "%count comment", "%count comments"))); } - return theme("theme_node_list", $items, $title); + return theme("node_list", $items, $title); } function theme_node_list($items, $title = NULL) { - return theme("theme_item_list", $items, $title); + return theme("item_list", $items, $title); } // Update the 'last viewed' timestamp of the specified node for current user. @@ -407,7 +407,7 @@ function node_view($node, $main = 0) { $node->teaser = check_output($node->teaser); $node->body = check_output($node->body); - theme("node", $node, $main); + print theme("node", $node, $main); } } @@ -991,7 +991,7 @@ function node_validate($node, &$error) { if (isset($node->title)) { $node->title = strip_tags($node->title); if (!$node->title) { - $error["title"] = theme("theme_error", t("You have to specify a valid title.")); + $error["title"] = theme("error", t("You have to specify a valid title.")); } } @@ -1041,7 +1041,7 @@ function node_validate($node, &$error) { $node->uid = $account->uid; } else { - $error["name"] = theme("theme_error", t("The name '%u' does not exist.", array ("%u" => $node->name))); + $error["name"] = theme("error", t("The name '%u' does not exist.", array ("%u" => $node->name))); } /* @@ -1052,7 +1052,7 @@ function node_validate($node, &$error) { $node->created = strtotime($node->date); } else { - $error["date"] = theme("theme_error", t("You have to specifiy a valid date.")); + $error["date"] = theme("error", t("You have to specifiy a valid date.")); } } else { @@ -1482,29 +1482,29 @@ function node_page() { $node = node_load(array("nid" => arg(2), "status" => 1), $_GET["revision"]); } - theme("header", $node->title); + print theme("header", $node->title); $name = module_invoke(arg(2), "node", "name"); switch ($op) { case "add": - theme("box", t("Submit %name", array("%name" => $name)), node_add(arg(2))); + print theme("box", t("Submit %name", array("%name" => $name)), node_add(arg(2))); break; case "edit": - theme("box", t("Edit %name", array("%name" => $name)), node_edit(arg(2))); + print theme("box", t("Edit %name", array("%name" => $name)), node_edit(arg(2))); break; case "view": print node_show($node, arg(3)); break; case t("Preview"): $edit = node_validate($edit, $error); - theme("box", t("Preview %name", array("%name" => $name)), node_preview($edit, $error)); + print theme("box", t("Preview %name", array("%name" => $name)), node_preview($edit, $error)); break; case t("Submit"): - theme("box", t("Submit %name", array("%name" => $name)), node_submit($edit)); + print theme("box", t("Submit %name", array("%name" => $name)), node_submit($edit)); break; case t("Delete"): - theme("box", t("Delete %name", array("%name" => $name)), node_delete($edit)); + print theme("box", t("Delete %name", array("%name" => $name)), node_delete($edit)); break; default: $result = pager_query("SELECT nid, type FROM {node} WHERE promote = '1' AND status = '1' ORDER BY static DESC, created DESC", variable_get("default_nodes_main", 10)); @@ -1515,12 +1515,12 @@ function node_page() { print pager_display(NULL, variable_get("default_nodes_main", 10)); } - theme("footer"); + print theme("footer"); } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } diff --git a/modules/page.module b/modules/page.module index ff6e8c2e1..aa75896e3 100644 --- a/modules/page.module +++ b/modules/page.module @@ -121,7 +121,7 @@ function page_view($node, $main) { // prepair the node content $node = page_content($node); // print the node - theme("node", $node, $main); + print theme("node", $node, $main); } function page_form(&$node, &$help, &$error) { diff --git a/modules/page/page.module b/modules/page/page.module index ff6e8c2e1..aa75896e3 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -121,7 +121,7 @@ function page_view($node, $main) { // prepair the node content $node = page_content($node); // print the node - theme("node", $node, $main); + print theme("node", $node, $main); } function page_form(&$node, &$help, &$error) { diff --git a/modules/path.module b/modules/path.module index 5ab2ebea5..7b88f77aa 100644 --- a/modules/path.module +++ b/modules/path.module @@ -84,7 +84,7 @@ function path_form($edit = "", $error = "") { if ($error) { foreach ($error as $message) { - $form .= theme("theme_error", $message); + $form .= theme("error", $message); } } diff --git a/modules/path/path.module b/modules/path/path.module index 5ab2ebea5..7b88f77aa 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -84,7 +84,7 @@ function path_form($edit = "", $error = "") { if ($error) { foreach ($error as $message) { - $form .= theme("theme_error", $message); + $form .= theme("error", $message); } } diff --git a/modules/poll.module b/modules/poll.module index b4bd980ce..e2b7085e9 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -87,12 +87,12 @@ function poll_validate(&$node) { } if ($node->chvotes[$i] < 0) { - $error["chvotes][$i"] = theme("theme_error", t("Negative values are not allowed.")); + $error["chvotes][$i"] = theme("error", t("Negative values are not allowed.")); } } if ($actualchoices < 2) { - $error["choice][0"] = theme("theme_error", t("You must fill in at least two choices.")); + $error["choice][0"] = theme("error", t("You must fill in at least two choices.")); } } @@ -247,15 +247,15 @@ function poll_node($field) { function poll_page() { - theme("header"); + print theme("header"); $result = db_query("SELECT n.nid, n.title, p.active, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid=p.nid INNER JOIN {poll_choices} c ON n.nid=c.nid WHERE type = 'poll' AND status = '1' AND moderate = '0' GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC"); $output = "<ul>"; while ($node = db_fetch_object($result)) { $output .= "<li>".l($node->title, "node/view/$node->nid") ." - ". format_plural($node->votes, "1 vote", "%count votes") ." - ". ($node->active ? t("open") : t("closed")) ."</li>"; } $output .= "</ul>"; - theme("box", t("Polls"), $output); - theme("footer"); + print theme("box", t("Polls"), $output); + print theme("footer"); } function poll_perm() { @@ -383,7 +383,7 @@ function poll_view(&$node, $main = 0, $block = 0) { // We also use poll_view() for the side-block if (!$block) { - theme("node", $node, $main); + print theme("node", $node, $main); } } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index b4bd980ce..e2b7085e9 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -87,12 +87,12 @@ function poll_validate(&$node) { } if ($node->chvotes[$i] < 0) { - $error["chvotes][$i"] = theme("theme_error", t("Negative values are not allowed.")); + $error["chvotes][$i"] = theme("error", t("Negative values are not allowed.")); } } if ($actualchoices < 2) { - $error["choice][0"] = theme("theme_error", t("You must fill in at least two choices.")); + $error["choice][0"] = theme("error", t("You must fill in at least two choices.")); } } @@ -247,15 +247,15 @@ function poll_node($field) { function poll_page() { - theme("header"); + print theme("header"); $result = db_query("SELECT n.nid, n.title, p.active, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid=p.nid INNER JOIN {poll_choices} c ON n.nid=c.nid WHERE type = 'poll' AND status = '1' AND moderate = '0' GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC"); $output = "<ul>"; while ($node = db_fetch_object($result)) { $output .= "<li>".l($node->title, "node/view/$node->nid") ." - ". format_plural($node->votes, "1 vote", "%count votes") ." - ". ($node->active ? t("open") : t("closed")) ."</li>"; } $output .= "</ul>"; - theme("box", t("Polls"), $output); - theme("footer"); + print theme("box", t("Polls"), $output); + print theme("footer"); } function poll_perm() { @@ -383,7 +383,7 @@ function poll_view(&$node, $main = 0, $block = 0) { // We also use poll_view() for the side-block if (!$block) { - theme("node", $node, $main); + print theme("node", $node, $main); } } diff --git a/modules/profile.module b/modules/profile.module index 74de3729a..7325569c4 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -111,7 +111,7 @@ function profile_user($type, $edit, &$user) { function profile_required($title) { // this pleads "theme, theme" ;) - return $title ." ". theme("theme_mark"); + return $title ." ". theme("mark"); } function _profile_form($edit, $mode) { diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 74de3729a..7325569c4 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -111,7 +111,7 @@ function profile_user($type, $edit, &$user) { function profile_required($title) { // this pleads "theme, theme" ;) - return $title ." ". theme("theme_mark"); + return $title ." ". theme("mark"); } function _profile_form($edit, $mode) { diff --git a/modules/queue.module b/modules/queue.module index 92f2decb1..5de10711a 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -116,9 +116,9 @@ function queue_overview() { } $output .= "</table>"; - theme("header"); - theme("box", t("Moderation queue"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("Moderation queue"), $output); + print theme("footer"); } function queue_view($nid) { @@ -168,15 +168,15 @@ function queue_view($nid) { } } - theme("header"); + print theme("header"); node_view($node); if ($output) { - theme("box", t("Moderate"), $output); + print theme("box", t("Moderate"), $output); } if ($node->comment && variable_get("queue_show_comments", 1)) { module_invoke("comment", "render", $node); } - theme("footer"); + print theme("footer"); } function queue_page() { @@ -191,9 +191,9 @@ function queue_page() { } } else { - theme("header"); - theme("box", t("Moderation queue"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Moderation queue"), message_access()); + print theme("footer"); } } diff --git a/modules/search.module b/modules/search.module index 447c5a3c0..6d9b1e842 100644 --- a/modules/search.module +++ b/modules/search.module @@ -362,27 +362,27 @@ function search_view($keys) { $form .= "<br />". $help_link; } - theme("header", t("Search")); + print theme("header", t("Search")); if ($form) { - theme("box", t("Search"), $form); + print theme("box", t("Search"), $form); } if ($keys) { if ($output) { - theme("box", t("Search Results"), $output); + print theme("box", t("Search Results"), $output); } else { - theme("box", t("Search Results"), t("Your search yielded no results.")); + print theme("box", t("Search Results"), t("Your search yielded no results.")); } } - theme("footer"); + print theme("footer"); } else { - theme("header", t("Access denied")); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header", t("Access denied")); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } @@ -392,9 +392,9 @@ function search_page() { switch (arg(1)) { case "help": - theme("header"); - theme("box", t("Search Help"), search_help()); - theme("footer"); + print theme("header"); + print theme("box", t("Search Help"), search_help()); + print theme("footer"); break; default: search_view($keys); diff --git a/modules/search/search.module b/modules/search/search.module index 447c5a3c0..6d9b1e842 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -362,27 +362,27 @@ function search_view($keys) { $form .= "<br />". $help_link; } - theme("header", t("Search")); + print theme("header", t("Search")); if ($form) { - theme("box", t("Search"), $form); + print theme("box", t("Search"), $form); } if ($keys) { if ($output) { - theme("box", t("Search Results"), $output); + print theme("box", t("Search Results"), $output); } else { - theme("box", t("Search Results"), t("Your search yielded no results.")); + print theme("box", t("Search Results"), t("Your search yielded no results.")); } } - theme("footer"); + print theme("footer"); } else { - theme("header", t("Access denied")); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header", t("Access denied")); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } @@ -392,9 +392,9 @@ function search_page() { switch (arg(1)) { case "help": - theme("header"); - theme("box", t("Search Help"), search_help()); - theme("footer"); + print theme("header"); + print theme("box", t("Search Help"), search_help()); + print theme("footer"); break; default: search_view($keys); diff --git a/modules/statistics.module b/modules/statistics.module index b2c641636..645e25541 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -692,7 +692,7 @@ function statistics_display_online_block() { if ($items) { $output .= "<br /><br />"; - $output .= theme("theme_item_list", $items, variable_get("statistics_block_online_subtitle", "Online users:")); + $output .= theme("item_list", $items, variable_get("statistics_block_online_subtitle", "Online users:")); } } } @@ -758,14 +758,14 @@ function statistics_page() { if (user_access("access content")) { - theme("header"); + print theme("header"); statistics_page_user(); - theme("footer"); + print theme("footer"); } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } @@ -782,7 +782,7 @@ function statistics_page_user($uid = 0, $date = 0, $all = 0) { $output .= statistics_summary("daycount", $displaycount); $output .= "</table>"; - theme("box", t(variable_get("statistics_userpage_day_head", "")), $output, "main"); + print theme("box", t(variable_get("statistics_userpage_day_head", "")), $output, "main"); } @@ -791,7 +791,7 @@ function statistics_page_user($uid = 0, $date = 0, $all = 0) { $output .= statistics_summary("totalcount", $displaycount); $output .= "</table>"; - theme("box", t(variable_get("statistics_userpage_all_head", "")), $output, "main"); + print theme("box", t(variable_get("statistics_userpage_all_head", "")), $output, "main"); } if ($displaycount = variable_get("statistics_userpage_last_cnt", "10")) { @@ -799,7 +799,7 @@ function statistics_page_user($uid = 0, $date = 0, $all = 0) { $output .= statistics_summary("timestamp", $displaycount); $output .= "</table>"; - theme("box", t(variable_get("statistics_userpage_last_head", "")), $output, "main"); + print theme("box", t(variable_get("statistics_userpage_last_head", "")), $output, "main"); } } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index b2c641636..645e25541 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -692,7 +692,7 @@ function statistics_display_online_block() { if ($items) { $output .= "<br /><br />"; - $output .= theme("theme_item_list", $items, variable_get("statistics_block_online_subtitle", "Online users:")); + $output .= theme("item_list", $items, variable_get("statistics_block_online_subtitle", "Online users:")); } } } @@ -758,14 +758,14 @@ function statistics_page() { if (user_access("access content")) { - theme("header"); + print theme("header"); statistics_page_user(); - theme("footer"); + print theme("footer"); } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } @@ -782,7 +782,7 @@ function statistics_page_user($uid = 0, $date = 0, $all = 0) { $output .= statistics_summary("daycount", $displaycount); $output .= "</table>"; - theme("box", t(variable_get("statistics_userpage_day_head", "")), $output, "main"); + print theme("box", t(variable_get("statistics_userpage_day_head", "")), $output, "main"); } @@ -791,7 +791,7 @@ function statistics_page_user($uid = 0, $date = 0, $all = 0) { $output .= statistics_summary("totalcount", $displaycount); $output .= "</table>"; - theme("box", t(variable_get("statistics_userpage_all_head", "")), $output, "main"); + print theme("box", t(variable_get("statistics_userpage_all_head", "")), $output, "main"); } if ($displaycount = variable_get("statistics_userpage_last_cnt", "10")) { @@ -799,7 +799,7 @@ function statistics_page_user($uid = 0, $date = 0, $all = 0) { $output .= statistics_summary("timestamp", $displaycount); $output .= "</table>"; - theme("box", t(variable_get("statistics_userpage_last_head", "")), $output, "main"); + print theme("box", t(variable_get("statistics_userpage_last_head", "")), $output, "main"); } } diff --git a/modules/system.module b/modules/system.module index 2b920d501..88c74db73 100644 --- a/modules/system.module +++ b/modules/system.module @@ -57,7 +57,7 @@ function system_link($type) { menu("admin/system", t("configuration"), "system_admin", 3); menu("admin/system/themes", t("themes"), "system_admin", 2); - foreach (theme_list(1) as $theme) { + foreach (list_themes(1) as $theme) { // NOTE: refresh the list because some themes might have been enabled/disabled. include_once "$theme->filename"; $function = $theme->name ."_settings"; @@ -81,7 +81,7 @@ function system_link($type) { function system_user($type, &$edit, $user) { $options = "<option value=\"\"". (("" == $key) ? " selected=\"selected\"" : "") .">". t("Default theme") ."</option>\n"; - if ($type == "edit_form" && count($themes = theme_list()) > 1) { + if ($type == "edit_form" && count($themes = list_themes()) > 1) { foreach ($themes as $key => $value) { $options .= "<option value=\"$key\"". (($edit["theme"] == $key) ? " selected=\"selected\"" : "") .">$key - $value->description</option>\n"; } @@ -168,7 +168,7 @@ function system_view_module($name) { } function system_view_theme($name) { - $themes = theme_list(); + $themes = list_themes(); $theme = $themes[$name]; if ($theme) { include_once "$theme->filename"; @@ -301,16 +301,9 @@ function system_listing($type, $directory, $required = array()) { $info->description = module_invoke($file->name, "help", "admin/system/modules#description") ? module_invoke($file->name, "help", "admin/system/modules#description") : module_invoke($file->name, "system", "description"); } elseif ($type == "theme") { - $class = "Theme_$file->name"; - if (class_exists($class)) { - $theme =& new $class; - $info->name = $theme->system("name") ? $theme->system("name") : $file->name; - $info->description = $theme->system("description"); + $info->name = $file->name; + $info->description = module_invoke($file->name, "help", "admin/system/themes#description"); $themes[] = $info->name; - } - else { - unset($files[$filename]); - } } // Update the contents of the system table: diff --git a/modules/system/system.module b/modules/system/system.module index 2b920d501..88c74db73 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -57,7 +57,7 @@ function system_link($type) { menu("admin/system", t("configuration"), "system_admin", 3); menu("admin/system/themes", t("themes"), "system_admin", 2); - foreach (theme_list(1) as $theme) { + foreach (list_themes(1) as $theme) { // NOTE: refresh the list because some themes might have been enabled/disabled. include_once "$theme->filename"; $function = $theme->name ."_settings"; @@ -81,7 +81,7 @@ function system_link($type) { function system_user($type, &$edit, $user) { $options = "<option value=\"\"". (("" == $key) ? " selected=\"selected\"" : "") .">". t("Default theme") ."</option>\n"; - if ($type == "edit_form" && count($themes = theme_list()) > 1) { + if ($type == "edit_form" && count($themes = list_themes()) > 1) { foreach ($themes as $key => $value) { $options .= "<option value=\"$key\"". (($edit["theme"] == $key) ? " selected=\"selected\"" : "") .">$key - $value->description</option>\n"; } @@ -168,7 +168,7 @@ function system_view_module($name) { } function system_view_theme($name) { - $themes = theme_list(); + $themes = list_themes(); $theme = $themes[$name]; if ($theme) { include_once "$theme->filename"; @@ -301,16 +301,9 @@ function system_listing($type, $directory, $required = array()) { $info->description = module_invoke($file->name, "help", "admin/system/modules#description") ? module_invoke($file->name, "help", "admin/system/modules#description") : module_invoke($file->name, "system", "description"); } elseif ($type == "theme") { - $class = "Theme_$file->name"; - if (class_exists($class)) { - $theme =& new $class; - $info->name = $theme->system("name") ? $theme->system("name") : $file->name; - $info->description = $theme->system("description"); + $info->name = $file->name; + $info->description = module_invoke($file->name, "help", "admin/system/themes#description"); $themes[] = $info->name; - } - else { - unset($files[$filename]); - } } // Update the contents of the system table: diff --git a/modules/taxonomy.module b/modules/taxonomy.module index df7bec446..281b8d2f0 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -717,9 +717,9 @@ function taxonomy_page() { taxonomy_feed($taxonomy); break; default: - theme("header"); + print theme("header"); taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); - theme("footer"); + print theme("footer"); break; } } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index df7bec446..281b8d2f0 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -717,9 +717,9 @@ function taxonomy_page() { taxonomy_feed($taxonomy); break; default: - theme("header"); + print theme("header"); taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); - theme("footer"); + print theme("footer"); break; } } diff --git a/modules/title.module b/modules/title.module index 6dbd63040..a2fdd0b9d 100644 --- a/modules/title.module +++ b/modules/title.module @@ -32,9 +32,9 @@ function title_page() { else if (db_num_rows($result) == 1) { $node = db_fetch_object($result); $node = node_load(array("nid" => $node->nid)); - theme("header"); + print theme("header"); print node_show($node, NULL); - theme("footer"); + print theme("footer"); } else { $header = array(t("Type"), t("Title"), t("Author")); @@ -49,15 +49,15 @@ function title_page() { $output .= table($header, $rows); $output .= "</div>"; - theme("header"); - theme("box", t("Matching Posts"), $output); - theme("footer"); + print theme("header"); + print theme("box", t("Matching Posts"), $output); + print theme("footer"); } } else { - theme("header"); - theme("box", t("Access denied"), message_access()); - theme("footer"); + print theme("header"); + print theme("box", t("Access denied"), message_access()); + print theme("footer"); } } diff --git a/modules/tracker.module b/modules/tracker.module index 78d27c793..fcde4f1f6 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -61,12 +61,12 @@ function tracker_posts($id = 0) { } $type = ucfirst(module_invoke($node->type, "node", "name")); - $title = l($node->title, "node/view/$node->nid") ." ". (node_is_new($node->nid, $node->changed) ? theme("theme_mark") : ""); + $title = l($node->title, "node/view/$node->nid") ." ". (node_is_new($node->nid, $node->changed) ? theme("mark") : ""); $author = format_name($node); $comments = array(); while ($comment = db_fetch_object($cresult)) { - $comments[] = "<li>". t("%subject by %author", array("%subject" => l($comment->subject, "node/view/$node->nid#$comment->cid"), "%author" => format_name($comment))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("theme_mark") : "") ."</li>\n"; + $comments[] = "<li>". t("%subject by %author", array("%subject" => l($comment->subject, "node/view/$node->nid#$comment->cid"), "%author" => format_name($comment))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : "") ."</li>\n"; } if ($comments) { @@ -104,9 +104,9 @@ function tracker_page() { global $user; if (user_access("access content")) { - theme("header", t("Recent posts")); - theme("box", t("Recent posts"), tracker_posts(arg(1))); - theme("footer"); + print theme("header", t("Recent posts")); + print theme("box", t("Recent posts"), tracker_posts(arg(1))); + print theme("footer"); } } diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 78d27c793..fcde4f1f6 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -61,12 +61,12 @@ function tracker_posts($id = 0) { } $type = ucfirst(module_invoke($node->type, "node", "name")); - $title = l($node->title, "node/view/$node->nid") ." ". (node_is_new($node->nid, $node->changed) ? theme("theme_mark") : ""); + $title = l($node->title, "node/view/$node->nid") ." ". (node_is_new($node->nid, $node->changed) ? theme("mark") : ""); $author = format_name($node); $comments = array(); while ($comment = db_fetch_object($cresult)) { - $comments[] = "<li>". t("%subject by %author", array("%subject" => l($comment->subject, "node/view/$node->nid#$comment->cid"), "%author" => format_name($comment))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("theme_mark") : "") ."</li>\n"; + $comments[] = "<li>". t("%subject by %author", array("%subject" => l($comment->subject, "node/view/$node->nid#$comment->cid"), "%author" => format_name($comment))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : "") ."</li>\n"; } if ($comments) { @@ -104,9 +104,9 @@ function tracker_page() { global $user; if (user_access("access content")) { - theme("header", t("Recent posts")); - theme("box", t("Recent posts"), tracker_posts(arg(1))); - theme("footer"); + print theme("header", t("Recent posts")); + print theme("box", t("Recent posts"), tracker_posts(arg(1))); + print theme("footer"); } } diff --git a/modules/user.module b/modules/user.module index 853638672..ddf63b4a1 100644 --- a/modules/user.module +++ b/modules/user.module @@ -447,7 +447,7 @@ function user_block($op = "list", $delta = 0) { } $items[] = l(t("Request new password"), "user/password", array("title" => t("Request new password via e-mail."))); - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); $block["subject"] = t("User login"); $block["content"] = "<div class=\"user-login-link\">$output</div>"; @@ -467,7 +467,7 @@ function user_block($op = "list", $delta = 0) { $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid"); } - $output = theme("theme_user_list", $items); + $output = theme("user_list", $items); $block["subject"] = t("Who's new"); $block["content"] = $output; @@ -478,11 +478,11 @@ function user_block($op = "list", $delta = 0) { } function theme_user_list($items, $title = NULL) { - return theme("theme_item_list", $items, $title); + return theme("item_list", $items, $title); } function theme_menu_list($items, $title = NULL) { - return theme("theme_item_list", $items, $title); + return theme("item_list", $items, $title); } function user_link($type) { @@ -693,7 +693,7 @@ function user_login($edit = array(), $msg = "") { */ if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } /* @@ -726,7 +726,7 @@ function user_login($edit = array(), $msg = "") { if (variable_get("user_register", 1)) { $items[] = l(t("Create new account"), "user/register"); } - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); return form($output, "post", url("user")); } @@ -803,7 +803,7 @@ function user_pass($edit = array()) { // Display error message if necessary. if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } /* @@ -818,7 +818,7 @@ function user_pass($edit = array()) { if (variable_get("user_register", 1)) { $items[] = l(t("Create new account"), "user/register"); } - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); return form($output, "post", url("user")); } @@ -927,7 +927,7 @@ function user_register($edit = array()) { } else { if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } } @@ -948,7 +948,7 @@ function user_register($edit = array()) { $output .= form_submit(t("Create new account")); $items[] = l(t("Request new password"), "user/password"); $items[] = l(t("Log in"), "user/login"); - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); return form($output); } @@ -1032,7 +1032,7 @@ function user_edit($edit = array()) { } if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } if (!$edit) { @@ -1070,9 +1070,9 @@ function user_view($uid = 0) { $output .= implode("\n", module_invoke_all("user", "view_private", "", $user)); - theme("header", $user->name); - theme("box", $user->name, $output); - theme("footer"); + print theme("header", $user->name); + print theme("box", $user->name, $output); + print theme("footer"); } else if ($uid && $account = user_load(array("uid" => $uid, "status" => 1))) { $output = form_item(t("Name"), $account->name); @@ -1083,19 +1083,19 @@ function user_view($uid = 0) { $output .= form_item(t("Administration"), l(t("edit account"), "admin/user/edit/$account->uid")); } - theme("header", $account->name); - theme("box", $account->name, $output); - theme("footer"); + print theme("header", $account->name); + print theme("box", $account->name, $output); + print theme("footer"); } else { $output = user_login(); - theme("header", t("User login")); - theme("box", t("User login"), $output); + print theme("header", t("User login")); + print theme("box", t("User login"), $output); if (variable_get("user_register", 1)) { - theme("box", t("Create new user account"), user_register()); + print theme("box", t("Create new user account"), user_register()); } - theme("box", t("Request new password"), user_pass()); - theme("footer"); + print theme("box", t("Request new password"), user_pass()); + print theme("footer"); } } @@ -1111,36 +1111,36 @@ function user_page() { switch ($op) { case t("E-mail new password"): case "password": - theme("header", t("E-mail new password")); - theme("box", t("E-mail new password"), user_pass($edit)); - theme("footer"); + print theme("header", t("E-mail new password")); + print theme("box", t("E-mail new password"), user_pass($edit)); + print theme("footer"); break; case t("Create new account"): case "register": $output = user_register($edit); - theme("header", t("Create new account")); + print theme("header", t("Create new account")); if (variable_get("user_register", 1)) { - theme("box", t("Create new account"), $output); + print theme("box", t("Create new account"), $output); } else { print message_access(); } - theme("footer"); + print theme("footer"); break; case t("Log in"): case "login": $output = user_login($edit); - theme("header", t("Log in")); - theme("box", t("Log in"), $output); - theme("footer"); + print theme("header", t("Log in")); + print theme("box", t("Log in"), $output); + print theme("footer"); break; case t("Save user information"): case "edit": $output = user_edit($edit); $GLOBALS["theme"] = theme_init(); - theme("header", t("Edit user information")); - theme("box", t("Edit user information"), $output); - theme("footer"); + print theme("header", t("Edit user information")); + print theme("box", t("Edit user information"), $output); + print theme("footer"); break; case "view": user_view(arg(2)); @@ -1150,9 +1150,9 @@ function user_page() { print user_logout(); break; case "help": - theme("header"); - theme("box", t("Distributed authentication"), user_help("user/help#user")); - theme("footer"); + print theme("header"); + print theme("box", t("Distributed authentication"), user_help("user/help#user")); + print theme("footer"); break; default: print user_view(); @@ -1236,7 +1236,7 @@ function user_admin_create($edit = array()) { else { if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 55, t("Provide the username of the new account.")); @@ -1488,7 +1488,7 @@ function user_admin_edit($edit = array()) { $output .= status(t("user information changes have been saved.")); } else { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } } else if ($op == t("Delete account")) { @@ -1499,7 +1499,7 @@ function user_admin_edit($edit = array()) { } else { $error = t("Failed to delete account: the account has to be blocked first."); - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } } @@ -1761,9 +1761,9 @@ function user_help($section = "admin/help#user") { $output .= "<p>This second half of the <i>_auth</i> function examines the <i>\$response</i> from plant.blogger.com and returns a TRUE (1) or FALSE (0) as appropriate. This is a critical decision, so be sure that you have good logic here, and perform sufficient testing for all cases. In the case of Blogger, we search for the string 'fault' in the response. If that string is present, or there is no repsonse, our function returns FALSE. Otherwise, Blogger has returned valid data to our method request and we return TRUE. Note: Everything starting with \"//\" is a comment and is not executed.</p>"; $output .= "<pre>function blogger_page() { - theme("header"); - theme("box", "Blogger", blogger_help(\"user/help\")); - theme("footer"); + print theme("header"); + print theme("box", "Blogger", blogger_help(\"user/help\")); + print theme("footer"); }</pre>"; $output .= "<p>The _page function is not currently used, but it might be in the future. For now, just copy what you see here, substituting your module name for <i>blogger</i>.</p>"; $output .= "<pre><code>function blogger_help(\$section) { diff --git a/modules/user/user.module b/modules/user/user.module index 853638672..ddf63b4a1 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -447,7 +447,7 @@ function user_block($op = "list", $delta = 0) { } $items[] = l(t("Request new password"), "user/password", array("title" => t("Request new password via e-mail."))); - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); $block["subject"] = t("User login"); $block["content"] = "<div class=\"user-login-link\">$output</div>"; @@ -467,7 +467,7 @@ function user_block($op = "list", $delta = 0) { $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid"); } - $output = theme("theme_user_list", $items); + $output = theme("user_list", $items); $block["subject"] = t("Who's new"); $block["content"] = $output; @@ -478,11 +478,11 @@ function user_block($op = "list", $delta = 0) { } function theme_user_list($items, $title = NULL) { - return theme("theme_item_list", $items, $title); + return theme("item_list", $items, $title); } function theme_menu_list($items, $title = NULL) { - return theme("theme_item_list", $items, $title); + return theme("item_list", $items, $title); } function user_link($type) { @@ -693,7 +693,7 @@ function user_login($edit = array(), $msg = "") { */ if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } /* @@ -726,7 +726,7 @@ function user_login($edit = array(), $msg = "") { if (variable_get("user_register", 1)) { $items[] = l(t("Create new account"), "user/register"); } - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); return form($output, "post", url("user")); } @@ -803,7 +803,7 @@ function user_pass($edit = array()) { // Display error message if necessary. if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } /* @@ -818,7 +818,7 @@ function user_pass($edit = array()) { if (variable_get("user_register", 1)) { $items[] = l(t("Create new account"), "user/register"); } - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); return form($output, "post", url("user")); } @@ -927,7 +927,7 @@ function user_register($edit = array()) { } else { if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } } @@ -948,7 +948,7 @@ function user_register($edit = array()) { $output .= form_submit(t("Create new account")); $items[] = l(t("Request new password"), "user/password"); $items[] = l(t("Log in"), "user/login"); - $output .= theme("theme_item_list", $items); + $output .= theme("item_list", $items); return form($output); } @@ -1032,7 +1032,7 @@ function user_edit($edit = array()) { } if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } if (!$edit) { @@ -1070,9 +1070,9 @@ function user_view($uid = 0) { $output .= implode("\n", module_invoke_all("user", "view_private", "", $user)); - theme("header", $user->name); - theme("box", $user->name, $output); - theme("footer"); + print theme("header", $user->name); + print theme("box", $user->name, $output); + print theme("footer"); } else if ($uid && $account = user_load(array("uid" => $uid, "status" => 1))) { $output = form_item(t("Name"), $account->name); @@ -1083,19 +1083,19 @@ function user_view($uid = 0) { $output .= form_item(t("Administration"), l(t("edit account"), "admin/user/edit/$account->uid")); } - theme("header", $account->name); - theme("box", $account->name, $output); - theme("footer"); + print theme("header", $account->name); + print theme("box", $account->name, $output); + print theme("footer"); } else { $output = user_login(); - theme("header", t("User login")); - theme("box", t("User login"), $output); + print theme("header", t("User login")); + print theme("box", t("User login"), $output); if (variable_get("user_register", 1)) { - theme("box", t("Create new user account"), user_register()); + print theme("box", t("Create new user account"), user_register()); } - theme("box", t("Request new password"), user_pass()); - theme("footer"); + print theme("box", t("Request new password"), user_pass()); + print theme("footer"); } } @@ -1111,36 +1111,36 @@ function user_page() { switch ($op) { case t("E-mail new password"): case "password": - theme("header", t("E-mail new password")); - theme("box", t("E-mail new password"), user_pass($edit)); - theme("footer"); + print theme("header", t("E-mail new password")); + print theme("box", t("E-mail new password"), user_pass($edit)); + print theme("footer"); break; case t("Create new account"): case "register": $output = user_register($edit); - theme("header", t("Create new account")); + print theme("header", t("Create new account")); if (variable_get("user_register", 1)) { - theme("box", t("Create new account"), $output); + print theme("box", t("Create new account"), $output); } else { print message_access(); } - theme("footer"); + print theme("footer"); break; case t("Log in"): case "login": $output = user_login($edit); - theme("header", t("Log in")); - theme("box", t("Log in"), $output); - theme("footer"); + print theme("header", t("Log in")); + print theme("box", t("Log in"), $output); + print theme("footer"); break; case t("Save user information"): case "edit": $output = user_edit($edit); $GLOBALS["theme"] = theme_init(); - theme("header", t("Edit user information")); - theme("box", t("Edit user information"), $output); - theme("footer"); + print theme("header", t("Edit user information")); + print theme("box", t("Edit user information"), $output); + print theme("footer"); break; case "view": user_view(arg(2)); @@ -1150,9 +1150,9 @@ function user_page() { print user_logout(); break; case "help": - theme("header"); - theme("box", t("Distributed authentication"), user_help("user/help#user")); - theme("footer"); + print theme("header"); + print theme("box", t("Distributed authentication"), user_help("user/help#user")); + print theme("footer"); break; default: print user_view(); @@ -1236,7 +1236,7 @@ function user_admin_create($edit = array()) { else { if ($error) { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 55, t("Provide the username of the new account.")); @@ -1488,7 +1488,7 @@ function user_admin_edit($edit = array()) { $output .= status(t("user information changes have been saved.")); } else { - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } } else if ($op == t("Delete account")) { @@ -1499,7 +1499,7 @@ function user_admin_edit($edit = array()) { } else { $error = t("Failed to delete account: the account has to be blocked first."); - $output .= theme("theme_error", $error); + $output .= theme("error", $error); } } @@ -1761,9 +1761,9 @@ function user_help($section = "admin/help#user") { $output .= "<p>This second half of the <i>_auth</i> function examines the <i>\$response</i> from plant.blogger.com and returns a TRUE (1) or FALSE (0) as appropriate. This is a critical decision, so be sure that you have good logic here, and perform sufficient testing for all cases. In the case of Blogger, we search for the string 'fault' in the response. If that string is present, or there is no repsonse, our function returns FALSE. Otherwise, Blogger has returned valid data to our method request and we return TRUE. Note: Everything starting with \"//\" is a comment and is not executed.</p>"; $output .= "<pre>function blogger_page() { - theme("header"); - theme("box", "Blogger", blogger_help(\"user/help\")); - theme("footer"); + print theme("header"); + print theme("box", "Blogger", blogger_help(\"user/help\")); + print theme("footer"); }</pre>"; $output .= "<p>The _page function is not currently used, but it might be in the future. For now, just copy what you see here, substituting your module name for <i>blogger</i>.</p>"; $output .= "<pre><code>function blogger_help(\$section) { |