From de3b0796d24c05856340d94504c109195b51d71c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 5 Jun 2003 18:09:39 +0000 Subject: - Bugfix: better charset support for non-ISO-8859-1 languages. Patch 0029.charset.fixes.patch by Al. Could East Asia test this please. - Bugfix: made the "moderate" field behave. Patch 0030.queue.module.help.and.settings.form.patch by Al. - Documentation: revised a large part of the help texts / documentation! Al's 0024.* patches. - Documentation: added a glossary to the help module. Patch 0025.help.module.glossary.patch by Al and Michael. - Usability: first step towards unifying the terminology used in the cloud module. Patch by 0028.site.cloud.rationalize.name.patch Al. - Usability + CSS improvements: revamped the node form and removed all tables. Patch 0027.node.form.rewrite.patch by Al. - CSS improvements: patch 0026.admin.css.small.improvement.patch by Al. - Updated the MAINTAINERS file. --- modules/node.module | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 28 deletions(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index e975dc1d8..e51d0cc4c 100644 --- a/modules/node.module +++ b/modules/node.module @@ -17,7 +17,7 @@ function node_help() { $output .= "
Allow user comments
A node can have comments, which are other nodes. These comments can be written by other users (Read-write), or only by admins (Read-only).
"; $output .= "
Attributes
A way to sort nodes.
Revisions
Drupal has a revision system so that you can \"roll back\" to an older version of a node if the new version is not what you want.
"; $output .= "
Promote to front page
To get people to look at the new stuff on your site you can choose to move it to the front page.
"; - $output .= "
Approved
Drupal has a moderation system. If it is active, a node is in one of three states: approved and published, approved and unpublished, and awaiting approval. If you are not moderating a node it should be approved.
"; + $output .= "
In moderation queue
Drupal has a moderation system. If it is active, a node is in one of three states: approved and published, approved and unpublished, and awaiting approval. If you are moderating a node it should be in the moderation queue.
"; $output .= "
Votes
If you are moderating a node this counts how many votes the node has gotten. Once a node gets a certain number of vote if will either be Approved, or Dropped (To setup the number of votes needed and the promote and dump scores ". l("click here","admin/system/modules/queue") .".).
"; $output .= "
Score
The score of the node is gotten by the votes it is given.
"; $output .= "
Users
The list of users who have voted on a moderated node.
"; @@ -864,7 +864,7 @@ function node_block($op = "list", $delta = 0) { } function node_feed($nodes = 0, $channel = array()) { - global $base_url; + global $base_url, $languages; /* ** A generic function for generating RSS feeds from a set of nodes. @@ -884,14 +884,15 @@ function node_feed($nodes = 0, $channel = array()) { $items .= format_rss_item($item->title, $link, $item->teaser); } - $output .= "\n"; + $output .= "\n"; $output .= "]>\n"; // NOTE: é - for example - is the correct ISO-8859-1 translation of (e acute) but apparently XML parsers don't (have to) understand it. To solve this problem, we use a DTD that defines commonly used entity such as é. if (!$channel["version"]) $channel["version"] = "0.91"; if (!$channel["title"]) $channel["title"] = variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", ""); if (!$channel["link"]) $channel["link"] = $base_url; if (!$channel["description"]) $channel["description"] = variable_get("site_mission", ""); - if (!$channel["language"]) $channel["language"] = "en"; + foreach ($languages as $key => $value) break; + if (!$channel["language"]) $channel["language"] = $key ? $key : "en"; $output .= "\n"; $output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"]); $output .= "\n"; @@ -1050,14 +1051,37 @@ function node_form($edit, $error = NULL) { $output .= "

$help

"; } - $output .= ""; - $output .= " "; - $output .= " "; - $output .= " "; - $output .= "
"; + $output .= "
"; /* - ** Add the default fields: + ** Add the admin specific parts: */ + if (user_access("administer nodes")) { + $output .= "
"; + $output .= "
"; + $output .= form_textfield(t("Authored by"), "name", $edit->name, 20, 60, $error["name"]); + $output .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]); + $output .= "
"; + + $options .= form_checkbox(t("Published"), "status", 1, isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1)); + $options .= form_checkbox(t("In moderation queue"), "moderate", 1, isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0)); + $options .= form_checkbox(t("Promoted to front page"), "promote", 1, isset($edit->promote) ? $edit->promote : variable_get("node_promote_$edit->type", 1)); + $options .= form_checkbox(t("Static on front page"), "static", 1, isset($edit->static) ? $edit->static : variable_get("node_static_$edit->type", 0)); + $options .= form_checkbox(t("Create new revision"), "revision", 1, isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0)); + + $output .= "
"; + $output .= form_item(t("Options"), $options); + $output .= "
"; + + $extras .= implode("
", node_invoke_all($edit, "nodeapi", "form admin")); + $output .= $extras ? "
$extras
" : "
"; + } + + /* + ** Add the default fields: + */ + $output .= "
"; $output .= form_textfield(t("Title"), "title", $edit->title, 60, 64, $error["title"]); /* @@ -1105,26 +1129,7 @@ function node_form($edit, $error = NULL) { $output .= form_submit(t("Delete")); } - /* - ** Add the admin specific parts: - */ - - if (user_access("administer nodes")) { - $output .= "
"; - $output .= form_textfield(t("Authored by"), "name", $edit->name, 20, 60, $error["name"]); - $output .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]); - $output .= "
"; - $output .= form_checkbox(t("Published"), "status", 1, isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1)); - $output .= form_checkbox(t("Approved"), "moderate", 1, isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0)); - $output .= form_checkbox(t("Promoted to front page"), "promote", 1, isset($edit->promote) ? $edit->promote : variable_get("node_promote_$edit->type", 1)); - $output .= form_checkbox(t("Static on front page"), "static", 1, isset($edit->static) ? $edit->static : variable_get("node_static_$edit->type", 0)); - $output .= form_checkbox(t("Create new revision"), "revision", 1, isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0)); - $output .= implode("", node_invoke_all($edit, "nodeapi", "form admin")); - } - - $output .= "
"; + $output .= ""; return form($output, ($param["method"] ? $param["method"] : "post"), $param["action"], $param["options"]); } -- cgit v1.2.3