Commit 22c889e7 authored by Dries's avatar Dries

- Help system improvements: eliminated the _system hook. Patch by Michael.

- Bloggerapi module fixes.  Patch by Kjartan.

- Coding style fixes.  Patch by Michael.
parent fbc674f1
......@@ -13,7 +13,7 @@ function admin_help($section) {
$output = "";
switch ($section) {
case "admin/system/modules":
case "admin/system/modules#description":
$output .= t("Handles the administration pages.");
break;
case "admin":
......@@ -26,15 +26,6 @@ function admin_help($section) {
return $output;
}
function admin_system($field){
$output = "";
if ($field == "description") {
$output = admin_help("admin/system/modules");
}
return $output;
}
function admin_link($type) {
if ($type == "system" && user_access("access administration pages")) {
menu("admin", t("administer"), NULL, NULL, 9);
......
......@@ -51,32 +51,22 @@ function import_help($section = "admin/import/help") {
$output .= "</ul>";
$output .= "<h3>RSS feed blocks</h3>";
$output .= "<p>In addition to providing subscribed content through the news aggregator, Drupal automatically creates a block for each subscribed feed and every bundle created. Beside each headline in each block, Drupal includes an icon which acts a blog it link. Enable any or all of the blocks using block management.</p>";
$output = t($output, array(
"%amphetadesk" => "<a href=\"http://www.disobey.com/amphetadesk/\">AmphetaDesk</a>",
"%rss" => "<a href=\"http://groups.yahoo.com/group/rss-dev/files/specification.html\">Rich Site Summary</a>",
"%slashdot-rss" => "<a href=\"http://slashdot.org/slashdot.rdf\">http://slashdot.org/slashdot.rfd</a>",
"%syndic8" => "<a href=\"http://www.syndic8.com/\">Syndic8</a>",
"%rss-what" => "<a href=\"http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html\">What is RSS</a>",
"%rss-evolution" => "<a href=\"http://www.webreference.com/authoring/languages/xml/rss/1/\">The Evolution of RSS</a>",
"%admin-news" => l(t("RSS/RDF"), "admin/node/syndication/news"),
"%new-feed" => l(t("new feed"), "admin/node/syndication/news/add/feed"),
"%update-items" => l(t("update items"), "admin/node/syndication/news"),
));
$output = t($output, array("%amphetadesk" => "<a href=\"http://www.disobey.com/amphetadesk/\">AmphetaDesk</a>", "%rss" => "<a href=\"http://groups.yahoo.com/group/rss-dev/files/specification.html\">Rich Site Summary</a>", "%slashdot-rss" => "<a href=\"http://slashdot.org/slashdot.rdf\">http://slashdot.org/slashdot.rfd</a>", "%syndic8" => "<a href=\"http://www.syndic8.com/\">Syndic8</a>", "%rss-what" => "<a href=\"http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html\">What is RSS</a>", "%rss-evolution" => "<a href=\"http://www.webreference.com/authoring/languages/xml/rss/1/\">The Evolution of RSS</a>", "%admin-news" => l(t("RSS/RDF"), "admin/node/syndication/news"), "%new-feed" => l(t("new feed"), "admin/node/syndication/news/add/feed"), "%update-items" => l(t("update items"), "admin/node/syndication/news")));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Used to aggregate syndicated content (RSS and RDF).");
break;
case 'admin/system/modules/import':
$output = t("Drupal's news aggregator controls how many RSS/RDF items from a single source are displayed in a \"Block\", and on the page that goes with that block.");
break;
case 'admin/node/syndication/news':
$output = t("Several web sites, especially news related sites, syndicate parts of their site's content for other web sites to display. Usually, the syndicated content includes the latest headlines with a direct link to that story on the remote site. Some syndicated content also includes a description of the headline. The standard method of syndication is using the XML based Rich Site Summary (RSS). To get a feed to work you <b>must</b> run \"cron.php\". To display the feed in a block you must turn on the %block. <br /><ul><li>To delete a feed choose \"edit feed\"</li><li>To clear all of the entries from a feed choose \"Remove items\"</li><li>To check whether a feed is working, and to get new items <b>now</b> click on \"update items\"</li></ul><ul><li>To delete a bundle choose \"edit bundle\".</li></ul>", array("%block" => l(t("feed's block"), "admin/system/block") ));
$output = t("Several web sites, especially news related sites, syndicate parts of their site's content for other web sites to display. Usually, the syndicated content includes the latest headlines with a direct link to that story on the remote site. Some syndicated content also includes a description of the headline. The standard method of syndication is using the XML based Rich Site Summary (RSS). To get a feed to work you <b>must</b> run \"cron.php\". To display the feed in a block you must turn on the %block. <br /><ul><li>To delete a feed choose \"edit feed\"</li><li>To clear all of the entries from a feed choose \"Remove items\"</li><li>To check whether a feed is working, and to get new items <b>now</b> click on \"update items\"</li></ul><ul><li>To delete a bundle choose \"edit bundle\".</li></ul>", array("%block" => l(t("feed's block"), "admin/system/block")));
break;
case 'admin/node/syndication/news/add/feed':
$output = t("Add a site that has an RSS/RDF feed. The URL is the full path to the RSS feed file. For the feed to update automatically you must run \"cron.php\". The \"Attributes\" are used to bundle this feed with other feeds (See %bundle), and to tag articles from this feed.<br />Note: If you already have a feed with the URL you are planning to use, the system will not accept another feed with the same URL.", array("%bundle" => l(t("add new bundle"), "admin/node/syndication/news/add/bundle") ));
$output = t("Add a site that has an RSS/RDF feed. The URL is the full path to the RSS feed file. For the feed to update automatically you must run \"cron.php\". The \"Attributes\" are used to bundle this feed with other feeds (See %bundle), and to tag articles from this feed.<br />Note: If you already have a feed with the URL you are planning to use, the system will not accept another feed with the same URL.", array("%bundle" => l(t("add new bundle"), "admin/node/syndication/news/add/bundle")));
break;
case 'admin/node/syndication/news/add/bundle':
$output = t("Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called <i>Sport</i>. If an article from a feed has been \"tag\"-ged (See %tag too look at and change tags.) with a matching \"Attribute\" then it will be added to the bundle.", array("%tag" => l(t("tag news item"), "admin/node/syndication/news/tag") ));
$output = t("Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called <i>Sport</i>. If an article from a feed has been \"tag\"-ged (See %tag too look at and change tags.) with a matching \"Attribute\" then it will be added to the bundle.", array("%tag" => l(t("tag news item"), "admin/node/syndication/news/tag")));
break;
case 'admin/node/syndication/news/tag':
$output = t("This allows you to see and change an news item's \"tag\". All articles are originally tagged with the \"Attributes\" of their feed.");
......@@ -86,15 +76,6 @@ function import_help($section = "admin/import/help") {
return $output;
}
function import_system($field){
$output = "";
$system["description"] = import_help("admin/system/modules");
$system["admin_help"] = import_help("admin/system/modules/import");
return $system[$field];
}
function import_settings() {
$number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100);
$output .= form_select(t("Items per block"), "import_block_limit", variable_get("import_block_limit", 15), $number, t("The maximum number of news items displayed in one block."));
......@@ -119,7 +100,7 @@ function import_link($type) {
if (user_access("administer news feeds")) {
menu("admin/node/syndication", t("syndication"), NULL, NULL, 5);
menu("admin/node/syndication/news", t("RSS/RDF"), "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news", t("RSS/RDF"), "import_admin", import_help("admin/node/syndication/news"));
menu("admin/node/syndication/news/add/feed", t("new feed"), "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", t("new bundle"), "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", t("tag items"), "import_admin", import_help("admin/node/syndication/news/tag"), 4);
......@@ -535,7 +516,7 @@ function import_get_bundle($bid) {
function import_view() {
$result = db_query("SELECT f.*, COUNT(i.iid) AS items FROM {feed} f LEFT JOIN {item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.timestamp, f.attributes, f.link, f.description ORDER BY f.title");
$output .= "<h3>". t("Feed overview"). "</h3>";
$output .= "<h3>". t("Feed overview") ."</h3>";
$header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
unset($rows);
......@@ -546,7 +527,7 @@ function import_view() {
$result = db_query("SELECT * FROM {bundle} ORDER BY title");
$output .= "<h3>". t("Bundle overview"). "</h3>";
$output .= "<h3>". t("Bundle overview") ."</h3>";
$header = array(t("title"), t("attributes"), t("operations"));
unset($rows);
......@@ -568,7 +549,7 @@ function import_tag() {
}
$output .= table($header, $rows);
$output .= "<input type=\"submit\" name=\"op\" value=\"" . t("Save attributes") . "\" />\n";
$output .= "<input type=\"submit\" name=\"op\" value=\"". t("Save attributes") ."\" />\n";
return form($output);
}
......@@ -768,7 +749,7 @@ function import_page_sources() {
$output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
}
$output .= "<div style=\"text-align: right\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) . "</div><br />";
$output .= "<div style=\"text-align: right\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."</div><br />";
theme("header");
theme("box", t("News feeds"), import_page_info());
......
......@@ -51,32 +51,22 @@ function import_help($section = "admin/import/help") {
$output .= "</ul>";
$output .= "<h3>RSS feed blocks</h3>";
$output .= "<p>In addition to providing subscribed content through the news aggregator, Drupal automatically creates a block for each subscribed feed and every bundle created. Beside each headline in each block, Drupal includes an icon which acts a blog it link. Enable any or all of the blocks using block management.</p>";
$output = t($output, array(
"%amphetadesk" => "<a href=\"http://www.disobey.com/amphetadesk/\">AmphetaDesk</a>",
"%rss" => "<a href=\"http://groups.yahoo.com/group/rss-dev/files/specification.html\">Rich Site Summary</a>",
"%slashdot-rss" => "<a href=\"http://slashdot.org/slashdot.rdf\">http://slashdot.org/slashdot.rfd</a>",
"%syndic8" => "<a href=\"http://www.syndic8.com/\">Syndic8</a>",
"%rss-what" => "<a href=\"http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html\">What is RSS</a>",
"%rss-evolution" => "<a href=\"http://www.webreference.com/authoring/languages/xml/rss/1/\">The Evolution of RSS</a>",
"%admin-news" => l(t("RSS/RDF"), "admin/node/syndication/news"),
"%new-feed" => l(t("new feed"), "admin/node/syndication/news/add/feed"),
"%update-items" => l(t("update items"), "admin/node/syndication/news"),
));
$output = t($output, array("%amphetadesk" => "<a href=\"http://www.disobey.com/amphetadesk/\">AmphetaDesk</a>", "%rss" => "<a href=\"http://groups.yahoo.com/group/rss-dev/files/specification.html\">Rich Site Summary</a>", "%slashdot-rss" => "<a href=\"http://slashdot.org/slashdot.rdf\">http://slashdot.org/slashdot.rfd</a>", "%syndic8" => "<a href=\"http://www.syndic8.com/\">Syndic8</a>", "%rss-what" => "<a href=\"http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html\">What is RSS</a>", "%rss-evolution" => "<a href=\"http://www.webreference.com/authoring/languages/xml/rss/1/\">The Evolution of RSS</a>", "%admin-news" => l(t("RSS/RDF"), "admin/node/syndication/news"), "%new-feed" => l(t("new feed"), "admin/node/syndication/news/add/feed"), "%update-items" => l(t("update items"), "admin/node/syndication/news")));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Used to aggregate syndicated content (RSS and RDF).");
break;
case 'admin/system/modules/import':
$output = t("Drupal's news aggregator controls how many RSS/RDF items from a single source are displayed in a \"Block\", and on the page that goes with that block.");
break;
case 'admin/node/syndication/news':
$output = t("Several web sites, especially news related sites, syndicate parts of their site's content for other web sites to display. Usually, the syndicated content includes the latest headlines with a direct link to that story on the remote site. Some syndicated content also includes a description of the headline. The standard method of syndication is using the XML based Rich Site Summary (RSS). To get a feed to work you <b>must</b> run \"cron.php\". To display the feed in a block you must turn on the %block. <br /><ul><li>To delete a feed choose \"edit feed\"</li><li>To clear all of the entries from a feed choose \"Remove items\"</li><li>To check whether a feed is working, and to get new items <b>now</b> click on \"update items\"</li></ul><ul><li>To delete a bundle choose \"edit bundle\".</li></ul>", array("%block" => l(t("feed's block"), "admin/system/block") ));
$output = t("Several web sites, especially news related sites, syndicate parts of their site's content for other web sites to display. Usually, the syndicated content includes the latest headlines with a direct link to that story on the remote site. Some syndicated content also includes a description of the headline. The standard method of syndication is using the XML based Rich Site Summary (RSS). To get a feed to work you <b>must</b> run \"cron.php\". To display the feed in a block you must turn on the %block. <br /><ul><li>To delete a feed choose \"edit feed\"</li><li>To clear all of the entries from a feed choose \"Remove items\"</li><li>To check whether a feed is working, and to get new items <b>now</b> click on \"update items\"</li></ul><ul><li>To delete a bundle choose \"edit bundle\".</li></ul>", array("%block" => l(t("feed's block"), "admin/system/block")));
break;
case 'admin/node/syndication/news/add/feed':
$output = t("Add a site that has an RSS/RDF feed. The URL is the full path to the RSS feed file. For the feed to update automatically you must run \"cron.php\". The \"Attributes\" are used to bundle this feed with other feeds (See %bundle), and to tag articles from this feed.<br />Note: If you already have a feed with the URL you are planning to use, the system will not accept another feed with the same URL.", array("%bundle" => l(t("add new bundle"), "admin/node/syndication/news/add/bundle") ));
$output = t("Add a site that has an RSS/RDF feed. The URL is the full path to the RSS feed file. For the feed to update automatically you must run \"cron.php\". The \"Attributes\" are used to bundle this feed with other feeds (See %bundle), and to tag articles from this feed.<br />Note: If you already have a feed with the URL you are planning to use, the system will not accept another feed with the same URL.", array("%bundle" => l(t("add new bundle"), "admin/node/syndication/news/add/bundle")));
break;
case 'admin/node/syndication/news/add/bundle':
$output = t("Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called <i>Sport</i>. If an article from a feed has been \"tag\"-ged (See %tag too look at and change tags.) with a matching \"Attribute\" then it will be added to the bundle.", array("%tag" => l(t("tag news item"), "admin/node/syndication/news/tag") ));
$output = t("Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called <i>Sport</i>. If an article from a feed has been \"tag\"-ged (See %tag too look at and change tags.) with a matching \"Attribute\" then it will be added to the bundle.", array("%tag" => l(t("tag news item"), "admin/node/syndication/news/tag")));
break;
case 'admin/node/syndication/news/tag':
$output = t("This allows you to see and change an news item's \"tag\". All articles are originally tagged with the \"Attributes\" of their feed.");
......@@ -86,15 +76,6 @@ function import_help($section = "admin/import/help") {
return $output;
}
function import_system($field){
$output = "";
$system["description"] = import_help("admin/system/modules");
$system["admin_help"] = import_help("admin/system/modules/import");
return $system[$field];
}
function import_settings() {
$number = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 55 => 55, 60 => 60, 65 => 65, 70 => 70, 75 => 75, 80 => 80, 85 => 85, 90 => 90, 95 => 95, 100 => 100);
$output .= form_select(t("Items per block"), "import_block_limit", variable_get("import_block_limit", 15), $number, t("The maximum number of news items displayed in one block."));
......@@ -119,7 +100,7 @@ function import_link($type) {
if (user_access("administer news feeds")) {
menu("admin/node/syndication", t("syndication"), NULL, NULL, 5);
menu("admin/node/syndication/news", t("RSS/RDF"), "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news", t("RSS/RDF"), "import_admin", import_help("admin/node/syndication/news"));
menu("admin/node/syndication/news/add/feed", t("new feed"), "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", t("new bundle"), "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", t("tag items"), "import_admin", import_help("admin/node/syndication/news/tag"), 4);
......@@ -535,7 +516,7 @@ function import_get_bundle($bid) {
function import_view() {
$result = db_query("SELECT f.*, COUNT(i.iid) AS items FROM {feed} f LEFT JOIN {item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.timestamp, f.attributes, f.link, f.description ORDER BY f.title");
$output .= "<h3>". t("Feed overview"). "</h3>";
$output .= "<h3>". t("Feed overview") ."</h3>";
$header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
unset($rows);
......@@ -546,7 +527,7 @@ function import_view() {
$result = db_query("SELECT * FROM {bundle} ORDER BY title");
$output .= "<h3>". t("Bundle overview"). "</h3>";
$output .= "<h3>". t("Bundle overview") ."</h3>";
$header = array(t("title"), t("attributes"), t("operations"));
unset($rows);
......@@ -568,7 +549,7 @@ function import_tag() {
}
$output .= table($header, $rows);
$output .= "<input type=\"submit\" name=\"op\" value=\"" . t("Save attributes") . "\" />\n";
$output .= "<input type=\"submit\" name=\"op\" value=\"". t("Save attributes") ."\" />\n";
return form($output);
}
......@@ -768,7 +749,7 @@ function import_page_sources() {
$output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
}
$output .= "<div style=\"text-align: right\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) . "</div><br />";
$output .= "<div style=\"text-align: right\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."</div><br />";
theme("header");
theme("box", t("News feeds"), import_page_info());
......
......@@ -5,7 +5,7 @@ function archive_help($section) {
$output = "";
switch ($section) {
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Displays a calendar to navigate old content.");
break;
case 'admin/system/modules/archive':
......@@ -15,14 +15,6 @@ function archive_help($section) {
return $output;
}
function archive_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) {
global $user;
......@@ -64,7 +56,7 @@ function archive_calendar($original = 0) {
// Extract last day of the month:
$last = date("t", $start_of_month);
$end_of_month = mktime(23,59,59, $month, $last, $year);
$end_of_month = mktime(23, 59, 59, $month, $last, $year);
$cache = cache_get("archive:calendar:$start_of_month");
......@@ -97,7 +89,7 @@ function archive_calendar($original = 0) {
$weekstart = variable_get("default_firstday", 0);
// Last day of week
($weekstart - 1 == -1 ) ? $lastday = 6 : $lastday = $weekstart - 1;
($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1;
// Generate the days of the week:
$firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994);
......
......@@ -5,7 +5,7 @@ function archive_help($section) {
$output = "";
switch ($section) {
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Displays a calendar to navigate old content.");
break;
case 'admin/system/modules/archive':
......@@ -15,14 +15,6 @@ function archive_help($section) {
return $output;
}
function archive_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) {
global $user;
......@@ -64,7 +56,7 @@ function archive_calendar($original = 0) {
// Extract last day of the month:
$last = date("t", $start_of_month);
$end_of_month = mktime(23,59,59, $month, $last, $year);
$end_of_month = mktime(23, 59, 59, $month, $last, $year);
$cache = cache_get("archive:calendar:$start_of_month");
......@@ -97,7 +89,7 @@ function archive_calendar($original = 0) {
$weekstart = variable_get("default_firstday", 0);
// Last day of week
($weekstart - 1 == -1 ) ? $lastday = 6 : $lastday = $weekstart - 1;
($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1;
// Generate the days of the week:
$firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994);
......
......@@ -36,7 +36,7 @@ function block_help($section = "admin/block/help") {
$output .= "<p>For more in-depth examples, we recommend that you check the existing boxes and use them as a starting point.</p>";
$output = t($output, array("%pcre" => "<a href=\"http://php.net/pcre/\">". t("Perl-Compatible Regular Expressions (PCRE)") ."</a>"));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Controls the boxes that are displayed around the main content.");
break;
case 'admin/system/block':
......@@ -53,14 +53,6 @@ function block_help($section = "admin/block/help") {
return $output;
}
function block_system($field){
$output = "";
if ($field == "description") { $output = block_help("admin/system/modules"); }
return $output;
}
function block_perm() {
return array("administer blocks");
}
......@@ -337,7 +329,7 @@ function block_user($type, &$edit, &$user) {
while ($block = db_fetch_object($result)) {
$data = module_invoke($block->module, "block", "list");
if ($data[$block->delta]["info"]) {
$form .= "<tr><td>".$data[$block->delta]["info"]."</td><td>". form_checkbox(NULL, "block][$block->module][$block->delta", 1, $user->block[$block->module][$block->delta]) ."</td></tr>\n";
$form .= "<tr><td>". $data[$block->delta]["info"] ."</td><td>". form_checkbox(NULL, "block][$block->module][$block->delta", 1, $user->block[$block->module][$block->delta]) ."</td></tr>\n";
}
}
......
......@@ -36,7 +36,7 @@ function block_help($section = "admin/block/help") {
$output .= "<p>For more in-depth examples, we recommend that you check the existing boxes and use them as a starting point.</p>";
$output = t($output, array("%pcre" => "<a href=\"http://php.net/pcre/\">". t("Perl-Compatible Regular Expressions (PCRE)") ."</a>"));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Controls the boxes that are displayed around the main content.");
break;
case 'admin/system/block':
......@@ -53,14 +53,6 @@ function block_help($section = "admin/block/help") {
return $output;
}
function block_system($field){
$output = "";
if ($field == "description") { $output = block_help("admin/system/modules"); }
return $output;
}
function block_perm() {
return array("administer blocks");
}
......@@ -337,7 +329,7 @@ function block_user($type, &$edit, &$user) {
while ($block = db_fetch_object($result)) {
$data = module_invoke($block->module, "block", "list");
if ($data[$block->delta]["info"]) {
$form .= "<tr><td>".$data[$block->delta]["info"]."</td><td>". form_checkbox(NULL, "block][$block->module][$block->delta", 1, $user->block[$block->module][$block->delta]) ."</td></tr>\n";
$form .= "<tr><td>". $data[$block->delta]["info"] ."</td><td>". form_checkbox(NULL, "block][$block->module][$block->delta", 1, $user->block[$block->module][$block->delta]) ."</td></tr>\n";
}
}
......
<?php
// $Id$
function blog_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() {
$output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 70, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words");
......@@ -84,9 +75,9 @@ function blog_help($section) {
$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 and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</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>";
$output = t($output,array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>" ));
$output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>" ));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output .= t("Enables keeping a blog or easily and regularly updated web page.");
break;
case 'admin/system/modules/blog':
......@@ -108,7 +99,7 @@ function blog_feed_user($uid = 0) {
}
$result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = %d AND n.status = 1 ORDER BY n.nid DESC", $uid, 0, 15);
$channel["title"] = $account->name. "'s blog";
$channel["title"] = $account->name ."'s blog";
$channel["link"] = url("blog/view/$uid");
$channel["description"] = $term->description;
node_feed($result, $channel);
......@@ -136,7 +127,7 @@ function blog_page_user($uid) {
node_view(node_load(array("nid" => $node->nid)), 1);
}
print pager_display(NULL, variable_get("default_nodes_main", 10));
print "<div style=\"text-align: right\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array ("%username" => $account->name)))) . "</div>";
print "<div style=\"text-align: right\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>";
}
function blog_page_last() {
......@@ -247,7 +238,7 @@ function blog_view($node, $main = 0) {
$breadcrumb[] = l(t("Home"), NULL);
$breadcrumb[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid");
// print the breadcrumb
theme("breadcrumb",$breadcrumb);
theme("breadcrumb", $breadcrumb);
}
// prepair the node content
$node = blog_content($node);
......@@ -265,7 +256,7 @@ function blog_link($type, $node = 0, $main) {
menu("node/add/blog", t("blog entry"), "blog_page", NULL, 0);
}
if (user_access("maintain personal blog")) {
menu("blog/" . $user->uid,t("my blog"), "user_page", NULL, 1);
menu("blog/" . $user->uid, t("my blog"), "user_page", NULL, 1);
}
}
......
<?php
// $Id$
function blog_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() {
$output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 70, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words");
......@@ -84,9 +75,9 @@ function blog_help($section) {
$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 and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</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>";
$output = t($output,array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>" ));
$output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>" ));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output .= t("Enables keeping a blog or easily and regularly updated web page.");
break;
case 'admin/system/modules/blog':
......@@ -108,7 +99,7 @@ function blog_feed_user($uid = 0) {
}
$result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = %d AND n.status = 1 ORDER BY n.nid DESC", $uid, 0, 15);
$channel["title"] = $account->name. "'s blog";
$channel["title"] = $account->name ."'s blog";
$channel["link"] = url("blog/view/$uid");
$channel["description"] = $term->description;
node_feed($result, $channel);
......@@ -136,7 +127,7 @@ function blog_page_user($uid) {
node_view(node_load(array("nid" => $node->nid)), 1);
}
print pager_display(NULL, variable_get("default_nodes_main", 10));
print "<div style=\"text-align: right\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array ("%username" => $account->name)))) . "</div>";
print "<div style=\"text-align: right\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>";
}
function blog_page_last() {
......@@ -247,7 +238,7 @@ function blog_view($node, $main = 0) {
$breadcrumb[] = l(t("Home"), NULL);
$breadcrumb[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid");
// print the breadcrumb
theme("breadcrumb",$breadcrumb);
theme("breadcrumb", $breadcrumb);
}
// prepair the node content
$node = blog_content($node);
......@@ -265,7 +256,7 @@ function blog_link($type, $node = 0, $main) {
menu("node/add/blog", t("blog entry"), "blog_page", NULL, 0);
}
if (user_access("maintain personal blog")) {
menu("blog/" . $user->uid,t("my blog"), "user_page", NULL, 1);
menu("blog/" . $user->uid, t("my blog"), "user_page", NULL, 1);
}
}
......
This diff is collapsed.
<?php
// $Id$
function book_system($field){
$output = "";
if ($field == "description") { $output = book_help("admin/system/modules"); };
return $output;
}
function book_node($field) {
global $user;
......@@ -79,7 +71,7 @@ function book_link($type, $node = 0, $main = 0) {
if ($type == "system") {
if (user_access("maintain books")) {
menu("node/add/book", t("book page"), "book_page", NULL,0);
menu("node/add/book", t("book page"), "book_page", NULL, 0);
menu("admin/node/book", t("books"), NULL, NULL, 4);
menu("admin/node/book/orphan", t("orphan pages"), NULL, NULL, 8);
menu("admin/node/book/help", t("help"), NULL, NULL, 9);
......@@ -418,7 +410,7 @@ function book_show($node, $cid) {
if (node_access("view", $node)) {
if ($node->type == "book") {
book_view($node,0);
book_view($node, 0);
}
else {
......@@ -448,7 +440,7 @@ function book_show($node, $cid) {
** View the node
*/
theme("breadcrumb", $node->breadcrumb);
theme("node",$node, 0);
theme("node", $node, 0);
}
else {
......@@ -859,9 +851,9 @@ function book_help($section = "admin/node/book/help") {
$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 the %create link. 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 book module, 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. 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 %create link.</li><li>If you don't see the <i>administer</i> link, then you probably have insufficient %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 = t($output, array("%permissions" => l(t("permissions"), "admin/user/permission"), "%create" => l(t("create book page"), "node/add/book"), "%collaborative-book" => l(t("collaborative book"), "admin/node/book"), "%orphans-book" => l(t("review their books for orphans"), "admin/node/book/orphan"), "%export-book" => l(t("export their books"), "book/print"), "%create" => l(t("create book page"), "node/add/book") ));
$output = t($output, array("%permissions" => l(t("permissions"), "admin/user/permission"), "%create" => l(t("create book page"), "node/add/book"), "%collaborative-book" => l(t("collaborative book"), "admin/node/book"), "%orphans-book" => l(t("review their books for orphans"), "admin/node/book/orphan"), "%export-book" => l(t("export their books"), "book/print"), "%create" => l(t("create book page"), "node/add/book")));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Allows users to collaboratively author a book.");
break;
case 'admin/node/book':
......
<?php
// $Id$
function book_system($field){
$output = "";
if ($field == "description") { $output = book_help("admin/system/modules"); };
return $output;
}
function book_node($field) {
global $user;
......@@ -79,7 +71,7 @@ function book_link($type, $node = 0, $main = 0) {
if ($type == "system") {
if (user_access("maintain books")) {
menu("node/add/book", t("book page"), "book_page", NULL,0);
menu("node/add/book", t("book page"), "book_page", NULL, 0);
menu("admin/node/book", t("books"), NULL, NULL, 4);
menu("admin/node/book/orphan", t("orphan pages"), NULL, NULL, 8);
menu("admin/node/book/help", t("help"), NULL, NULL, 9);
......@@ -418,7 +410,7 @@ function book_show($node, $cid) {
if (node_access("view", $node)) {
if ($node->type == "book") {
book_view($node,0);
book_view($node, 0);
}
else {
......@@ -448,7 +440,7 @@ function book_show($node, $cid) {
** View the node
*/
theme("breadcrumb", $node->breadcrumb);
theme("node",$node, 0);
theme("node", $node, 0);
}
else {
......@@ -859,9 +851,9 @@ function book_help($section = "admin/node/book/help") {
$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 the %create link. 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 book module, 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. 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 %create link.</li><li>If you don't see the <i>administer</i> link, then you probably have insufficient %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 = t($output, array("%permissions" => l(t("permissions"), "admin/user/permission"), "%create" => l(t("create book page"), "node/add/book"), "%collaborative-book" => l(t("collaborative book"), "admin/node/book"), "%orphans-book" => l(t("review their books for orphans"), "admin/node/book/orphan"), "%export-book" => l(t("export their books"), "book/print"), "%create" => l(t("create book page"), "node/add/book") ));
$output = t($output, array("%permissions" => l(t("permissions"), "admin/user/permission"), "%create" => l(t("create book page"), "node/add/book"), "%collaborative-book" => l(t("collaborative book"), "admin/node/book"), "%orphans-book" => l(t("review their books for orphans"), "admin/node/book/orphan"), "%export-book" => l(t("export their books"), "book/print"), "%create" => l(t("create book page"), "node/add/book")));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Allows users to collaboratively author a book.");
break;
case 'admin/node/book':
......
......@@ -10,32 +10,26 @@ function cloud_help($section = "admin/node/syndication/cloud/help") {
case 'admin/node/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") ." &raquo; ". t("syndication") ." &raquo; ". t("site cloud") ." &raquo; ". t("add new site"), "admin/node/syndication/cloud/add") ));
$output .= "<li>The site administrator enters names and URLs of the relevant pages on the %cloud-add 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 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>";
$output = t($output, array("%cloud-add" => l(t("content") ." &raquo; ". t("syndication") ." &raquo; ". t("site cloud") ." &raquo; ". t("add new site"), "admin/node/syndication/cloud/add")));
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>";
$output .= t("<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.";
case 'admin/system/modules#description':
$output = t("Tracks other sites and displays last date changed.");
break;
case 'admin/node/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 <i>site cloud</i> block 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("administer") ." &raquo; ". t("configuration") ." &raquo; ". t("blocks"), "admin/block") ));
$output = t("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 <i>site cloud</i> block 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("administer") ." &raquo; ". t("configuration") ." &raquo; ". t("blocks"), "admin/block")));
break;
case 'admin/node/syndication/cloud/add':
$output = "Add a site to the site cloud. Don't forget the \"http://\" for your URLs.";
$output = t("Add a site to the site cloud. Don't forget the \"http://\" for your URLs.");
break;
}
return t($output);
}
function cloud_system($field){
$output = "";
if ($field == "description") {$output = cloud_help("admin/system/modules");};
return $output;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@
function drupal_help($section = "admin/drupal/help") {
$output = "";
switch($section) {
switch ($section) {
case 'admin/help':
case 'admin/drupal/help':
$output .= "<p>The \"Drupal\" module features a capability whereby other drupal sites may <i>call home</i> to report their existence. In turn, this enables a pod of Drupal sites to find, cooperate and advertise each other.</p>";
......@@ -14,22 +14,21 @@ function drupal_help($section = "admin/drupal/help") {
$output .= "<p>Also note that your installation need not use drupal.org as its directory server. For example, this feature is perfectly capable of aggregating pings from all of your departmental drupal installations sites within an enterprise.</p>";
$output .= t($output, array("%drupal-sites" => "<a href=\"http://www.drupal.org/node/view/3\">". t("Drupal sites page") ."</a>", "%Drupal" => "<a href=\"http://www.drupal.org\">drupal.org</a>", "%xml-rpc" => "<a href=\"http://www.xmlrpc.com/\">XLM-RPC</a>", "%drupal-settings" => l(t("Administration &raquo; site configuration &raquo; modules &raquo; drupal"), "admin/system/modules/drupal"), "%cron" => l(t("cron run"), "admin/system/help#cron") ));
break;
case 'admin/system/modules':
case 'admin/system/modules#description':
$output = t("Lets users log in using a Drupal ID and can notify drupal.org about your site.");
break;
case 'admin/system/modules/drupal':
$output = t("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the %Drupal-setting setting -- but the directory server has to be able to handle Drupal XML. To get a full site listing go to the %general and set:<ul><li>The site name,</li><li>The site E-Mail address,&