From 355d25e73d90f3174db459a5a380193e0505ada4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 4 Jun 2003 18:24:39 +0000 Subject: - Bugfix: renamed the SQL field 'types' to 'nodes' because 'types' is a reserved keyword in MySQL 4. This fixes critical bug #1618. Patch by Marco. ==> This fix requires to run update.php! - Bugfix: made sessions work without warnings when register_globals is turned off. The solution is to use $_SESSION instead of session_register(). This fixes critical bug #1797. Patch by Marco. - Bugfix: sometimes error messages where being discarded when previewing a node. Patch by Craig Courtney. - Bugfix: fixed charset problems. This fixes critical bug #1549. Patch '0023.charset.patch' by Al. - Code improvements: removed some dead code from the comment module. Patch by Marco. - Documentation improvements: polished the node module help texts and form descriptions. Patch '0019.node.module.help.patch' by Al. - CSS improvements all over the map! Patch '0021.more.css.patch' by Al. - GUI improvements: improved the position of Druplicon in the admin menu. Patch '0020.admin.logo.patch' by Al. - GUI improvements: new logos for theme Marvin and theme UnConeD. Logos by Kristjan Jansen. - GUI improvements: small changes to the output emitted by the profile module. Suggestions by Steven Wittens. - GUI improvements: small fixes to Xtemplate. Patch '0022.xtemplate.css.patch' by Al. TODO: - Some modules such as the buddy list module and the annotation module in the contributions repository are also using session_register(). They should be updated. We should setup a task on Drupal. - There is code emitting '
' which doesn't validate. - Does our XML feeds validate with the charset changes? - The forum module's SQL doesn't work properly on PostgreSQL. --- modules/node.module | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index 09db9f19e..e975dc1d8 100644 --- a/modules/node.module +++ b/modules/node.module @@ -4,18 +4,30 @@ function node_help() { global $mod; - $output .= "

Nodes

The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes."; - $output .= "A base node contains:"; - $output .= "Now that you know what is in a node, here are some of the types of nodes avalible:"; + $output .= "

Nodes

The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes. "; + $output .= "A base node contains:
"; + $output .= "
A Title
Up to 128 characters of text that titles the node.
"; + $output .= "
A Teaser
A small block of text that is meant to get you interested in the rest of node. Drupal automatically pulls a small amount of the body of the node to make the teaser (To configure how long the teaser will be ". l("click here","admin/system/modules/node") ."). The teaser can be changed if you don't like what Drupal grabs.
"; + $output .= "
The Body
The main text that comprises your content.
"; + $output .= "
A Type
What kind of node is this? Blog, book, forum, comment, unextended, etc.
"; + $output .= "
An Author
The author's name. It will either be \"anonymous\" or a valid user. You cannot set it to an arbitrary value.
"; + $output .= "
Authored on
The date it was written on.
"; + $output .= "
Changed
The last time this node was changed.
"; + $output .= "
Static on front page
The front page is configured to show the teasers from only a few of the total nodes you have on your site (To configure how many teasers ". l("click here","admin/system/modules/node") ."), but if you think a node is important enough that you want it to stay on the front page enable this.
"; + $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 .= "
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.
"; + $output .= "
Published
When using Drupal's moderation system a node remains unpublished -- unavaliable to non-moderators -- until it is marked Published.
"; + $output .= "

Now that you know what is in a node, here are some of the types of nodes available.

"; if ($mod == "admin") { foreach (module_list() as $name) { if (module_hook($name, "node") && $name != "node") { - $output .= "

". t("%module type", array("%module" => ucfirst(module_invoke($name, "node", "name")))). "

"; + $output .= "

". t("Node type: %module", array("%module" => module_invoke($name, "node", "name"))). "

"; $output .= module_invoke($name, "help"); } @@ -461,7 +473,7 @@ function node_search($keys) { } function node_settings() { - $output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display on overview pages such as the main page.")); + $output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display per page on overview pages such as the main page.")); $output .= form_select(t("Length of trimmed posts"), "teaser_length", variable_get("teaser_length", 600), array(0 => t("Unlimited"), 200 => t("200 characters"), 400 => t("400 characters"), 600 => t("600 characters"), 800 => t("800 characters"), 1000 => t("1000 characters"), 1200 => t("1200 characters"), 1400 => t("1400 characters"), 1600 => t("1600 characters"), 1800 => t("1800 characters"), 2000 => t("2000 characters")), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'.")); $output .= form_select(t("Preview post"), "node_preview", variable_get("node_preview", 0), array(t("Optional"), t("Required")), t("Must users preview posts before submitting?")); return $output; @@ -469,7 +481,7 @@ function node_settings() { function node_conf_filters() { $output .= form_select(t("Filter HTML tags"), "filter_html", variable_get("filter_html", 0), array(t("Disabled"), t("Enabled")), t("Filter HTML and PHP tags in user-contributed content.")); - $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "