Commit e90f3b88 authored by Dries's avatar Dries
parent 3d3a6074
...@@ -11,7 +11,7 @@ Drupal x.x.x, xxxx-xx-xx (to be released) ...@@ -11,7 +11,7 @@ Drupal x.x.x, xxxx-xx-xx (to be released)
+ added the ability to preview both the short and the full version of your posts. + added the ability to preview both the short and the full version of your posts.
- themes: - themes:
* replaced theme "Goofy" by "Xtemplate", a template driven theme. * replaced theme "Goofy" by "Xtemplate", a template driven theme.
Drupal 4.1.0, 2003-02-01 Drupal 4.1.0, 2003-02-01
------------------------ ------------------------
......
...@@ -664,10 +664,10 @@ function format_date($timestamp, $type = "medium", $format = "") { ...@@ -664,10 +664,10 @@ function format_date($timestamp, $type = "medium", $format = "") {
$date = date(variable_get("date_format", "m/d/Y - H:i"), $timestamp); $date = date(variable_get("date_format", "m/d/Y - H:i"), $timestamp);
break; break;
case "medium": case "medium":
$date = t(date("l", $timestamp)) .", ". date(variable_get("date_format", "m/d/Y - H:i"), $timestamp); $date = date(variable_get("date_format_medium", "D, m/d/Y - H:i"), $timestamp);
break; break;
case "large": case "large":
$date = t(date("l", $timestamp)) .", ". t(date("F", $timestamp)) ." ". date("d, Y - H:i", $timestamp); $date = date(variable_get("date_format_long", "l, F j, Y - H:i"), $timestamp);
break; break;
case "custom": case "custom":
for ($i = strlen($format); $i >= 0; $c = $format[--$i]) { for ($i = strlen($format); $i >= 0; $c = $format[--$i]) {
...@@ -683,7 +683,7 @@ function format_date($timestamp, $type = "medium", $format = "") { ...@@ -683,7 +683,7 @@ function format_date($timestamp, $type = "medium", $format = "") {
} }
break; break;
default: default:
$date = t(date("l", $timestamp)) .", ". date(variable_get("date_format", "m/d/Y - H:i"), $timestamp); $date = date(variable_get("date_format_medium", "l, m/d/Y - H:i"), $timestamp);
} }
return $date; return $date;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* @return string html of pager * @return string html of pager
*/ */
function pager_display($tags = "", $limit = 10, $element = 0, $type = "default", $attributes = array()) { function pager_display($tags = "", $limit = 10, $element = 0, $type = "default", $attributes = array()) {
return theme_invoke("pager_display_". $type, $tags, $limit, $element, $attributes = array()); return theme("pager_display_". $type, $tags, $limit, $element, $attributes = array());
} }
/** /**
......
...@@ -169,13 +169,13 @@ function theme_blocks($region) { ...@@ -169,13 +169,13 @@ function theme_blocks($region) {
if ((($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->module][$block->delta])) && (!$block->path || preg_match("|$block->path|", $PHP_SELF))) { if ((($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->module][$block->delta])) && (!$block->path || preg_match("|$block->path|", $PHP_SELF))) {
$block_data = module_invoke($block->module, "block", "view", $block->delta); $block_data = module_invoke($block->module, "block", "view", $block->delta);
if ($block_data["content"]) { if ($block_data["content"]) {
theme_invoke("block", $block_data["subject"], $block_data["content"], $region); theme("block", $block_data["subject"], $block_data["content"], $region);
} }
} }
} }
} }
function theme_invoke() { function theme() {
global $theme; global $theme;
$args = func_get_args(); $args = func_get_args();
......
...@@ -16,7 +16,7 @@ function import_system($field){ ...@@ -16,7 +16,7 @@ function import_system($field){
return $system[$field]; return $system[$field];
} }
function import_conf_options() { function import_settings() {
$number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100); $number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100);
$output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of news items displayed in one block."); $output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of news items displayed in one block.");
$output .= form_select("Items per page", "import_page_limit", variable_get("import_page_limit", 75), $number, "The maximum number of news items displayed on one page."); $output .= form_select("Items per page", "import_page_limit", variable_get("import_page_limit", 75), $number, "The maximum number of news items displayed on one page.");
......
...@@ -16,7 +16,7 @@ function import_system($field){ ...@@ -16,7 +16,7 @@ function import_system($field){
return $system[$field]; return $system[$field];
} }
function import_conf_options() { function import_settings() {
$number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100); $number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100);
$output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of news items displayed in one block."); $output .= form_select("Items per block", "import_block_limit", variable_get("import_block_limit", 15), $number, "The maximum number of news items displayed in one block.");
$output .= form_select("Items per page", "import_page_limit", variable_get("import_page_limit", 75), $number, "The maximum number of news items displayed on one page."); $output .= form_select("Items per page", "import_page_limit", variable_get("import_page_limit", 75), $number, "The maximum number of news items displayed on one page.");
......
...@@ -188,7 +188,7 @@ function archive_page() { ...@@ -188,7 +188,7 @@ function archive_page() {
$theme->footer(); $theme->footer();
} }
function archive_conf_options() { function archive_settings() {
$output .= form_select( t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered.")); $output .= form_select( t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered."));
......
...@@ -188,7 +188,7 @@ function archive_page() { ...@@ -188,7 +188,7 @@ function archive_page() {
$theme->footer(); $theme->footer();
} }
function archive_conf_options() { function archive_settings() {
$output .= form_select( t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered.")); $output .= form_select( t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered."));
......
...@@ -6,7 +6,7 @@ function blog_system($field){ ...@@ -6,7 +6,7 @@ function blog_system($field){
return $system[$field]; return $system[$field];
} }
function blog_conf_options() { function blog_settings() {
$output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 55, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users.")); $output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 55, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words"); $words = t("words");
$output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts.")); $output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts."));
...@@ -185,7 +185,7 @@ function blog_form(&$node, &$help, &$error) { ...@@ -185,7 +185,7 @@ function blog_form(&$node, &$help, &$error) {
*/ */
if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) { if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) {
$error["body"] = theme_invoke("theme_error", t("The body of your blog is too short.")); $error["body"] = theme("theme_error", t("The body of your blog is too short."));
} }
} }
else { else {
......
...@@ -6,7 +6,7 @@ function blog_system($field){ ...@@ -6,7 +6,7 @@ function blog_system($field){
return $system[$field]; return $system[$field];
} }
function blog_conf_options() { function blog_settings() {
$output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 55, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users.")); $output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 55, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words"); $words = t("words");
$output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts.")); $output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts."));
...@@ -185,7 +185,7 @@ function blog_form(&$node, &$help, &$error) { ...@@ -185,7 +185,7 @@ function blog_form(&$node, &$help, &$error) {
*/ */
if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) { if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) {
$error["body"] = theme_invoke("theme_error", t("The body of your blog is too short.")); $error["body"] = theme("theme_error", t("The body of your blog is too short."));
} }
} }
else { else {
......
...@@ -20,7 +20,7 @@ function comment_system($field) { ...@@ -20,7 +20,7 @@ function comment_system($field) {
return $system[$field]; return $system[$field];
} }
function comment_conf_options() { function comment_settings() {
global $cmodes, $corder; global $cmodes, $corder;
$output .= form_select(t("Default display mode"), "comment_default_mode", variable_get("comment_default_mode", 4), $cmodes, t("The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together.")); $output .= form_select(t("Default display mode"), "comment_default_mode", variable_get("comment_default_mode", 4), $cmodes, t("The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together."));
...@@ -340,7 +340,7 @@ function comment_links($comment, $return = 1) { ...@@ -340,7 +340,7 @@ function comment_links($comment, $return = 1) {
$links[] = l(t("reply to this comment"), "comment/reply/$comment->nid/$comment->cid"); $links[] = l(t("reply to this comment"), "comment/reply/$comment->nid/$comment->cid");
} }
else { else {
$links[] = theme_invoke("comment_post_forbidden"); $links[] = theme("comment_post_forbidden");
} }
} }
...@@ -365,10 +365,10 @@ function comment_view($comment, $links = "", $visible = 1) { ...@@ -365,10 +365,10 @@ function comment_view($comment, $links = "", $visible = 1) {
print "<a name=\"$comment->cid\"></a>\n"; print "<a name=\"$comment->cid\"></a>\n";
if ($visible) { if ($visible) {
theme_invoke("comment", $comment, $links); theme("comment", $comment, $links);
} }
else { else {
theme_invoke("comment_folded", $comment); theme("comment_folded", $comment);
} }
} }
...@@ -458,7 +458,7 @@ function comment_render($node, $cid = 0) { ...@@ -458,7 +458,7 @@ function comment_render($node, $cid = 0) {
if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) { if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n"; print "<form method=\"post\" action=\"". url("comment") ."\">\n";
$theme->box(t("Control panel"), theme_invoke("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); $theme->box(t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid); print form_hidden("nid", $nid);
print "</form>"; print "</form>";
} }
...@@ -475,7 +475,7 @@ function comment_render($node, $cid = 0) { ...@@ -475,7 +475,7 @@ function comment_render($node, $cid = 0) {
while ($comment = db_fetch_object($result)) { while ($comment = db_fetch_object($result)) {
$comments[$comment->cid] = $comment; $comments[$comment->cid] = $comment;
} }
theme_invoke("comment_flat_collapsed", $comments, $threshold_min); theme("comment_flat_collapsed", $comments, $threshold_min);
} }
else if ($mode == 2) { else if ($mode == 2) {
/* /*
...@@ -515,7 +515,7 @@ function comment_render($node, $cid = 0) { ...@@ -515,7 +515,7 @@ function comment_render($node, $cid = 0) {
} }
} }
theme_invoke("comment_flat_expanded", $comments, $threshold_min); theme("comment_flat_expanded", $comments, $threshold_min);
if (comment_user_can_moderate($node) && $show_moderate_button) { if (comment_user_can_moderate($node) && $show_moderate_button) {
print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />"; print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />";
...@@ -530,7 +530,7 @@ function comment_render($node, $cid = 0) { ...@@ -530,7 +530,7 @@ function comment_render($node, $cid = 0) {
$comments[$comment->cid] = $comment; $comments[$comment->cid] = $comment;
} }
if ($comments) { if ($comments) {
theme_invoke("comment_thread_min", $comments, $threshold_min); theme("comment_thread_min", $comments, $threshold_min);
} }
} }
else { else {
...@@ -556,7 +556,7 @@ function comment_render($node, $cid = 0) { ...@@ -556,7 +556,7 @@ function comment_render($node, $cid = 0) {
$page = 1; $page = 1;
foreach ($structure as $cid => $depth) { foreach ($structure as $cid => $depth) {
if ($page == $comment_page) { if ($page == $comment_page) {
theme_invoke("comment_thread_max", $comments[$cid], $threshold_min, $depth - 1); theme("comment_thread_max", $comments[$cid], $threshold_min, $depth - 1);
} }
$comment_num++; $comment_num++;
if ($comment_num == $comments_per_page) { if ($comment_num == $comments_per_page) {
...@@ -580,7 +580,7 @@ function comment_render($node, $cid = 0) { ...@@ -580,7 +580,7 @@ function comment_render($node, $cid = 0) {
if ($comment_num && ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2))) { if ($comment_num && ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n"; print "<form method=\"post\" action=\"". url("comment") ."\">\n";
$theme->box(t("Control panel"), theme_invoke("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); $theme->box(t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid); print form_hidden("nid", $nid);
print "</form>"; print "</form>";
} }
...@@ -632,7 +632,7 @@ function comment_link($type, $node = 0, $main = 0) { ...@@ -632,7 +632,7 @@ function comment_link($type, $node = 0, $main = 0) {
$links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page."))); $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page.")));
} }
else { else {
$links[] = theme_invoke("comment_post_forbidden"); $links[] = theme("comment_post_forbidden");
} }
} }
} }
...@@ -648,7 +648,7 @@ function comment_link($type, $node = 0, $main = 0) { ...@@ -648,7 +648,7 @@ function comment_link($type, $node = 0, $main = 0) {
$links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Share your thoughts and opinions related to this posting."))); $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Share your thoughts and opinions related to this posting.")));
} }
else { else {
$links[] = theme_invoke("comment_post_forbidden"); $links[] = theme("comment_post_forbidden");
} }
} }
else { else {
...@@ -717,9 +717,9 @@ function comment_page() { ...@@ -717,9 +717,9 @@ function comment_page() {
drupal_goto(url("node/view/". $edit["nid"])); drupal_goto(url("node/view/". $edit["nid"]));
} }
break; break;
case t("Update settings"): case t("Save settings"):
global $mode, $order, $threshold, $comments_per_page; global $mode, $order, $threshold, $comments_per_page;
comment_settings(check_query($mode), check_query($order), check_query($threshold), check_query($comments_per_page)); comment_save_settings(check_query($mode), check_query($order), check_query($threshold), check_query($comments_per_page));
drupal_goto(url("node/view/". $edit["nid"], "mode=$mode&amp;order=$order&amp;threshold=$threshold&amp;comments_per_page=$comments_per_page")); drupal_goto(url("node/view/". $edit["nid"], "mode=$mode&amp;order=$order&amp;threshold=$threshold&amp;comments_per_page=$comments_per_page"));
break; break;
} }
...@@ -1107,9 +1107,9 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $nid, $page = 0 ...@@ -1107,9 +1107,9 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $nid, $page = 0
$output .= comment_per_page_form($comments_per_page); $output .= comment_per_page_form($comments_per_page);
$output .= comment_threshold($threshold); $output .= comment_threshold($threshold);
$output .= " ". form_submit(t("Update settings")); $output .= " ". form_submit(t("Save settings"));
$output = form_item(t("Comment viewing options"), $output, t("Select your preferred way to display the comments and click 'Update settings' to submit your changes.")); $output = form_item(t("Comment viewing options"), $output, t("Select your preferred way to display the comments and click 'Save settings' to submit your changes."));
if (($mode == 2 || $mode == 4) && $comment_num > $comments_per_page) { if (($mode == 2 || $mode == 4) && $comment_num > $comments_per_page) {
if ($page > 1) { if ($page > 1) {
...@@ -1165,7 +1165,7 @@ function comment_moderation_form($comment) { ...@@ -1165,7 +1165,7 @@ function comment_moderation_form($comment) {
function comment($comment, $link = 0) { function comment($comment, $link = 0) {
$output .= "<div style=\"border: 1px solid; padding: 10px;\">"; $output .= "<div style=\"border: 1px solid; padding: 10px;\">";
$output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme_invoke("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>"; $output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
$output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>"; $output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>";
$output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>"; $output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>";
$output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>"; $output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>";
...@@ -1310,7 +1310,7 @@ function comment_moderate() { ...@@ -1310,7 +1310,7 @@ function comment_moderate() {
} }
} }
function comment_settings($mode, $order, $threshold, $comments_per_page) { function comment_save_settings($mode, $order, $threshold, $comments_per_page) {
global $user; global $user;
if ($user->uid) { if ($user->uid) {
......
...@@ -20,7 +20,7 @@ function comment_system($field) { ...@@ -20,7 +20,7 @@ function comment_system($field) {
return $system[$field]; return $system[$field];
} }
function comment_conf_options() { function comment_settings() {
global $cmodes, $corder; global $cmodes, $corder;
$output .= form_select(t("Default display mode"), "comment_default_mode", variable_get("comment_default_mode", 4), $cmodes, t("The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together.")); $output .= form_select(t("Default display mode"), "comment_default_mode", variable_get("comment_default_mode", 4), $cmodes, t("The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together."));
...@@ -340,7 +340,7 @@ function comment_links($comment, $return = 1) { ...@@ -340,7 +340,7 @@ function comment_links($comment, $return = 1) {
$links[] = l(t("reply to this comment"), "comment/reply/$comment->nid/$comment->cid"); $links[] = l(t("reply to this comment"), "comment/reply/$comment->nid/$comment->cid");
} }
else { else {
$links[] = theme_invoke("comment_post_forbidden"); $links[] = theme("comment_post_forbidden");
} }
} }
...@@ -365,10 +365,10 @@ function comment_view($comment, $links = "", $visible = 1) { ...@@ -365,10 +365,10 @@ function comment_view($comment, $links = "", $visible = 1) {
print "<a name=\"$comment->cid\"></a>\n"; print "<a name=\"$comment->cid\"></a>\n";
if ($visible) { if ($visible) {
theme_invoke("comment", $comment, $links); theme("comment", $comment, $links);
} }
else { else {
theme_invoke("comment_folded", $comment); theme("comment_folded", $comment);
} }
} }
...@@ -458,7 +458,7 @@ function comment_render($node, $cid = 0) { ...@@ -458,7 +458,7 @@ function comment_render($node, $cid = 0) {
if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) { if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n"; print "<form method=\"post\" action=\"". url("comment") ."\">\n";
$theme->box(t("Control panel"), theme_invoke("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); $theme->box(t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid); print form_hidden("nid", $nid);
print "</form>"; print "</form>";
} }
...@@ -475,7 +475,7 @@ function comment_render($node, $cid = 0) { ...@@ -475,7 +475,7 @@ function comment_render($node, $cid = 0) {
while ($comment = db_fetch_object($result)) { while ($comment = db_fetch_object($result)) {
$comments[$comment->cid] = $comment; $comments[$comment->cid] = $comment;
} }
theme_invoke("comment_flat_collapsed", $comments, $threshold_min); theme("comment_flat_collapsed", $comments, $threshold_min);
} }
else if ($mode == 2) { else if ($mode == 2) {
/* /*
...@@ -515,7 +515,7 @@ function comment_render($node, $cid = 0) { ...@@ -515,7 +515,7 @@ function comment_render($node, $cid = 0) {
} }
} }
theme_invoke("comment_flat_expanded", $comments, $threshold_min); theme("comment_flat_expanded", $comments, $threshold_min);
if (comment_user_can_moderate($node) && $show_moderate_button) { if (comment_user_can_moderate($node) && $show_moderate_button) {
print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />"; print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />";
...@@ -530,7 +530,7 @@ function comment_render($node, $cid = 0) { ...@@ -530,7 +530,7 @@ function comment_render($node, $cid = 0) {
$comments[$comment->cid] = $comment; $comments[$comment->cid] = $comment;
} }
if ($comments) { if ($comments) {
theme_invoke("comment_thread_min", $comments, $threshold_min); theme("comment_thread_min", $comments, $threshold_min);
} }
} }
else { else {
...@@ -556,7 +556,7 @@ function comment_render($node, $cid = 0) { ...@@ -556,7 +556,7 @@ function comment_render($node, $cid = 0) {
$page = 1; $page = 1;
foreach ($structure as $cid => $depth) { foreach ($structure as $cid => $depth) {
if ($page == $comment_page) { if ($page == $comment_page) {
theme_invoke("comment_thread_max", $comments[$cid], $threshold_min, $depth - 1); theme("comment_thread_max", $comments[$cid], $threshold_min, $depth - 1);
} }
$comment_num++; $comment_num++;
if ($comment_num == $comments_per_page) { if ($comment_num == $comments_per_page) {
...@@ -580,7 +580,7 @@ function comment_render($node, $cid = 0) { ...@@ -580,7 +580,7 @@ function comment_render($node, $cid = 0) {
if ($comment_num && ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2))) { if ($comment_num && ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n"; print "<form method=\"post\" action=\"". url("comment") ."\">\n";
$theme->box(t("Control panel"), theme_invoke("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); $theme->box(t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid); print form_hidden("nid", $nid);
print "</form>"; print "</form>";
} }
...@@ -632,7 +632,7 @@ function comment_link($type, $node = 0, $main = 0) { ...@@ -632,7 +632,7 @@ function comment_link($type, $node = 0, $main = 0) {
$links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page."))); $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page.")));
} }
else { else {
$links[] = theme_invoke("comment_post_forbidden"); $links[] = theme("comment_post_forbidden");
} }
} }
} }
...@@ -648,7 +648,7 @@ function comment_link($type, $node = 0, $main = 0) { ...@@ -648,7 +648,7 @@ function comment_link($type, $node = 0, $main = 0) {
$links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Share your thoughts and opinions related to this posting."))); $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Share your thoughts and opinions related to this posting.")));
} }
else { else {
$links[] = theme_invoke("comment_post_forbidden"); $links[] = theme("comment_post_forbidden");
} }
} }
else { else {
...@@ -717,9 +717,9 @@ function comment_page() { ...@@ -717,9 +717,9 @@ function comment_page() {
drupal_goto(url("node/view/". $edit["nid"])); drupal_goto(url("node/view/". $edit["nid"]));
} }
break; break;
case t("Update settings"): case t("Save settings"):
global $mode, $order, $threshold, $comments_per_page; global $mode, $order, $threshold, $comments_per_page;
comment_settings(check_query($mode), check_query($order), check_query($threshold), check_query($comments_per_page)); comment_save_settings(check_query($mode), check_query($order), check_query($threshold), check_query($comments_per_page));
drupal_goto(url("node/view/". $edit["nid"], "mode=$mode&amp;order=$order&amp;threshold=$threshold&amp;comments_per_page=$comments_per_page")); drupal_goto(url("node/view/". $edit["nid"], "mode=$mode&amp;order=$order&amp;threshold=$threshold&amp;comments_per_page=$comments_per_page"));
break; break;
} }
...@@ -1107,9 +1107,9 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $nid, $page = 0 ...@@ -1107,9 +1107,9 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $nid, $page = 0
$output .= comment_per_page_form($comments_per_page); $output .= comment_per_page_form($comments_per_page);
$output .= comment_threshold($threshold); $output .= comment_threshold($threshold);
$output .= " ". form_submit(t("Update settings")); $output .= " ". form_submit(t("Save settings"));
$output = form_item(t("Comment viewing options"), $output, t("Select your preferred way to display the comments and click 'Update settings' to submit your changes.")); $output = form_item(t("Comment viewing options"), $output, t("Select your preferred way to display the comments and click 'Save settings' to submit your changes."));
if (($mode == 2 || $mode == 4) && $comment_num > $comments_per_page) { if (($mode == 2 || $mode == 4) && $comment_num > $comments_per_page) {
if ($page > 1) { if ($page > 1) {
...@@ -1165,7 +1165,7 @@ function comment_moderation_form($comment) { ...@@ -1165,7 +1165,7 @@ function comment_moderation_form($comment) {
function comment($comment, $link = 0) { function comment($comment, $link = 0) {
$output .= "<div style=\"border: 1px solid; padding: 10px;\">"; $output .= "<div style=\"border: 1px solid; padding: 10px;\">";
$output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
$output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme_invoke("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>"; $output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
$output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>"; $output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>";
$output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>"; $output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>";
$output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>"; $output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>";
...@@ -1310,7 +1310,7 @@ function comment_moderate() { ...@@ -1310,7 +1310,7 @@ function comment_moderate() {
} }
} }
function comment_settings($mode, $order, $threshold, $comments_per_page) { function comment_save_settings($mode, $order, $threshold, $comments_per_page) {
global $user; global $user;
if ($user->uid) { if ($user->uid) {
......
...@@ -14,7 +14,7 @@ function development_system($field) { ...@@ -14,7 +14,7 @@ function development_system($field) {
return $system[$field]; return $system[$field];
} }