Commit de3b0796 authored by Dries's avatar Dries

- 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.
parent 355d25e7
......@@ -17,11 +17,7 @@ LEGEND
--------------------------------------------------------------------------------
BLOCK SYSTEM
M: Kjartan Mannes <kjartan@drop.org>
S: maintained
BLOGGER API MODULE
M: Greg Tyrelle <greg@nodalpoint.org>
M: Kjartan Mannes <kjartan@drupal.org>
S: maintained
CODING STYLE CHECKER
......@@ -37,7 +33,11 @@ M: Marco Molinari <marco@porciletto.org>
S: maintained
POLL MODULE
M: Steven Wittens <unconed@drop.org>
M: Alastair Maw <me@almaw.com>
S: maintained
LANGUAGE
M: Alastair Maw <me@almaw.com>
S: maintained
MSSQL PORT
......@@ -48,10 +48,6 @@ POSTGRES PORT
M: James Arthur <j_a_arthur@yahoo.com>
S: maintained
SEARCH MODULE
M: Simon Lindsay <simon@iseek.ws>
S: maintained
STATISTICS MODULE
M: Jeremy Andrews <jeremy@kerneltrap.com>
S: maintained
......@@ -60,10 +56,6 @@ TAXONOMY SYSTEM
M: Marco Molinari <marco@porciletto.org>
S: maintained
THEME GOOFY, THEME UNCONED
M: Steven Wittens <unconed@drop.org>
S: maintained
USER SYSTEM
M: Moshe Weitzman <weitzman@tejasa.com>
S: maintained
......
......@@ -207,6 +207,10 @@ function variable_del($name) {
unset($conf[$name]);
}
function drupal_specialchars($input) {
return htmlspecialchars($input, ENT_NOQUOTES, variable_get("site_charset", "iso-8859-1"));
}
function table_cell($cell, $header = 0) {
if (is_array($cell)) {
$data = $cell["data"];
......@@ -472,7 +476,7 @@ function referer_load() {
}
function check_form($text) {
return htmlspecialchars($text);
return drupal_specialchars($text);
}
function check_query($text) {
......@@ -603,12 +607,12 @@ function format_rss_channel($title, $link, $description, $items, $language = "en
// arbitrary elements may be added using the $args associative array
$output .= "<channel>\n";
$output .= " <title>". htmlspecialchars(strip_tags($title)) ."</title>\n";
$output .= " <link>". htmlspecialchars(strip_tags($link)) ."</link>\n";
$output .= " <description>". htmlspecialchars($description) ."</description>\n";
$output .= " <language>". htmlspecialchars(strip_tags($language)) ."</language>\n";
$output .= " <title>". drupal_specialchars(strip_tags($title)) ."</title>\n";
$output .= " <link>". drupal_specialchars(strip_tags($link)) ."</link>\n";
$output .= " <description>". drupal_specialchars($description) ."</description>\n";
$output .= " <language>". drupal_specialchars(strip_tags($language)) ."</language>\n";
foreach ($args as $key => $value) {
$output .= "<$key>". htmlspecialchars(strip_tags($value)) ."</$key>";
$output .= "<$key>". drupal_specialchars(strip_tags($value)) ."</$key>";
}
$output .= $items;
$output .= "</channel>\n";
......@@ -620,11 +624,11 @@ function format_rss_item($title, $link, $description, $args = array()) {
// arbitrary elements may be added using the $args associative array
$output .= "<item>\n";
$output .= " <title>". htmlspecialchars(strip_tags($title)) ."</title>\n";
$output .= " <link>". htmlspecialchars(strip_tags($link)) ."</link>\n";
$output .= " <description>". htmlspecialchars(check_output($description)) ."</description>\n";
$output .= " <title>". drupal_specialchars(strip_tags($title)) ."</title>\n";
$output .= " <link>". drupal_specialchars(strip_tags($link)) ."</link>\n";
$output .= " <description>". drupal_specialchars(check_output($description)) ."</description>\n";
foreach ($args as $key => $value) {
$output .= "<$key>". htmlspecialchars(strip_tags($value)) ."</$key>";
$output .= "<$key>". drupal_specialchars(strip_tags($value)) ."</$key>";
}
$output .= "</item>\n";
......@@ -805,16 +809,19 @@ function form_checkbox($title, $name, $value = 1, $checked = 0, $description = 0
}
function form_textfield($title, $name, $value, $size, $maxlength, $description = 0) {
return form_item($title, "<input maxlength=\"$maxlength\" class=\"form-text\" name=\"edit[$name]\" size=\"$size\" value=\"". check_form($value) ."\" />", $description);
$size = $size ? " size=\"$size\"" : "";
return form_item($title, "<input maxlength=\"$maxlength\" class=\"form-text\" name=\"edit[$name]\"$size value=\"". check_form($value) ."\" />", $description);
}
function form_password($title, $name, $value, $size, $maxlength, $description = 0) {
return form_item($title, "<input type=\"password\" class=\"form-password\" maxlength=\"$maxlength\" name=\"edit[$name]\" size=\"$size\" value=\"". check_form($value) ."\" />", $description);
$size = $size ? " size=\"$size\"" : "";
return form_item($title, "<input type=\"password\" class=\"form-password\" maxlength=\"$maxlength\" name=\"edit[$name]\"$size value=\"". check_form($value) ."\" />", $description);
}
function form_textarea($title, $name, $value, $cols, $rows, $description = 0) {
$cols = $cols ? " cols=\"$cols\"" : "";
module_invoke_all("textarea", $name); // eg. optionally plug in a WYSIWYG editor
return form_item($title, "<textarea wrap=\"virtual\" cols=\"$cols\" rows=\"$rows\" name=\"edit[$name]\" id=\"edit[$name]\">". check_form($value) ."</textarea>", $description);
return form_item($title, "<textarea wrap=\"virtual\"$cols rows=\"$rows\" name=\"edit[$name]\" id=\"edit[$name]\">". check_form($value) ."</textarea>", $description);
}
function form_select($title, $name, $value, $options, $description = 0, $extra = 0, $multiple = 0) {
......@@ -826,6 +833,15 @@ function form_select($title, $name, $value, $options, $description = 0, $extra =
}
}
function form_radios($title, $name, $value, $options, $description = 0) {
if (count($options) > 0) {
foreach ($options as $key=>$choice) {
$output .= form_radio($choice, $name, $key, ($key == $value));
}
return form_item($title, $output, $description);
}
}
function form_file($title, $name, $size, $description = 0) {
return form_item($title, "<input type=\"file\" class=\"form-file\" name=\"edit[$name]\" size=\"$size\" />\n", $description);
}
......@@ -1000,7 +1016,7 @@ function drupal_page_footer() {
set_error_handler("error_handler");
// spit out the correct charset http header
header("Content-Type: text/html; charset=". variable_get("charset", "iso-8859-1"));
header("Content-Type: text/html; charset=". variable_get("site_charset", "iso-8859-1"));
// initialize installed modules:
module_init();
......
......@@ -22,14 +22,14 @@ h2 {
font-weight: bold;
color: #006;
margin: 0;
padding: 0 0 .5em 0;
padding: 0 0 0.5em 0;
}
h3 {
font-size: 1.2em;
font-weight: bold;
color: #006;
margin: 0;
padding: 0 0 .5em 0;
padding: 1em 0 0 0;
}
table {
border-collapse: collapse;
......@@ -127,3 +127,22 @@ dd {
#update {
padding: 1em 1em 1em 1em;
}
.node-form .admin {
float: none; width: auto; margin-top: 0;
}
.node-form .standard {
margin-right: 0;
clear: both;
}
.node-form .admin .form-item .title {
margin-top: 0;
}
.node-form .admin .authored .form-item {
margin-bottom: 1.1em;
}
.node-form .admin .authored, .node-form .admin .options, .node-form .admin .extra {
float: left; margin-right: 2em; margin-bottom: 1em;
}
.node-form .admin .form-item .form-text {
width: auto;
}
......@@ -706,13 +706,13 @@ function import_page_fd() {
$result = db_query("SELECT * FROM feed ORDER BY title");
$output .= "<?xml version=\"1.0\"?>\n\n";
$output .= "<?xml version=\"1.0\" encoding=\"". variable_get("site_charset", "iso-8859-1") ."\"?>\n\n";
$output .= "<rssfeeds version=\"0.1\">\n\n";
while ($feed = db_fetch_object($result)) {
$output .= "<channel>\n";
$output .= " <title>". htmlspecialchars($feed->title) ."</title>\n";
$output .= " <link>". htmlspecialchars($feed->url) ."</link>\n";
$output .= " <title>". drupal_specialchars($feed->title) ."</title>\n";
$output .= " <link>". drupal_specialchars($feed->url) ."</link>\n";
$output .= "</channel>\n\n";
}
......
......@@ -706,13 +706,13 @@ function import_page_fd() {
$result = db_query("SELECT * FROM feed ORDER BY title");
$output .= "<?xml version=\"1.0\"?>\n\n";
$output .= "<?xml version=\"1.0\" encoding=\"". variable_get("site_charset", "iso-8859-1") ."\"?>\n\n";
$output .= "<rssfeeds version=\"0.1\">\n\n";
while ($feed = db_fetch_object($result)) {
$output .= "<channel>\n";
$output .= " <title>". htmlspecialchars($feed->title) ."</title>\n";
$output .= " <link>". htmlspecialchars($feed->url) ."</link>\n";
$output .= " <title>". drupal_specialchars($feed->title) ."</title>\n";
$output .= " <link>". drupal_specialchars($feed->url) ."</link>\n";
$output .= "</channel>\n\n";
}
......
......@@ -18,7 +18,7 @@ function blog_node($field) {
global $user;
$info["name"] = t("personal blog entry");
$info["description"] = t("A blog is a regularly updated web page that is similar to a diary -- that (generally) anyone in the world can see. It is made up of individual entries, often called posts, that are time stamped and typically arranged by the day, with the newest on top (a diary is the reverse). Blogs often contain links to things you've seen, or on which you agree/disagree. Some blogs also contain original material written solely for the blog. Since a Blog is personal, you and only you have full control on what you publish. The most interesting blog entries or those blog entries that fit the site's topic well might get promoted to the front page by the community or the people with access to do this.");
$info["description"] = t("A blog is a regularly updated journal made up of individual entries, often called posts, that are time stamped and typically arranged by the day, with the newest on top (a diary is the reverse). They tend to be quite personal, often containing links to things you've seen, or to editorials that you find interesting. Some blogs also contain original material written solely for the blog. Since a Blog is personal, you and only you have full control over what you publish. The most interesting blog entries or those blog entries that fit the site's topic well might get promoted to the front page by the community or by users with the access do this.");
return $info[$field];
}
......@@ -71,10 +71,10 @@ function blog_user($type, &$edit, &$user) {
}
function blog_help() {
$output .= "<p>Drupal's blog module allows registered users to maintain an online weblog (commonly known as a blog), often referred to as an online journal or diary. They can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.";
$output .= " Blogs made up of individual entries, nodes, that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen, or agree/disagree with. A typical example of a long term blog can be seen at <a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>.</p>";
$output .= "<p>The blog module adds a couple of menu options. \"user blogs\", a page that everyone gets to see that displays the most recent blog entries from every participant. Your personal menu adds a \"create a blog entry\" link which takes you to a submission form, a \"view personal blog\" link which displays your blog entries as <i>other</i> people will see them. And, on the bottom of each of your blog entry, there is an \"edit this blog entry\" link that lets you edit or delete old entries.</p>";
$output .= "<p>In the import module (news aggregator) a glyph that looks like a pinboard stickit note is displayed. Click on this and you are taken to the blog submission form. The system helpfully copies the title, a link to the item, and a link to the source into the body text ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site.</p>";
$output .= "<p>Drupal's blog module allows registered users to maintain an online weblog (commonly known as a blog), often referred to as an online journal or diary. These can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.</p>";
$output .= "<p>Blogs are made up of individual entries (nodes) that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen, or agree/disagree with. A typical example of a long term blog can be seen at <a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>.</p>";
$output .= "<p>The blog module adds a \"user blogs\" navigation link to the site, which takes any visitor to a page that displays the most recent blog entries from all the users on the site. Personal user menus gain a \"create a blog entry\" link (which takes you to a submission form) and a \"view personal blog\" link (which displays your blog entries as other people will see them). On the bottom of each of your own blog entries, there is an \"edit this blog entry\" link that lets you edit or delete that entry.</p>";
$output .= "<p>If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link <b>(b)</b> next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.</p>";
return t($output);
......
......@@ -18,7 +18,7 @@ function blog_node($field) {
global $user;
$info["name"] = t("personal blog entry");
$info["description"] = t("A blog is a regularly updated web page that is similar to a diary -- that (generally) anyone in the world can see. It is made up of individual entries, often called posts, that are time stamped and typically arranged by the day, with the newest on top (a diary is the reverse). Blogs often contain links to things you've seen, or on which you agree/disagree. Some blogs also contain original material written solely for the blog. Since a Blog is personal, you and only you have full control on what you publish. The most interesting blog entries or those blog entries that fit the site's topic well might get promoted to the front page by the community or the people with access to do this.");
$info["description"] = t("A blog is a regularly updated journal made up of individual entries, often called posts, that are time stamped and typically arranged by the day, with the newest on top (a diary is the reverse). They tend to be quite personal, often containing links to things you've seen, or to editorials that you find interesting. Some blogs also contain original material written solely for the blog. Since a Blog is personal, you and only you have full control over what you publish. The most interesting blog entries or those blog entries that fit the site's topic well might get promoted to the front page by the community or by users with the access do this.");
return $info[$field];
}
......@@ -71,10 +71,10 @@ function blog_user($type, &$edit, &$user) {
}
function blog_help() {
$output .= "<p>Drupal's blog module allows registered users to maintain an online weblog (commonly known as a blog), often referred to as an online journal or diary. They can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.";
$output .= " Blogs made up of individual entries, nodes, that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen, or agree/disagree with. A typical example of a long term blog can be seen at <a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>.</p>";
$output .= "<p>The blog module adds a couple of menu options. \"user blogs\", a page that everyone gets to see that displays the most recent blog entries from every participant. Your personal menu adds a \"create a blog entry\" link which takes you to a submission form, a \"view personal blog\" link which displays your blog entries as <i>other</i> people will see them. And, on the bottom of each of your blog entry, there is an \"edit this blog entry\" link that lets you edit or delete old entries.</p>";
$output .= "<p>In the import module (news aggregator) a glyph that looks like a pinboard stickit note is displayed. Click on this and you are taken to the blog submission form. The system helpfully copies the title, a link to the item, and a link to the source into the body text ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site.</p>";
$output .= "<p>Drupal's blog module allows registered users to maintain an online weblog (commonly known as a blog), often referred to as an online journal or diary. These can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.</p>";
$output .= "<p>Blogs are made up of individual entries (nodes) that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen, or agree/disagree with. A typical example of a long term blog can be seen at <a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>.</p>";
$output .= "<p>The blog module adds a \"user blogs\" navigation link to the site, which takes any visitor to a page that displays the most recent blog entries from all the users on the site. Personal user menus gain a \"create a blog entry\" link (which takes you to a submission form) and a \"view personal blog\" link (which displays your blog entries as other people will see them). On the bottom of each of your own blog entries, there is an \"edit this blog entry\" link that lets you edit or delete that entry.</p>";
$output .= "<p>If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link <b>(b)</b> next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.</p>";
return t($output);
......
......@@ -748,16 +748,16 @@ function book_admin() {
}
function book_help() {
$output .= "<p>The <i>collaborative book</i> is a magnificient mechanism for organizing content authored by many users. You may use it to organize a manual, to <a href=\"#faq\">maintain a FAQ</a>, or to manage any outline-like content. Books can have chapters, sections, etc. In fact, books can have an arbitrarily deep nesting strucuture.</p>";
$output .= "<p>Under the covers, a book is only an organization of nodes. These nodes are often of type <i>book page</i>, but can be of any content type. Every node in the book has a <i>Parent</i>. The parent is the node which \"contains\" the child node. This is how book.module establishes its hierarchy. On any given level in the hierarchy, a book can contain many nodes. Book uses the Weight field to order these sibling nodes.</p>";
$output .= "<p>Book pages are a special, powerful node type. These nodes are specifically designed to be included in a book. Their special power comes from the abilility to embed PHP within the body of the page. This capability is only offerred to administrators, since malicious users could abuse this power. In addiiton, book pages contain a <i>log message</i> field which helps your users understand the motivation behind an edit of a book page. Each edited version of a book page is usually stored as a new revision of a node. This capability makes it easy to revert to an old version of a page, should that become desirable.</p>";
$output .= "<p>The <i>collaborative book</i> organises content into a nested hierarchical structure. It is particularly good for manuals, <a href=\"#faq\">FAQ</a>s and the like, allowing you to have chapters, sections, etc.</p>";
$output .= "<p>A book is simply a collection of nodes that have been linked together. These nodes are usually of type <i>book page</i>, but you can make insert nodes of any type into a book outline. Every node in the book has a <i>parent</i> node which \"contains\" it. This is how book.module establishes its hierarchy. At any given level in the hierarchy, a book can contain many nodes. All these sibling nodes are sorted according to the <i>weight</i> that you give them.</p>";
$output .= "<p>A book page is a special node type that allows you to embed PHP within the body of the page. This capability is only offerred to administrators, since malicious users could abuse this power. In addiiton, book pages contain a <i>log message</i> field which helps your users understand the motivation behind an edit of a book page. Each edited version of a book page is stored as a new revision of a node. This capability makes it easy to revert to an old version of a page, should that be desirable.</p>";
$output .= "<p>Like other node types, book submissions and edits may be subject to moderation, depending on your configuration. Similarly, books use ". l("permissions", "admin/user/permission") ." to determine who may read and write to them. Only administrators are allowed to create new books, which are really just nodes whose parent is <i>&lt;root&gt;</i>. To include an existing node in your book, click on the \"administer\"-link in that node. At the bottom of this administration page, click on the <i>edit book outline</i> button. This enables you to place the node wherever you'd like within the book hierarchy. To add a new node into your book, use the <i>create book page</i> link.</p>";
$output .= "<p>Administrators may review the hierarchy of their books by clicking on the ". l("collaborative book", "admin/node/book")." link in the adminstration pages. There, nodes may be edited, reorganized, removed from book, and deleted. This behavior may change in the future. When a parent node is deleted, he may leave behind child nodes. These nodes are now <i>orphans</i>. Administrators should periodically ". l("review their books for orphans", "admin/node/book/orphan") ." and reaffiliate those pages as desired. Finally, administrators may also ". l("export their books", "book/print") ." to a single, flat HTML page which is suitable for printing.</p>";
$output .= "<a name=\"faq\"></a><h3>Maintain a FAQ using a collaborative book</h3>";
$output .= "<p>The collaborative book (i.e. <code>book.module</code>) in Drupal is a terrific way to easily manage an FAQ (Frequently Asked Questions) section of your web site. The main benefit for an administrator is that you don't have to write all the questions/answers by yourself. Let the community do it for you!</p>";
$output .= "<p>In order to setup the FAQ, you have to create a new <i>Book</i> which will hold all your content. To do so, click on <i>Create Book Page</i> in your user box. Give it a thoughtful Title, and Body. A title like \"Estonia Travel - FAQ\" is nice. You may always edit these fields later. You will probably want to designate <i>&lt;root&gt;</i> as the parent of this page. Leave the <i>log message</i> and <i>type</i> fields blank for now. After you have submitted this book page, you are ready to begin filling up your book with questions that are frequently asked.</p>";
$output .= "<a name=\"faq\"></a><h3>Maintain an FAQ using a collaborative book</h3>";
$output .= "<p>Collaborative books let you easily set up a Frequently Asked Questions section on your web site. The main benefit is that you don't have to write all the questions/answers by yourself - let the community do it for you!</p>";
$output .= "<p>In order to set up the FAQ, you have to create a new book which will hold all your content. To do so, click on <i>create book page</i> in your user box. Give it a thoughtful title, and body. A title like \"Estonia Travel - FAQ\" is nice. You may always edit these fields later. You will probably want to designate <i>&lt;root&gt;</i> as the parent of this page. Leave the <i>log message</i> and <i>type</i> fields blank for now. After you have submitted this book page, you are ready to begin filling up your book with questions that are frequently asked.</p>";
$output .= "<p>Whenever you come across a post which you want to include in your FAQ, click on the <i>administer</i> link. Then click on the <i>edit book outline</i> button at the bottom of the page. Then place the relevant post wherever is most appropriate in your book by selecting a <i>parent</i>. Books are quite flexible. They can have sections like <i>Flying to Estonia</i>, <i>Eating in Estonia</i> and so on. As you get more experienced with the <i>collaborative book</i>, you can reorganize posts in your book so that it stays organized.</p>";
$output .= "<p>Notes:</p><ul><li>Any comments attached to those relevant posts which you designate as book pages will also be transported into your book. This is a great feature, since much wisdom is shared via comments. And remember that all future comments and edits will automatically be reflected in your book.</li><li>You may wish to edit the title and teaser of posts when adding them to your FAQ. This is done on the same page as the <i>Edit book outline</i> button. Clear titles help users navigate quickly to the information that they seek.</li><li>Book pages may come from any content type (blog, story, page, etc.). If you are creating a post solely for inclusion in your book, then use the <i>Create book page</i> link.</li><li>If you don't see the <i>administer</i> link, then you probably have insufficient ". l("permissions", "admin/user/permission") .".</li><li>If you want to get really fancy, note that Books are one of the few content types which allow raw PHP in their <i>body</i>. So you've got lots of geeky possibilities there.</li></ul>";
$output .= "<p>Notes:</p><ul><li>Any comments attached to those relevant posts which you designate as book pages will also be transported into your book. This is a great feature, since much wisdom is shared via comments. Remember that all future comments and edits will automatically be reflected in your book.</li><li>You may wish to edit the title of posts when adding them to your FAQ. This is done on the same page as the <i>Edit book outline</i> button. Clear titles improve navigability enormously.</li><li>Book pages may come from any content type (blog, story, page, etc.). If you are creating a post solely for inclusion in your book, then use the <i>Create book page</i> link.</li><li>If you don't see the <i>administer</i> link, then you probably have insufficient ". l("permissions", "admin/user/permission") .".</li><li>If you want to get really fancy, note that books are one of the few content types which allow raw PHP in their <i>body</i>. So you've got lots of geeky possibilities there.</li></ul>";
return t($output);
}
......
......@@ -748,16 +748,16 @@ function book_admin() {
}
function book_help() {
$output .= "<p>The <i>collaborative book</i> is a magnificient mechanism for organizing content authored by many users. You may use it to organize a manual, to <a href=\"#faq\">maintain a FAQ</a>, or to manage any outline-like content. Books can have chapters, sections, etc. In fact, books can have an arbitrarily deep nesting strucuture.</p>";
$output .= "<p>Under the covers, a book is only an organization of nodes. These nodes are often of type <i>book page</i>, but can be of any content type. Every node in the book has a <i>Parent</i>. The parent is the node which \"contains\" the child node. This is how book.module establishes its hierarchy. On any given level in the hierarchy, a book can contain many nodes. Book uses the Weight field to order these sibling nodes.</p>";
$output .= "<p>Book pages are a special, powerful node type. These nodes are specifically designed to be included in a book. Their special power comes from the abilility to embed PHP within the body of the page. This capability is only offerred to administrators, since malicious users could abuse this power. In addiiton, book pages contain a <i>log message</i> field which helps your users understand the motivation behind an edit of a book page. Each edited version of a book page is usually stored as a new revision of a node. This capability makes it easy to revert to an old version of a page, should that become desirable.</p>";
$output .= "<p>The <i>collaborative book</i> organises content into a nested hierarchical structure. It is particularly good for manuals, <a href=\"#faq\">FAQ</a>s and the like, allowing you to have chapters, sections, etc.</p>";
$output .= "<p>A book is simply a collection of nodes that have been linked together. These nodes are usually of type <i>book page</i>, but you can make insert nodes of any type into a book outline. Every node in the book has a <i>parent</i> node which \"contains\" it. This is how book.module establishes its hierarchy. At any given level in the hierarchy, a book can contain many nodes. All these sibling nodes are sorted according to the <i>weight</i> that you give them.</p>";
$output .= "<p>A book page is a special node type that allows you to embed PHP within the body of the page. This capability is only offerred to administrators, since malicious users could abuse this power. In addiiton, book pages contain a <i>log message</i> field which helps your users understand the motivation behind an edit of a book page. Each edited version of a book page is stored as a new revision of a node. This capability makes it easy to revert to an old version of a page, should that be desirable.</p>";
$output .= "<p>Like other node types, book submissions and edits may be subject to moderation, depending on your configuration. Similarly, books use ". l("permissions", "admin/user/permission") ." to determine who may read and write to them. Only administrators are allowed to create new books, which are really just nodes whose parent is <i>&lt;root&gt;</i>. To include an existing node in your book, click on the \"administer\"-link in that node. At the bottom of this administration page, click on the <i>edit book outline</i> button. This enables you to place the node wherever you'd like within the book hierarchy. To add a new node into your book, use the <i>create book page</i> link.</p>";
$output .= "<p>Administrators may review the hierarchy of their books by clicking on the ". l("collaborative book", "admin/node/book")." link in the adminstration pages. There, nodes may be edited, reorganized, removed from book, and deleted. This behavior may change in the future. When a parent node is deleted, he may leave behind child nodes. These nodes are now <i>orphans</i>. Administrators should periodically ". l("review their books for orphans", "admin/node/book/orphan") ." and reaffiliate those pages as desired. Finally, administrators may also ". l("export their books", "book/print") ." to a single, flat HTML page which is suitable for printing.</p>";
$output .= "<a name=\"faq\"></a><h3>Maintain a FAQ using a collaborative book</h3>";
$output .= "<p>The collaborative book (i.e. <code>book.module</code>) in Drupal is a terrific way to easily manage an FAQ (Frequently Asked Questions) section of your web site. The main benefit for an administrator is that you don't have to write all the questions/answers by yourself. Let the community do it for you!</p>";
$output .= "<p>In order to setup the FAQ, you have to create a new <i>Book</i> which will hold all your content. To do so, click on <i>Create Book Page</i> in your user box. Give it a thoughtful Title, and Body. A title like \"Estonia Travel - FAQ\" is nice. You may always edit these fields later. You will probably want to designate <i>&lt;root&gt;</i> as the parent of this page. Leave the <i>log message</i> and <i>type</i> fields blank for now. After you have submitted this book page, you are ready to begin filling up your book with questions that are frequently asked.</p>";
$output .= "<a name=\"faq\"></a><h3>Maintain an FAQ using a collaborative book</h3>";
$output .= "<p>Collaborative books let you easily set up a Frequently Asked Questions section on your web site. The main benefit is that you don't have to write all the questions/answers by yourself - let the community do it for you!</p>";
$output .= "<p>In order to set up the FAQ, you have to create a new book which will hold all your content. To do so, click on <i>create book page</i> in your user box. Give it a thoughtful title, and body. A title like \"Estonia Travel - FAQ\" is nice. You may always edit these fields later. You will probably want to designate <i>&lt;root&gt;</i> as the parent of this page. Leave the <i>log message</i> and <i>type</i> fields blank for now. After you have submitted this book page, you are ready to begin filling up your book with questions that are frequently asked.</p>";
$output .= "<p>Whenever you come across a post which you want to include in your FAQ, click on the <i>administer</i> link. Then click on the <i>edit book outline</i> button at the bottom of the page. Then place the relevant post wherever is most appropriate in your book by selecting a <i>parent</i>. Books are quite flexible. They can have sections like <i>Flying to Estonia</i>, <i>Eating in Estonia</i> and so on. As you get more experienced with the <i>collaborative book</i>, you can reorganize posts in your book so that it stays organized.</p>";
$output .= "<p>Notes:</p><ul><li>Any comments attached to those relevant posts which you designate as book pages will also be transported into your book. This is a great feature, since much wisdom is shared via comments. And remember that all future comments and edits will automatically be reflected in your book.</li><li>You may wish to edit the title and teaser of posts when adding them to your FAQ. This is done on the same page as the <i>Edit book outline</i> button. Clear titles help users navigate quickly to the information that they seek.</li><li>Book pages may come from any content type (blog, story, page, etc.). If you are creating a post solely for inclusion in your book, then use the <i>Create book page</i> link.</li><li>If you don't see the <i>administer</i> link, then you probably have insufficient ". l("permissions", "admin/user/permission") .".</li><li>If you want to get really fancy, note that Books are one of the few content types which allow raw PHP in their <i>body</i>. So you've got lots of geeky possibilities there.</li></ul>";
$output .= "<p>Notes:</p><ul><li>Any comments attached to those relevant posts which you designate as book pages will also be transported into your book. This is a great feature, since much wisdom is shared via comments. Remember that all future comments and edits will automatically be reflected in your book.</li><li>You may wish to edit the title of posts when adding them to your FAQ. This is done on the same page as the <i>Edit book outline</i> button. Clear titles improve navigability enormously.</li><li>Book pages may come from any content type (blog, story, page, etc.). If you are creating a post solely for inclusion in your book, then use the <i>Create book page</i> link.</li><li>If you don't see the <i>administer</i> link, then you probably have insufficient ". l("permissions", "admin/user/permission") .".</li><li>If you want to get really fancy, note that books are one of the few content types which allow raw PHP in their <i>body</i>. So you've got lots of geeky possibilities there.</li></ul>";
return t($output);
}
......
......@@ -42,11 +42,11 @@ function cloud_link($type) {
}
if ($type == "admin" && user_access("administer site cloud")) {
$help["general"] = t("The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content. To get the blogroll to work you <b>must</b> setup cron support. To get the blogroll block to display you must turn on the <a href=\"%block\">Site cloud block</a>. To go to a monitored site, click on the site name, to load and/or update the blogroll for that site immediately click on \"update site\", to delete the site go to \"edit site\". ", array("%block" => url("admin/block")));
$help["add"] = t("Add a site too the blogroll. Don't forget the \"http://\" for your URLs.");
$help["general"] = t("The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content. To get the blogroll to work you <b>must</b> setup cron support. To get the site cloud block to display you must turn on the <a href=\"%block\">Site cloud block</a>. To go to a monitored site, click on the site name, to load and/or update the record for that site immediately click on \"update site\", to delete the site go to \"edit site\". ", array("%block" => url("admin/block")));
$help["add"] = t("Add a site to the site cloud. Don't forget the \"http://\" for your URLs.");
menu("admin/syndication", "content syndication", NULL, NULL, 5);
menu("admin/syndication/cloud", "blogrolling", "cloud_admin", $help["general"]);
menu("admin/syndication/cloud", "site cloud", "cloud_admin", $help["general"]);
menu("admin/syndication/cloud/add", "add new site", "cloud_admin", $help["add"]);
menu("admin/syndication/cloud/help", "help", "cloud_help", NULL, 9);
}
......
......@@ -714,9 +714,9 @@ function _forum_get_topic_order($sortby) {
}
function forum_help() {
$output .= "<h3>Creating a forum</h3><p>Drupal lets you set up a countless number of forums by using the powerful taxonomy module. Therefore to create a forum you first have to create a ". l("taxonomy vocuabulary", "admin/taxonomy/add/vocabulary") ." and ". l("add some terms", "admin/taxonomy") ." to it; each term will become a forum. Choose a name for the vocabulary (examples: forum, message boards, or debates), and make sure under \"Types\" that forum is selected. Nothing else needs to be configured, so unless you have more advanced needs save the vocabulary. Now ". l("add a term", "admin/taxonomy") ." to the vocabulary just created (examples: general, off topic, support), and a description to make it clear to the users what the forum is about. Each term become a forum. Continue creating fora by adding terms until you are satisfied.";
$output .= "<p>Once a vocabulary is entered go to ". l("site configuration &raquo; modules &raquo; forum","admin/system/modules/forum") ." and set the <b>Forum vocabulary</b> (don't forget to save). There will now be fora active on the site. For users to access them they must have the \"access content\" permission and to create a topic they must have \"create forum topics\" permission. The permissions can be set in the ". l("user management", "admin/user/permission") ." pages.</p>";
$output .= "<h3>Containers</h3><p>By designating a forum as a <i>container</i>, users are not allowed to post into that forum. The forum will be visible on the forum listing page, so it acts as a section delimiter if you will. This is useful if you have a lots of forums which are nested. For example,</p>";
$output .= "<h3>Creating a forum</h3><p>The forum module uses taxonomy to organize itself. To create a forum you first have to create a ". l("taxonomy vocuabulary", "admin/taxonomy/add/vocabulary") ." When doing this, choose a sensible name for it (such as \"fora\") and make sure under \"Types\" that \"forum\" is selected. Once you have done this, ". l("add some terms", "admin/taxonomy") ." to it. Each term will become a forum. If you fill in the description field, users will be given additonal information about the forum on the main forum page. For example: \"troubleshooting\" - \"Please ask your questions here.\"</p>";
$output .= "<p>When you are happy with your vocabulary, go to ". l("site configuration &raquo; modules &raquo; forum","admin/system/modules/forum") ." and set <b>Forum vocabulary</b> to the one you have just created. There will now be fora active on the site. For users to access them they must have the \"access content\" permission and to create a topic they must have ithe \"create forum topics\" permission. These permissions can be set in the ". l("user management", "admin/user/permission") ." pages.</p>";
$output .= "<h3>Containers</h3><p>If you designate a forum as a <i>container</i>, users will not be able to post to it. The forum will be visible on the forum listing page, so it acts as a section delimiter if you will. This is useful if you have a lots of forums which are nested. For example,</p>";
$output .= "<p>Marketing<br />-- Market research<br />-- Brand management<br /><br />Sales<br />-- Closing the deal<br />-- Avoiding ear and throat pain</p>";
$output .= "<p>If you don't want people posting into the Marketing or Sales folders, you designate them as Containers.</p>";
$output .= "<h4>Icons</h4><p>To disable icons, set the icon path as blank in ". l("site configuration &raquo; modules &raquo; forums","admin/system/module/forum") ."</p>";
......
......@@ -714,9 +714,9 @@ function _forum_get_topic_order($sortby) {
}
function forum_help() {
$output .= "<h3>Creating a forum</h3><p>Drupal lets you set up a countless number of forums by using the powerful taxonomy module. Therefore to create a forum you first have to create a ". l("taxonomy vocuabulary", "admin/taxonomy/add/vocabulary") ." and ". l("add some terms", "admin/taxonomy") ." to it; each term will become a forum. Choose a name for the vocabulary (examples: forum, message boards, or debates), and make sure under \"Types\" that forum is selected. Nothing else needs to be configured, so unless you have more advanced needs save the vocabulary. Now ". l("add a term", "admin/taxonomy") ." to the vocabulary just created (examples: general, off topic, support), and a description to make it clear to the users what the forum is about. Each term become a forum. Continue creating fora by adding terms until you are satisfied.";
$output .= "<p>Once a vocabulary is entered go to ". l("site configuration &raquo; modules &raquo; forum","admin/system/modules/forum") ." and set the <b>Forum vocabulary</b> (don't forget to save). There will now be fora active on the site. For users to access them they must have the \"access content\" permission and to create a topic they must have \"create forum topics\" permission. The permissions can be set in the ". l("user management", "admin/user/permission") ." pages.</p>";
$output .= "<h3>Containers</h3><p>By designating a forum as a <i>container</i>, users are not allowed to post into that forum. The forum will be visible on the forum listing page, so it acts as a section delimiter if you will. This is useful if you have a lots of forums which are nested. For example,</p>";
$output .= "<h3>Creating a forum</h3><p>The forum module uses taxonomy to organize itself. To create a forum you first have to create a ". l("taxonomy vocuabulary", "admin/taxonomy/add/vocabulary") ." When doing this, choose a sensible name for it (such as \"fora\") and make sure under \"Types\" that \"forum\" is selected. Once you have done this, ". l("add some terms", "admin/taxonomy") ." to it. Each term will become a forum. If you fill in the description field, users will be given additonal information about the forum on the main forum page. For example: \"troubleshooting\" - \"Please ask your questions here.\"</p>";
$output .= "<p>When you are happy with your vocabulary, go to ". l("site configuration &raquo; modules &raquo; forum","admin/system/modules/forum") ." and set <b>Forum vocabulary</b> to the one you have just created. There will now be fora active on the site. For users to access them they must have the \"access content\" permission and to create a topic they must have ithe \"create forum topics\" permission. These permissions can be set in the ". l("user management", "admin/user/permission") ." pages.</p>";
$output .= "<h3>Containers</h3><p>If you designate a forum as a <i>container</i>, users will not be able to post to it. The forum will be visible on the forum listing page, so it acts as a section delimiter if you will. This is useful if you have a lots of forums which are nested. For example,</p>";
$output .= "<p>Marketing<br />-- Market research<br />-- Brand management<br /><br />Sales<br />-- Closing the deal<br />-- Avoiding ear and throat pain</p>";
$output .= "<p>If you don't want people posting into the Marketing or Sales folders, you designate them as Containers.</p>";
$output .= "<h4>Icons</h4><p>To disable icons, set the icon path as blank in ". l("site configuration &raquo; modules &raquo; forums","admin/system/module/forum") ."</p>";
......
......@@ -8,10 +8,33 @@ function help_system($field){
function help_link($type) {
if ($type == "admin") {
menu("admin/help/glossary", "glossary", "help_glossary", NULL, 8);
menu("admin/help", "help", "help_admin", NULL, 9);
}
}
function help_glossary() {
$output .= "<h3>Glossary</h3><dl>";
$output .= "<dt>Block</dt><dd>A small box containing information or content placed in the left-hand or right-hand sidebar of a web page.</dd>";
$output .= "<dt>Comment</dt><dd>A note attached to a node. Usually intended to clarify, explain, criticize, or express an opinion on the original material.</dd>";
$output .= "<dt>Moderation</dt><dd>The activity of making sure a post to a Drupal site fits in with what is expected for that Drupal site.<dl>";
$output .= "<dt>Approved</dt><dd>A moderated post which has been accepted by the moderators for publication. (See published).</dd>";
$output .= "<dt>Waiting</dt><dd>A moderated post which is still being voted on to be accepted for publication. (See published.)</dd>";
$output .= "<dt>Moderators</dt><dd>The group of Drupal users that reviews posts before they are published. These users have the \"access submission queue\" permission. (See Published).</dd></dl></dd>";
$output .= "<dt>Node</dt><dd>The basic data unit in Drupal. Everything is a node or an extention of a node.</dd>";
$output .= "<dt>Public</dt><dd>See published.</dd>";
$output .= "<dt>Published</dt><dd>A node that is viewable by everyone. (See unpublished.)</dd>";
$output .= "<dt>Role</dt><dd>You can classify users into roles, for the purpose of setting lots of users' permissions at once.</dd>";
$output .= "<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See ". l("taxonomy help","admin/taxonomy/help") .")</dd>";
$output .= "<dt>Unpublished</dt><dd>A node that is only viewable by administrators and moderators.</dd>";
$output .= "<dt>User</dt><dd>A person who has an account at your Drupal site, and is logged in with that account.</dd>";
$output .= "<dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal bite but is <u>not</u> logged in with that account. Also termed \"anonymous user\".</dd>";
$output .= "</dl>";
return t($output);
}
function help_admin() {
foreach (module_list() as $name) {
......
......@@ -8,10 +8,33 @@ function help_system($field){
function help_link($type) {
if ($type == "admin") {
menu("admin/help/glossary", "glossary", "help_glossary", NULL, 8);
menu("admin/help", "help", "help_admin", NULL, 9);
}
}
function help_glossary() {
$output .= "<h3>Glossary</h3><dl>";
$output .= "<dt>Block</dt><dd>A small box containing information or content placed in the left-hand or right-hand sidebar of a web page.</dd>";
$output .= "<dt>Comment</dt><dd>A note attached to a node. Usually intended to clarify, explain, criticize, or express an opinion on the original material.</dd>";
$output .= "<dt>Moderation</dt><dd>The activity of making sure a post to a Drupal site fits in with what is expected for that Drupal site.<dl>";
$output .= "<dt>Approved</dt><dd>A moderated post which has been accepted by the moderators for publication. (See published).</dd>";
$output .= "<dt>Waiting</dt><dd>A moderated post which is still being voted on to be accepted for publication. (See published.)</dd>";
$output .= "<dt>Moderators</dt><dd>The group of Drupal users that reviews posts before they are published. These users have the \"access submission queue\" permission. (See Published).</dd></dl></dd>";
$output .= "<dt>Node</dt><dd>The basic data unit in Drupal. Everything is a node or an extention of a node.</dd>";
$output .= "<dt>Public</dt><dd>See published.</dd>";
$output .= "<dt>Published</dt><dd>A node that is viewable by everyone. (See unpublished.)</dd>";
$output .= "<dt>Role</dt><dd>You can classify users into roles, for the purpose of setting lots of users' permissions at once.</dd>";
$output .= "<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See ". l("taxonomy help","admin/taxonomy/help") .")</dd>";
$output .= "<dt>Unpublished</dt><dd>A node that is only viewable by administrators and moderators.</dd>";
$output .= "<dt>User</dt><dd>A person who has an account at your Drupal site, and is logged in with that account.</dd>";
$output .= "<dt>Visitor</dt><dd>A person who does not have an account at your Drupal site or a person who has an account at your Drupal bite but is <u>not</u> logged in with that account. Also termed \"anonymous user\".</dd>";
$output .= "</dl>";
return t($output);
}
function help_admin() {
foreach (module_list() as $name) {
......
......@@ -706,13 +706,13 @@ function import_page_fd() {
$result = db_query("SELECT * FROM feed ORDER BY title");
$output .= "<?xml version=\"1.0\"?>\n\n";
$output .= "<?xml version=\"1.0\" encoding=\"". variable_get("site_charset", "iso-8859-1") ."\"?>\n\n";
$output .= "<rssfeeds version=\"0.1\">\n\n";
while ($feed = db_fetch_object($result)) {
$output .= "<channel>\n";
$output .= " <title>". htmlspecialchars($feed->title) ."</title>\n";
$output .= " <link>". htmlspecialchars($feed->url) ."</link>\n";
$output .= " <title>". drupal_specialchars($feed->title) ."</title>\n";
$output .= " <link>". drupal_specialchars($feed->url) ."</link>\n";
$output .= "</channel>\n\n";
}
......
......@@ -17,7 +17,7 @@ function node_help() {
$output .= "<dt>Allow user comments</dt><dd>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).</dd>";
$output .= "<dt>Attributes</dt><dd>A way to sort nodes.</dd><dt>Revisions</dt><dd>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.</dd>";
$output .= "<dt>Promote to front page</dt><dd>To get people to look at the new stuff on your site you can choose to move it to the front page.</dd>";
$output .= "<dt>Approved</dt><dd>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 <b>not</b> moderating a node it should be approved.</dd>";
$output .= "<dt>In moderation queue</dt><dd>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.</dd>";
$output .= "<dt>Votes</dt><dd>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") .".)</a>.</dd>";
$output .= "<dt>Score</dt><dd>The score of the node is gotten by the votes it is given.</dd>";
$output .= "<dt>Users</dt><dd>The list of users who have voted on a moderated node.</dd>";
......@@ -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 .= "<?xml version=\"1.0\" ". t("encoding=\"ISO-8859-1\""). "?>\n";
$output .= "<?xml version=\"1.0\" encoding=\"". variable_get("site_charset", "iso-8859-1") ."\"?>\n";
$output .= "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">]>\n";
// NOTE: &eacute; - 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 &eacute;.
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 .= "<rss version=\"". $channel["version"] . "\">\n";
$output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"]);
$output .= "</rss>\n";
......@@ -1050,14 +1051,37 @@ function node_form($edit, $error = NULL) {
$output .= "<p>$help</p>";
}
$output .= "<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr>";
$output .= " <td valign=\"top\">";
$output .= "<div class=\"node-form\">";
/*
** Add the default fields:
** Add the admin specific parts:
*/
if (user_access("administer nodes")) {
$output .= "<div class=\"admin\">";
$output .= "<div class=\"authored\">";
$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 .= "</div>";
$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 .= "<div class=\"options\">";
$output .= form_item(t("Options"), $options);
$output .= "</div>";
$extras .= implode("</div><div class=\"extra\">", node_invoke_all($edit, "nodeapi", "form admin"));
$output .= $extras ? "<div class=\"extra\">$extras</div></div>" : "</div>";
}
/*
** Add the default fields:
*/
$output .= "<div class=\"standard\">";
$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 .= "</td><td align=\"left\" valign=\"top\">";
$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 .= "<br />";
$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 .= " </td>";
$output .= " </tr>";
$output .= "</table>";
$output .= "</div></div>";
return form($output, ($param["method"] ? $param["method"] : "post"), $param["action"], $param["options"]);
}
......
......@@ -17,7 +17,7 @@ function node_help() {
$output .= "<dt>Allow user comments</dt><dd>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).</dd>";
$output .= "<dt>Attributes</dt><dd>A way to sort nodes.</dd><dt>Revisions</dt><dd>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.</dd>";
$output .= "<dt>Promote to front page</dt><dd>To get people to look at the new stuff on your site you can choose to move it to the front page.</dd>";
$output .= "<dt>Approved</dt><dd>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 <b>not</b> moderating a node it should be approved.</dd>";
$output .= "<dt>In moderation queue</dt><dd>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.</dd>";
$output .= "<dt>Votes</dt><dd>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") .".)</a>.</dd>";
$output .= "<dt>Score</dt><dd>The score of the node is gotten by the votes it is given.</dd>";
$output .= "<dt>Users</dt><dd>The list of users who have voted on a moderated node.</dd>";
......@@ -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 .= "<?xml version=\"1.0\" ". t("encoding=\"ISO-8859-1\""). "?>\n";
$output .= "<?xml version=\"1.0\" encoding=\"". variable_get("site_charset", "iso-8859-1") ."\"?>\n";
$output .= "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">]>\n";
// NOTE: &eacute; - 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 &eacute;.
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 .= "<rss version=\"". $channel["version"] . "\">\n";
$output .= format_rss_channel($channel["title"], $channel["link"], $channel["description"], $items, $channel["language"]);
$output .= "</rss>\n";
......@@ -1050,14 +1051,37 @@ function node_form($edit, $error = NULL) {
$output .= "<p>$help</p>";
}
$output .= "<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr>";
$output .= " <td valign=\"top\">";
$output .= "<div class=\"node-form\">";
/*
** Add the default fields:
** Add the admin specific parts:
*/
if (user_access("administer nodes")) {
$output .= "<div class=\"admin\">";
$output .= "<div class=\"authored\">";
$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 .= "</div>";
$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));