Commit 4131b785 authored by Dries's avatar Dries

- Help system improvements from Michael.

parent 173dfb59
......@@ -9,17 +9,35 @@ function status($message) {
}
}
function admin_help($section) {
$output = "";
switch ($section) {
case 'admin/system/modules':
$output .= "Handles the administration pages.";
break;
case 'admin':
$output .= "Welcome to the administration section. Below are the most recent system events. To get started please choose an item in the left column. If there is an arrow it will expand into a submenu. To jump up a level use the link,bread crumbs, above this block of text. To return to the home page click on the site name, and to go to Drupal's home page click on Druplicon, the drop on to the right.";
break;
case 'admin':
$output = "This is a complete overview of the site administration page.";
break;
}
return t($output);
}
function admin_system($field){
$system["description"] = t("Handles the administration pages.");
return $system[$field];
$output = "";
if ($field == "description") { $output = admin_help("admin/system/modules"); }
return $output;
}
function admin_link($type) {
if ($type == "admin") {
$help["admin"] = t("Welcome to the administration page. Below are the most recent system events. To get started please choose an item in the left column. If there is an arrow it will expand into a submenu. To jump up a level use the link above this block of text. To return to the home page click on the site name, and to go to Drupal's home page click on Druplicon, the drop on to the right.", array("%sitemonitor" => url("admin/watchdog")));
$help["overview"] = t("This is a complete overview of the site administration page.");
menu("admin", "Administration", NULL, $help["admin"]);
menu("admin/overview", "sitemap", "overview_callback", $help["overview"], 8);
menu("admin", "Administration", NULL, admin_help("admin"));
menu("admin/overview", "sitemap", "overview_callback", admin_help("admin/overview"), 8);
}
}
......
<?php
// $Id$
function archive_help($section) {
$output = "";
switch ($section) {
case 'admin/system/modules':
$output = "Displays a calendar to navigate old content.";
break;
case 'admin/system/modules/archive':
$output = "Choose the starting \"day of the week\" for the displayed calendar block.";
break;
}
return t($output);
}
function archive_system($field){
$system["description"] = t("Displays a calendar to navigate old content.");
$system["admin_help"] = t("Choose the starting \"day of the week\" for the displayed calendar block.");
return $system[$field];
$output = "";
if ($field == "description") { $output = archive_help("admin/system/modules"); }
else if ($field == "admin_help") { $output = archive_help("admin/system/modules/archive"); };
return $output;
}
function archive_calendar($original = 0) {
......
<?php
// $Id$
function archive_help($section) {
$output = "";
switch ($section) {
case 'admin/system/modules':
$output = "Displays a calendar to navigate old content.";
break;
case 'admin/system/modules/archive':
$output = "Choose the starting \"day of the week\" for the displayed calendar block.";
break;
}
return t($output);
}
function archive_system($field){
$system["description"] = t("Displays a calendar to navigate old content.");
$system["admin_help"] = t("Choose the starting \"day of the week\" for the displayed calendar block.");
return $system[$field];
$output = "";
if ($field == "description") { $output = archive_help("admin/system/modules"); }
else if ($field == "admin_help") { $output = archive_help("admin/system/modules/archive"); };
return $output;
}
function archive_calendar($original = 0) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,9 +2,12 @@
// $Id$
function blog_system($field){
$system["description"] = t("Enables keeping a blog or easily and regularly updated web page.");
$system["admin_help"] = t("A weBLOG is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form");
return $system[$field];
$output = "";
if ($field == "description") { $output = blog_help("admin/system/modules"); }
else if ($field == "admin_help") { $output = blog_help("admin/system/modules/blog"); };
return $output;
}
function blog_settings() {
......@@ -71,14 +74,26 @@ 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. 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>";
function blog_help($section) {
$output ="";
switch ($section) {
case 'admin/blog/help':
case 'admin/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. 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 .= strtr("<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 and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</p>", array("%scripting-com" => l(t("http://www.scripting.com"), "www.scripting.com", array("location" => "global"))));
$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>";
break;
case 'admin/system/modules':
$output .= "Enables keeping a blog or easily and regularly updated web page.";
break;
case 'admin/system/modules/blog':
$output .= "A weBLOG is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form";
break;
}
return t($output);
}
function blog_feed_user($uid = 0) {
......
......@@ -2,9 +2,12 @@
// $Id$
function blog_system($field){
$system["description"] = t("Enables keeping a blog or easily and regularly updated web page.");
$system["admin_help"] = t("A weBLOG is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form");
return $system[$field];
$output = "";
if ($field == "description") { $output = blog_help("admin/system/modules"); }
else if ($field == "admin_help") { $output = blog_help("admin/system/modules/blog"); };
return $output;
}
function blog_settings() {
......@@ -71,14 +74,26 @@ 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. 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>";
function blog_help($section) {
$output ="";
switch ($section) {
case 'admin/blog/help':
case 'admin/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. 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 .= strtr("<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 and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</p>", array("%scripting-com" => l(t("http://www.scripting.com"), "www.scripting.com", array("location" => "global"))));
$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>";
break;
case 'admin/system/modules':
$output .= "Enables keeping a blog or easily and regularly updated web page.";
break;
case 'admin/system/modules/blog':
$output .= "A weBLOG is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form";
break;
}
return t($output);
}
function blog_feed_user($uid = 0) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
// $Id$
function cloud_help($type = "administrator") {
if ($type == "user") {
$output .= "<p>". t("The cloud monitor tracks or crawls other interesting web sites and displays their latest modification dates. It acts as a link watcher such that you can keep an eye on the other sites in our cloud.") ."</p>";
}
else {
$output .= "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. Here is how it works:";
$output .= "<ul>";
$output .= " <li>The site administrator enters names and URLs of the relevant pages on the cloud monitor administration page.</li>";
$output .= " <li>Drupal's cron function, triggers the cloud module to check all the registered web sites for recent changes or updates. (A page is updated when there is a <i>x</i>-byte difference since the last time it checked, where <i>x</i> is a configuration option.)</li>";
$output .= " <li>The module exports both a page and a block that display the registered sites ordered by their last modification date.</li>";
$output .= "</ul>";
}
return $output;
function cloud_help($section = "admin/syndication/cloud/help") {
$output = "";
switch ($section) {
case 'admin/help':
case 'admin/cloud/help':
case 'admin/syndication/cloud/help':
$output .= "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. Here is how it works:";
$output .= "<ul>";
$output .= strtr("<li>The site administrator enters names and URLs of the relevant pages on the %cloud-add page.</li>", array("%cloud-add" => l(t("content syndication &raquo; site cloud &raquo; add new site"), "admin/syndication/cloud/add") ));
$output .= "<li>Drupal's cron function, triggers the cloud module to check all the registered web sites for recent changes or updates. (A page is updated when there is an <i>x</i>-byte difference since the last time it checked, where <i>x</i> is a configuration option.)</li>";
$output .= " <li>The module exports both a page and a block that display the registered sites ordered by their last modification date.</li>";
$output .= "</ul>";
break;
case 'cloud':
$output .= "<p>The cloud monitor tracks or crawls other interesting web sites and displays their latest modification dates. It acts as a link watcher such that you can keep an eye on the other sites in the cloud.</p>";
break;
case 'admin/system/modules':
$output = "Tracks other sites and displays last date changed.";
break;
case 'admin/syndication/cloud':
$output = strtr("The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to this site learn about other relevant sites and can easily see if there is new content. To get this working you <b>must</b> setup cron support. To get the site cloud block to display you must turn on the <B>Site bloud block</b> in %block. To go to a monitored site, click on the site name, to immediately load and/or update the record for a site, click on \"update site\", to delete a site go to \"edit site\". ", array("%block" => l(t("block management"), "admin/block") ));
break;
case 'admin/syndication/cloud/add':
$output = "Add a site to the site cloud. Don't forget the \"http://\" for your URLs.";
break;
}
return t($output);
}
function cloud_system($field){
$system["description"] = t("Tracks other sites and displays last date changed.");
return $system[$field];
$output = "";
if ($field == "description") {$output = cloud_help("admin/system/modules");};
return $output;
}
function cloud_cron() {
......@@ -42,12 +59,9 @@ 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 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", "site cloud", "cloud_admin", $help["general"]);
menu("admin/syndication/cloud/add", "add new site", "cloud_admin", $help["add"]);
menu("admin/syndication/cloud", "site cloud", "cloud_admin", cloud_help("admin/syndication/cloud"));
menu("admin/syndication/cloud/add", "add new site", "cloud_admin", cloud_help("admin/syndication/cloud/add"));
menu("admin/syndication/cloud/help", "help", "cloud_help", NULL, 9);
}
......@@ -186,7 +200,7 @@ function cloud_page() {
if (user_access("access site cloud")) {
theme("header");
theme("box", t("Site cloud"), cloud_help("user") . cloud_list(100));
theme("box", t("Site cloud"), cloud_help("cloud") . cloud_list(100));
theme("footer");
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -25,32 +25,32 @@ function help_glossary() {
$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>Role</dt><dd>A classification users are placed into for the purpose of setting users' permissions.</dd>";
$output .= strtr("<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See %taxonomy.)</dd>", array("%taxonomy" => l(t("taxonomy help"), "admin/taxonomy/help")));
$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 .= "<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 site but is <u>not</u> logged in with that account. Also termed \"anonymous user\".</dd>";
$output .= "</dl>";
return t($output);
return t($output);
}
function help_admin() {
$output = "";
foreach (module_list() as $name) {
if (module_hook($name, "help")) {
$links[] = l($name, "admin/help#$name");
$temp = module_invoke($name, "help", "admin/".$name."/help");
if (!empty($temp)) {
$links[] = l($name, "admin/help#$name");
$output .= "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
$output .= $temp;
}
}
}
print "<small>". implode(" &middot; ", $links) ."</small><hr />";
foreach (module_list() as $name) {
if (module_hook($name, "help")) {
print "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
print module_invoke($name, "help");
}
}
print $output;
}
?>
......@@ -25,32 +25,32 @@ function help_glossary() {
$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>Role</dt><dd>A classification users are placed into for the purpose of setting users' permissions.</dd>";
$output .= strtr("<dt>Taxonomy</dt><dd>A division of a collection of things into ordered, classified groups. (See %taxonomy.)</dd>", array("%taxonomy" => l(t("taxonomy help"), "admin/taxonomy/help")));
$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 .= "<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 site but is <u>not</u> logged in with that account. Also termed \"anonymous user\".</dd>";
$output .= "</dl>";
return t($output);
return t($output);
}
function help_admin() {
$output = "";
foreach (module_list() as $name) {
if (module_hook($name, "help")) {
$links[] = l($name, "admin/help#$name");
$temp = module_invoke($name, "help", "admin/".$name."/help");
if (!empty($temp)) {
$links[] = l($name, "admin/help#$name");
$output .= "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
$output .= $temp;
}
}
}
print "<small>". implode(" &middot; ", $links) ."</small><hr />";
foreach (module_list() as $name) {
if (module_hook($name, "help")) {
print "<h2><a id=\"$name\">". ucfirst($name) ." module</a></h2>";
print module_invoke($name, "help");
}
}
print $output;
}
?>
......@@ -9,7 +9,7 @@ function ping_help() {
// for optional modules that ping other sites
// $output .= module_invoke_all("ping_help");
$output .= "<p>The ping feature requires crontab.</p>";
print $output;
return t($output);
}
function ping_system($field){
......
......@@ -9,7 +9,7 @@ function ping_help() {
// for optional modules that ping other sites
// $output .= module_invoke_all("ping_help");
$output .= "<p>The ping feature requires crontab.</p>";
print $output;
return t($output);
}
function ping_system($field){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment