Commit eb030cb9 authored by Dries's avatar Dries

- Improvements: XHTML-ifications. Patch by GmbH.

parent a0e0ea93
......@@ -808,7 +808,7 @@ function form($form, $method = "post", $action = 0, $options = 0) {
if (!$action) {
$action = request_uri();
}
return "<form action=\"$action\" method=\"$method\"". ($options ? " $options" : "") .">\n$form</form>\n";
return "<form action=\"$action\" method=\"$method\"". ($options ? " $options" : "") .">\n$form\n</form>\n";
}
function form_item($title, $value, $description = 0) {
......@@ -825,7 +825,7 @@ function form_checkbox($title, $name, $value = 1, $checked = 0, $description = 0
function form_textfield($title, $name, $value, $size, $maxlength, $description = 0) {
$size = $size ? " size=\"$size\"" : "";
return form_item($title, "<input maxlength=\"$maxlength\" class=\"form-text\" name=\"edit[$name]\"$size value=\"". check_form($value) ."\" />", $description);
return form_item($title, "<input type=\"text\" maxlength=\"$maxlength\" class=\"form-text\" name=\"edit[$name]\"$size value=\"". check_form($value) ."\" />", $description);
}
function form_password($title, $name, $value, $size, $maxlength, $description = 0) {
......
......@@ -25,11 +25,11 @@ function header($title = "") {
$output .= "<html><head><title>". $title ? $title : variable_get(site_name, "drupal") ."</title>";
$output .= theme_head($main);
$output .= "</head><body bgcolor=\"$this->background\" text=\"$this->foreground". theme_onload_attribute(). "\">";
$output .= "<table border=\"0\" cellspacing=\"4\" cellpadding=\"4\"><tr><td valign=\"top\" width=\"170\">";
$output .= "<table border=\"0\" cellspacing=\"4\" cellpadding=\"4\"><tr><td style=\"vertical-align: top; width: 170px;\">";
print $output;
$this->box(t("Navigation"), @implode("<br />", link_page())); theme_blocks("all", $this);
print "</td><td valign=\"top\">";
print "</td><td style=\"vertical-align: top;\">";
}
......
......@@ -57,7 +57,7 @@ function admin_page() {
** Body:
*/
print "<div id=\"logo\"><a href=\"http://drupal.org/\"><img src=\"misc/druplicon-small.gif\" alt=\"Druplicon - Drupal logo\" /></a></div>";
print "<div id=\"logo\"><a href=\"http://drupal.org/\"><img src=\"misc/druplicon-small.gif\" alt=\"Druplicon - Drupal logo\" title=\"Druplicon - Drupal logo\" /></a></div>";
print "<div id=\"main\">";
if ($path = menu_path()) {
......
......@@ -71,7 +71,7 @@ function import_format_item($item, $feed = 0) {
global $user;
if ($user->uid && user_access("maintain personal blog")) {
$output .= "<div class=\"icon\">". l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"12\" alt=\"". t("blog it") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."), "class" => "blog-it")) ."</div>";
$output .= "<div class=\"icon\">". l("<img src=\"". theme("image", "blog.gif") ."\" width=\"12\" height=\"12\" alt=\"". t("blog it") ."\" title=\"". t("blog it") ."\" style=\"border: 0px; />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."), "class" => "blog-it")) ."</div>";
}
// external link
......@@ -136,13 +136,13 @@ function import_block($op, $delta) {
case "feed":
$feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = %d", $id));
$block["subject"] = $feed->title;
$block["content"] .= import_feed_block($feed) ."<div align=\"right\">". l(t("more"), "import/feed/$feed->fid", array("title" => t("View this feed's recent news."))) ."</div>";
$block["content"] .= import_feed_block($feed) ."<div style=\"text-align: right;\">". l(t("more"), "import/feed/$feed->fid", array("title" => t("View this feed's recent news."))) ."</div>";
break;
case "bundle":
$bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = %d", $id));
$block["subject"] = $bundle->title;
$block["content"] .= import_bundle_block($bundle->attributes) ."<div align=\"right\">". l(t("more"), "import/bundle/$bundle->bid", array("title" => t("View this bundle's recent news."))) ."</div>";
$block["content"] .= import_bundle_block($bundle->attributes) ."<div style=\"text-align: right;\">". l(t("more"), "import/bundle/$bundle->bid", array("title" => t("View this bundle's recent news."))) ."</div>";
break;
}
......@@ -157,7 +157,7 @@ function import_get_bundles($attributes = 0) {
$result = db_query("SELECT * FROM bundle ORDER BY title");
while ($bundle = db_fetch_object($result)) {
$block["bundle:$bundle->bid"]["subject"] = $bundle->title;
$block["bundle:$bundle->bid"]["content"] = import_bundle_block($bundle->attributes) ."<div align=\"right\">".
$block["bundle:$bundle->bid"]["content"] = import_bundle_block($bundle->attributes) ."<div style=\"text-align: right;\">".
l(t("more"), "import/bundle/$bundle->bid", array("title" => t("View this bundle's recent news.")))
."</div>";
$block["bundle:$bundle->bid"]["info"] = "$bundle->title bundle";
......@@ -173,7 +173,7 @@ function import_get_feeds($attributes = 0) {
$result = db_query("SELECT * FROM feed ORDER BY fid");
while ($feed = db_fetch_object($result)) {
$block["feed:$feed->fid"]["subject"] = $feed->title;
$block["feed:$feed->fid"]["content"] = import_feed_block($feed) ."<div align=\"right\">".
$block["feed:$feed->fid"]["content"] = import_feed_block($feed) ."<div style=\"text-align: right;\">".
l(t("more"), "import/feed/$feed->fid", array("title" => t("View this feed's recent news.")))
."</div>";
$block["feed:$feed->fid"]["info"] = "$feed->title feed";
......@@ -574,7 +574,7 @@ function import_page_info() {
$links[] = l(t("administer news feeds"), "admin/syndication/news", array("title" => t("View the news feed administrative pages.")));
}
return "<div align=\"center\">". theme("links", $links) ."</div>";
return "<div style=\"text-align: center;\">". theme("links", $links) ."</div>";
}
function import_page_last() {
......@@ -590,7 +590,7 @@ function import_page_last() {
$links[] = l(t("feed"), "import/feed/$item->fid", array("title" => t("Read more syndicated news from this feed.")));
if ($item->link) {
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td style=\"text-align: right; vertical-align: top;\">". theme("links", $links) ."</td></tr>\n";
}
if ($item->description) {
......@@ -614,7 +614,7 @@ function import_page_feed($fid) {
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">$feed->description</div></p>";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ." <a href=\"$feed->url\"><img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" alt=\"\" /></a><br /><br /></div></p>\n";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px; text-align: right;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ." <a href=\"$feed->url\"><img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" /></a><br /><br /></div></p>\n";
$result = db_query_range("SELECT * FROM item WHERE fid = %d ORDER BY iid DESC", $fid, 0, variable_get("import_page_limit", 75));
......@@ -626,7 +626,7 @@ function import_page_feed($fid) {
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td style=\"text-align: right; vertical-align: top;\">". theme("links", $links) ."</td></tr>\n";
}
if ($item->description) {
$output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
......@@ -664,7 +664,7 @@ function import_page_bundle($bid) {
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td style=\"text-align: right; vertical-align: top;\">". theme("links", $links) ."</td></tr>\n";
}
if ($item->description) {
......@@ -693,7 +693,7 @@ function import_page_sources() {
$output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
}
$output .= l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."<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());
......@@ -740,7 +740,7 @@ function import_page_blocks($blocks) {
for ($t = 0; $t < 3; $t++) {
$i = 1;
print " <td width=\"33%\" valign=\"top\">\n";
print " <td style=\"vertical-align: top; width: 33%;\">\n";
while ($block = each($blocks)) {
theme("box", $block["value"]["subject"], $block["value"]["content"]);
if ($i == ceil(count($blocks) / 3)) {
......
......@@ -71,7 +71,7 @@ function import_format_item($item, $feed = 0) {
global $user;
if ($user->uid && user_access("maintain personal blog")) {
$output .= "<div class=\"icon\">". l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"12\" alt=\"". t("blog it") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."), "class" => "blog-it")) ."</div>";
$output .= "<div class=\"icon\">". l("<img src=\"". theme("image", "blog.gif") ."\" width=\"12\" height=\"12\" alt=\"". t("blog it") ."\" title=\"". t("blog it") ."\" style=\"border: 0px; />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."), "class" => "blog-it")) ."</div>";
}
// external link
......@@ -136,13 +136,13 @@ function import_block($op, $delta) {
case "feed":
$feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = %d", $id));
$block["subject"] = $feed->title;
$block["content"] .= import_feed_block($feed) ."<div align=\"right\">". l(t("more"), "import/feed/$feed->fid", array("title" => t("View this feed's recent news."))) ."</div>";
$block["content"] .= import_feed_block($feed) ."<div style=\"text-align: right;\">". l(t("more"), "import/feed/$feed->fid", array("title" => t("View this feed's recent news."))) ."</div>";
break;
case "bundle":
$bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = %d", $id));
$block["subject"] = $bundle->title;
$block["content"] .= import_bundle_block($bundle->attributes) ."<div align=\"right\">". l(t("more"), "import/bundle/$bundle->bid", array("title" => t("View this bundle's recent news."))) ."</div>";
$block["content"] .= import_bundle_block($bundle->attributes) ."<div style=\"text-align: right;\">". l(t("more"), "import/bundle/$bundle->bid", array("title" => t("View this bundle's recent news."))) ."</div>";
break;
}
......@@ -157,7 +157,7 @@ function import_get_bundles($attributes = 0) {
$result = db_query("SELECT * FROM bundle ORDER BY title");
while ($bundle = db_fetch_object($result)) {
$block["bundle:$bundle->bid"]["subject"] = $bundle->title;
$block["bundle:$bundle->bid"]["content"] = import_bundle_block($bundle->attributes) ."<div align=\"right\">".
$block["bundle:$bundle->bid"]["content"] = import_bundle_block($bundle->attributes) ."<div style=\"text-align: right;\">".
l(t("more"), "import/bundle/$bundle->bid", array("title" => t("View this bundle's recent news.")))
."</div>";
$block["bundle:$bundle->bid"]["info"] = "$bundle->title bundle";
......@@ -173,7 +173,7 @@ function import_get_feeds($attributes = 0) {
$result = db_query("SELECT * FROM feed ORDER BY fid");
while ($feed = db_fetch_object($result)) {
$block["feed:$feed->fid"]["subject"] = $feed->title;
$block["feed:$feed->fid"]["content"] = import_feed_block($feed) ."<div align=\"right\">".
$block["feed:$feed->fid"]["content"] = import_feed_block($feed) ."<div style=\"text-align: right;\">".
l(t("more"), "import/feed/$feed->fid", array("title" => t("View this feed's recent news.")))
."</div>";
$block["feed:$feed->fid"]["info"] = "$feed->title feed";
......@@ -574,7 +574,7 @@ function import_page_info() {
$links[] = l(t("administer news feeds"), "admin/syndication/news", array("title" => t("View the news feed administrative pages.")));
}
return "<div align=\"center\">". theme("links", $links) ."</div>";
return "<div style=\"text-align: center;\">". theme("links", $links) ."</div>";
}
function import_page_last() {
......@@ -590,7 +590,7 @@ function import_page_last() {
$links[] = l(t("feed"), "import/feed/$item->fid", array("title" => t("Read more syndicated news from this feed.")));
if ($item->link) {
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td style=\"text-align: right; vertical-align: top;\">". theme("links", $links) ."</td></tr>\n";
}
if ($item->description) {
......@@ -614,7 +614,7 @@ function import_page_feed($fid) {
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">$feed->description</div></p>";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ." <a href=\"$feed->url\"><img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" alt=\"\" /></a><br /><br /></div></p>\n";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px; text-align: right;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ." <a href=\"$feed->url\"><img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" /></a><br /><br /></div></p>\n";
$result = db_query_range("SELECT * FROM item WHERE fid = %d ORDER BY iid DESC", $fid, 0, variable_get("import_page_limit", 75));
......@@ -626,7 +626,7 @@ function import_page_feed($fid) {
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td style=\"text-align: right; vertical-align: top;\">". theme("links", $links) ."</td></tr>\n";
}
if ($item->description) {
$output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>";
......@@ -664,7 +664,7 @@ function import_page_bundle($bid) {
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td style=\"text-align: right; vertical-align: top;\">". theme("links", $links) ."</td></tr>\n";
}
if ($item->description) {
......@@ -693,7 +693,7 @@ function import_page_sources() {
$output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />";
}
$output .= l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", "import/fd", array("title" => t("View the list of syndicated web sites in XML format."))) ."<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());
......@@ -740,7 +740,7 @@ function import_page_blocks($blocks) {
for ($t = 0; $t < 3; $t++) {
$i = 1;
print " <td width=\"33%\" valign=\"top\">\n";
print " <td style=\"vertical-align: top; width: 33%;\">\n";
while ($block = each($blocks)) {
theme("box", $block["value"]["subject"], $block["value"]["content"]);
if ($i == ceil(count($blocks) / 3)) {
......
......@@ -163,7 +163,7 @@ function block_admin_preview() {
while ($block = db_fetch_object($result)) {
$block_data = module_invoke($block->module, "block", "list");
$name = $block_data[$block->delta]["info"];
$lblocks .= " <tr><td nowrap=\"nowrap\">". ($block->status == 2 ? "<b>$name</b>" : $name) ."</td><td>$block->weight</td></tr>\n";
$lblocks .= " <tr><td>". ($block->status == 2 ? "<b>$name</b>" : $name) ."</td><td>$block->weight</td></tr>\n";
}
$lblocks .= "</table>\n";
......@@ -178,9 +178,9 @@ function block_admin_preview() {
$output .= "<h3>". t("Themes with both left and right sidebars") .":</h3>\n";
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><td align=\"center\" colspan=\"3\">header</td></tr>\n";
$output .= " <tr><td>\n". ($lblocks ? $lblocks : "&nbsp;") ."</td><td width=\"300\">&nbsp;</td><td>\n". ($rblocks ? $rblocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td align=\"center\" colspan=\"3\">footer</td></tr>\n";
$output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">header</td></tr>\n";
$output .= " <tr><td>\n". ($lblocks ? $lblocks : "&nbsp;") ."</td><td style=\"width: 300px;\">&nbsp;</td><td>\n". ($rblocks ? $rblocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">footer</td></tr>\n";
$output .= "</table>\n";
$result = db_query("SELECT * FROM blocks WHERE status > 0 ORDER BY weight");
......@@ -194,16 +194,16 @@ function block_admin_preview() {
$output .= "<h3>". t("Themes with right-sidebar only") .":</h3>\n";
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">header</td></tr>\n";
$output .= " <tr><td width=\"400\">&nbsp;</td><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">footer</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">header</td></tr>\n";
$output .= " <tr><td style=\"width: 400px;\">&nbsp;</td><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">footer</td></tr>\n";
$output .= "</table>\n";
$output .= "<h3>". t("Themes with left-sidebar only") .":</h3>\n";
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">header</td></tr>\n";
$output .= " <tr><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td><td width=\"400\">&nbsp;</td></tr>\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">footer</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">header</td></tr>\n";
$output .= " <tr><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td><td style=\"width: 400px;\">&nbsp;</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">footer</td></tr>\n";
$output .= "</table>\n";
print $output;
......
......@@ -163,7 +163,7 @@ function block_admin_preview() {
while ($block = db_fetch_object($result)) {
$block_data = module_invoke($block->module, "block", "list");
$name = $block_data[$block->delta]["info"];
$lblocks .= " <tr><td nowrap=\"nowrap\">". ($block->status == 2 ? "<b>$name</b>" : $name) ."</td><td>$block->weight</td></tr>\n";
$lblocks .= " <tr><td>". ($block->status == 2 ? "<b>$name</b>" : $name) ."</td><td>$block->weight</td></tr>\n";
}
$lblocks .= "</table>\n";
......@@ -178,9 +178,9 @@ function block_admin_preview() {
$output .= "<h3>". t("Themes with both left and right sidebars") .":</h3>\n";
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><td align=\"center\" colspan=\"3\">header</td></tr>\n";
$output .= " <tr><td>\n". ($lblocks ? $lblocks : "&nbsp;") ."</td><td width=\"300\">&nbsp;</td><td>\n". ($rblocks ? $rblocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td align=\"center\" colspan=\"3\">footer</td></tr>\n";
$output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">header</td></tr>\n";
$output .= " <tr><td>\n". ($lblocks ? $lblocks : "&nbsp;") ."</td><td style=\"width: 300px;\">&nbsp;</td><td>\n". ($rblocks ? $rblocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td colspan=\"3\" style=\"text-align: center;\">footer</td></tr>\n";
$output .= "</table>\n";
$result = db_query("SELECT * FROM blocks WHERE status > 0 ORDER BY weight");
......@@ -194,16 +194,16 @@ function block_admin_preview() {
$output .= "<h3>". t("Themes with right-sidebar only") .":</h3>\n";
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">header</td></tr>\n";
$output .= " <tr><td width=\"400\">&nbsp;</td><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">footer</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">header</td></tr>\n";
$output .= " <tr><td style=\"width: 400px;\">&nbsp;</td><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">footer</td></tr>\n";
$output .= "</table>\n";
$output .= "<h3>". t("Themes with left-sidebar only") .":</h3>\n";
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">header</td></tr>\n";
$output .= " <tr><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td><td width=\"400\">&nbsp;</td></tr>\n";
$output .= " <tr><td align=\"center\" colspan=\"2\">footer</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">header</td></tr>\n";
$output .= " <tr><td>\n". ($blocks ? $blocks : "&nbsp;") ."</td><td style=\"width: 400px;\">&nbsp;</td></tr>\n";
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">footer</td></tr>\n";
$output .= "</table>\n";
print $output;
......
......@@ -119,7 +119,7 @@ function blog_page_user($uid = 0) {
node_view(node_load(array("nid" => $node->nid)), 1);
}
print pager_display(NULL, variable_get("default_nodes_main", 10));
print l("<img align=\"right\" src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array ("%username" => $account->name))));
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() {
......@@ -131,7 +131,7 @@ function blog_page_last() {
$output = node_view(node_load(array("nid" => $node->nid)), 1);
}
$output .= pager_display(NULL, variable_get("default_nodes_main", 10));
$output .= l("<img align=\"right\" src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs.")));
$output .= "<div style=\"text-align: right;\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."</div>";
return $output;
}
......
......@@ -119,7 +119,7 @@ function blog_page_user($uid = 0) {
node_view(node_load(array("nid" => $node->nid)), 1);
}
print pager_display(NULL, variable_get("default_nodes_main", 10));
print l("<img align=\"right\" src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array ("%username" => $account->name))));
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() {
......@@ -131,7 +131,7 @@ function blog_page_last() {
$output = node_view(node_load(array("nid" => $node->nid)), 1);
}
$output .= pager_display(NULL, variable_get("default_nodes_main", 10));
$output .= l("<img align=\"right\" src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs.")));
$output .= "<div style=\"text-align: right;\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."</div>";
return $output;
}
......
......@@ -368,7 +368,6 @@ function book_body($node) {
}
function book_view($node, $main = 0) {
global $mod;
/*
** Always display the most recently approved revision of a node
......@@ -376,7 +375,7 @@ function book_view($node, $main = 0) {
** the moderation queue.
*/
if ($node->moderate && $mod != "queue") {
if ($node->moderate && arg(0) != "queue") {
$revision = book_revision_load($node, array("moderate" => 0, "status" => 1));
if ($revision) {
......@@ -777,7 +776,7 @@ function book_help() {
$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, it 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>Maintaining a FAQ using a collaborative book</h3>";
$output .= "<a id=\"faq\"></a><h3>Maintaining a 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>";
......
......@@ -368,7 +368,6 @@ function book_body($node) {
}
function book_view($node, $main = 0) {
global $mod;
/*
** Always display the most recently approved revision of a node
......@@ -376,7 +375,7 @@ function book_view($node, $main = 0) {
** the moderation queue.
*/
if ($node->moderate && $mod != "queue") {
if ($node->moderate && arg(0) != "queue") {
$revision = book_revision_load($node, array("moderate" => 0, "status" => 1));
if ($revision) {
......@@ -777,7 +776,7 @@ function book_help() {
$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, it 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>Maintaining a FAQ using a collaborative book</h3>";
$output .= "<a id=\"faq\"></a><h3>Maintaining a 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>";
......
......@@ -198,7 +198,7 @@ function cloud_block($op = "list", $delta = 0) {
}
else {
$block["subject"] = t("Site cloud");
$block["content"] = cloud_list(20) ."<div align=\"right\">". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."</div>";
$block["content"] = cloud_list(20) ."<div style=\"text-align: right;\">". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."</div>";
return $block;
}
}
......
......@@ -140,7 +140,7 @@ function comment_access($op, $comment) {
function comment_form($edit) {
global $user;
$form .= "<a name=\"comment\"></a>\n";
$form .= "<a id=\"comment\"></a>\n";
// name field:
$form .= form_item(t("Your name"), format_name($user));
......@@ -414,10 +414,10 @@ function comment_view($comment, $links = "", $visible = 1) {
if (node_is_new($comment->nid, $comment->timestamp)) {
$comment->new = 1;
print "<a name=\"new\"></a>\n";
print "<a id=\"new\"></a>\n";
}
print "<a name=\"$comment->cid\"></a>\n";
print "<a id=\"$comment->cid\"></a>\n";
if ($visible) {
$comment->comment = check_output($comment->comment);
......@@ -469,7 +469,7 @@ function comment_render($node, $cid = 0) {
$comments_per_page = $user->comments_per_page ? $user->comments_per_page : variable_get("comment_default_per_page", "50");
}
print "<a name=\"comment\"></a>\n";
print "<a id=\"comment\"></a>\n";
if ($cid) {
......@@ -478,7 +478,7 @@ function comment_render($node, $cid = 0) {
** Single comment view
*/
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
print form_hidden("nid", $nid);
$result = db_query("SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users", $cid);
......@@ -488,9 +488,9 @@ function comment_render($node, $cid = 0) {
}
if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) {
print "<div align=\"center\">". form_submit(t("Moderate comment")) ."</div><br />";
print "<div style=\"text-align: center;\">". form_submit(t("Moderate comment")) ."</div><br />";
}
print "</form>";
print "</div></form>";
}
else {
......@@ -521,13 +521,13 @@ function comment_render($node, $cid = 0) {
$comment_num = db_num_rows($result);
if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
theme("box", "", theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid);
print "</form>";
print "</div></form>";
}
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
print form_hidden("nid", $nid);
if ($comment_num) {
......@@ -582,7 +582,7 @@ function comment_render($node, $cid = 0) {
theme("comment_flat_expanded", $comments, $threshold_min);
if (comment_user_can_moderate($node) && $show_moderate_button) {
print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />";
print "<div style=\"text-align: center;\">". form_submit(t("Moderate comments")) ."</div><br />";
}
}
else if ($mode == 3) {
......@@ -635,18 +635,18 @@ function comment_render($node, $cid = 0) {
}
if (comment_user_can_moderate($node) && $show_moderate_button) {
print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />";
print "<div style=\"text-align: center;\">". form_submit(t("Moderate comments")) ."</div><br />";
}
}
}
print "</form>";
print "</div></form>";
if ($comment_num && ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
theme("box", t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid);
print "</form>";
print "</div></form>";
}
}
......@@ -1293,7 +1293,7 @@ function comment_thread_max($comment, $threshold, $level = 0) {
*/
if ($level) {
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td width=\"". ($level * 25) ."\">&nbsp;</td><td>\n";
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td style=\"width: ". ($level * 25) ."px;\">&nbsp;</td><td>\n";
}
comment_view($comment, comment_links($comment, 0), comment_visible($comment, $threshold));
......
......@@ -140,7 +140,7 @@ function comment_access($op, $comment) {
function comment_form($edit) {
global $user;
$form .= "<a name=\"comment\"></a>\n";
$form .= "<a id=\"comment\"></a>\n";
// name field:
$form .= form_item(t("Your name"), format_name($user));
......@@ -414,10 +414,10 @@ function comment_view($comment, $links = "", $visible = 1) {
if (node_is_new($comment->nid, $comment->timestamp)) {
$comment->new = 1;
print "<a name=\"new\"></a>\n";
print "<a id=\"new\"></a>\n";
}
print "<a name=\"$comment->cid\"></a>\n";
print "<a id=\"$comment->cid\"></a>\n";
if ($visible) {
$comment->comment = check_output($comment->comment);
......@@ -469,7 +469,7 @@ function comment_render($node, $cid = 0) {
$comments_per_page = $user->comments_per_page ? $user->comments_per_page : variable_get("comment_default_per_page", "50");
}
print "<a name=\"comment\"></a>\n";
print "<a id=\"comment\"></a>\n";
if ($cid) {
......@@ -478,7 +478,7 @@ function comment_render($node, $cid = 0) {
** Single comment view
*/
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
print form_hidden("nid", $nid);
$result = db_query("SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users", $cid);
......@@ -488,9 +488,9 @@ function comment_render($node, $cid = 0) {
}
if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) {
print "<div align=\"center\">". form_submit(t("Moderate comment")) ."</div><br />";
print "<div style=\"text-align: center;\">". form_submit(t("Moderate comment")) ."</div><br />";
}
print "</form>";
print "</div></form>";
}
else {
......@@ -521,13 +521,13 @@ function comment_render($node, $cid = 0) {
$comment_num = db_num_rows($result);
if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) {
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
theme("box", "", theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page));
print form_hidden("nid", $nid);
print "</form>";
print "</div></form>";
}
print "<form method=\"post\" action=\"". url("comment") ."\">\n";
print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n";
print form_hidden("nid", $nid);
if ($comment_num) {
......@@ -582,7 +582,7 @@ function comment_render($node, $cid = 0) {
theme("comment_flat_expanded", $comments, $threshold_min);
if (comment_user_can_moderate($node) && $show_moderate_button) {
print "<div align=\"center\">". form_submit(t("Moderate comments")) ."</div><br />";
print "<div style=\"text-align: center;\">". form_submit(t("Moderate comments")) ."</div><br />";
}
}
else if ($mode == 3) {
......@@ -635,18 +635,18 @@ function comment_render($node, $cid = 0) {