? Drupal-eliminate-compose-tips-module.patch ? dfiles.txt ? drupal.pot ? e2.php ? errors.txt ? modules/Drupal-integrate-compose-tips-into-filter-module.patch ? modules/Drupal-title-module-setting.patch Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.315 diff -u -r1.315 common.inc --- includes/common.inc 26 Jan 2004 19:22:21 -0000 1.315 +++ includes/common.inc 27 Jan 2004 19:18:15 -0000 @@ -934,10 +934,6 @@ return form_select($title, $name, $value, $weights, $description, $extra); } - -function form_allowed_tags_text() { - return variable_get("allowed_html", "") ? (t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))) : ""; -} /* @} */ /** Index: modules/blog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/blog.module,v retrieving revision 1.161 diff -u -r1.161 blog.module --- modules/blog.module 27 Jan 2004 18:47:07 -0000 1.161 +++ modules/blog.module 27 Jan 2004 19:18:16 -0000 @@ -184,7 +184,7 @@ $output .= implode("", taxonomy_node_form("blog", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text()); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : filter_tips_short()); return $output; } Index: modules/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book.module,v retrieving revision 1.214 diff -u -r1.214 book.module --- modules/book.module 27 Jan 2004 18:47:07 -0000 1.214 +++ modules/book.module 27 Jan 2004 19:18:19 -0000 @@ -185,7 +185,7 @@ $output .= implode("", taxonomy_node_form("book", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, form_allowed_tags_text()); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, filter_tips_short()); $output .= form_textarea(t("Log message"), "log", $node->log, 60, 5, t("An explanation of the additions or updates being made to help the group understand your motivations.")); if (user_access("administer nodes")) { Index: modules/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment.module,v retrieving revision 1.212 diff -u -r1.212 comment.module --- modules/comment.module 26 Jan 2004 19:22:22 -0000 1.212 +++ modules/comment.module 27 Jan 2004 19:18:26 -0000 @@ -150,7 +150,7 @@ break; case "edit_form": // when user tries to edit his own data - return form_textarea(t("Signature"), "signature", $user->signature, 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."
". form_allowed_tags_text()); + return form_textarea(t("Signature"), "signature", $user->signature, 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."
". filter_tips_short()); case "edit_validate": // validate user data editing return array("signature" => $edit["signature"]); @@ -1259,7 +1259,7 @@ $form .= form_textfield(t("Subject"), "subject", $edit["subject"], 50, 64); // comment field: - $form .= form_textarea(t("Comment"), "comment", $edit["comment"] ? $edit["comment"] : $user->signature, 70, 10, form_allowed_tags_text()); + $form .= form_textarea(t("Comment"), "comment", $edit["comment"] ? $edit["comment"] : $user->signature, 70, 10, filter_tips_short()); // preview button: $form .= form_hidden("cid", $edit["cid"]); Index: modules/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter.module,v retrieving revision 1.3 diff -u -r1.3 filter.module --- modules/filter.module 19 Jan 2004 14:49:53 -0000 1.3 +++ modules/filter.module 27 Jan 2004 19:18:27 -0000 @@ -7,12 +7,32 @@ return t("Framework for handling filtering of content."); case 'admin/system/filters': return t("Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions."); + case 'filter#tip': + switch (variable_get("filter_html", 1)) { + case 0: + return t("All HTML tags allowed"); + break; + case 1: + if ($allowed_html = variable_get("allowed_html", "
      • ")) { + return t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html); + } else { + return t("No HTML tags allowed"); + } + break; + case 2: + return t("No HTML tags allowed"); + break; + } + break; } } function filter_link($type) { - if ($type == "system" && user_access("administer site configuration")) { - menu("admin/system/filters", t("filters"), "filter_admin", 5); + if ($type == "system") { + if (user_access("administer site configuration")) { + menu("admin/system/filters", t("filters"), "filter_admin", 5); + } + menu("filter/tips", t("Compose tips"), "filter_tips_page", 0, MENU_HIDE); } } @@ -159,4 +179,19 @@ return $text; } -?> \ No newline at end of file +function filter_tips_page() { + $tips = module_invoke_all("help", "filter#tip"); + foreach ($tips as $tip) { + if ($tip) { + $tiplist .= "
      • $tip
      • \n"; + } + } + $output = "
          \n$tiplist\n
        \n"; + print theme("page", $output, t("Compose Tips")); +} + +function filter_tips_short() { + return filter_help("filter#tip") . "
        " . l(t("More information on formatting options"), "filter/tips", array("target" => "_blank")); +} + +?> Index: modules/story.module =================================================================== RCS file: /cvs/drupal/drupal/modules/story.module,v retrieving revision 1.142 diff -u -r1.142 story.module --- modules/story.module 27 Jan 2004 18:47:07 -0000 1.142 +++ modules/story.module 27 Jan 2004 19:18:27 -0000 @@ -83,7 +83,7 @@ $output .= implode("", taxonomy_node_form("story", $node)); } - $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text()); + $output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : filter_tips_short()); return $output; }