summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator.module15
-rw-r--r--modules/aggregator/aggregator.module15
-rw-r--r--modules/archive.module6
-rw-r--r--modules/archive/archive.module6
-rw-r--r--modules/cloud.module31
-rw-r--r--modules/forum.module1
-rw-r--r--modules/forum/forum.module1
-rw-r--r--modules/import.module15
-rw-r--r--modules/poll.module4
-rw-r--r--modules/poll/poll.module4
-rw-r--r--modules/user.module12
-rw-r--r--modules/user/user.module12
12 files changed, 70 insertions, 52 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module
index ed70162b4..3dc3b22cc 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -71,13 +71,14 @@ function import_format_item($item, $feed = 0) {
global $user;
if ($user->uid && user_access("maintain personal blog")) {
- $output .= l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+// $output .= "&nbsp;". l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+ $output .= "<div class=\"blog-it\">(". l("b", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."))) .")</div>";
}
// external link
$output .= "<a href=\"$item->link\">$item->title</a>";
- return $output ."<br />";
+ return $output;
}
function import_bundle_block($attributes) {
@@ -89,20 +90,22 @@ function import_bundle_block($attributes) {
$result = db_query_range("SELECT * FROM item WHERE ". implode(" OR ", $where) ." ORDER BY iid DESC", 0, variable_get("import_block_limit", 15));
}
+ $output = "<div class=\"item-list\"><ul>";
while ($item = db_fetch_object($result)) {
- $output .= import_format_item($item);
+ $output .= "<li>". import_format_item($item) ."</li>";
}
+ $output .= "</ul></div>";
return $output;
}
function import_feed_block($feed) {
$result = db_query_range("SELECT * FROM item WHERE fid = %d ORDER BY iid DESC ", $feed->fid, 0, variable_get("import_block_limit", 15));
-
+ $output = "<div class=\"item-list\"><ul>";
while ($item = db_fetch_object($result)) {
- $output .= import_format_item($item);
+ $output .= "<li>". import_format_item($item) ."</li>";
}
-
+ $output .= "</ul></div>";
return $output;
}
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index ed70162b4..3dc3b22cc 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -71,13 +71,14 @@ function import_format_item($item, $feed = 0) {
global $user;
if ($user->uid && user_access("maintain personal blog")) {
- $output .= l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+// $output .= "&nbsp;". l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+ $output .= "<div class=\"blog-it\">(". l("b", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."))) .")</div>";
}
// external link
$output .= "<a href=\"$item->link\">$item->title</a>";
- return $output ."<br />";
+ return $output;
}
function import_bundle_block($attributes) {
@@ -89,20 +90,22 @@ function import_bundle_block($attributes) {
$result = db_query_range("SELECT * FROM item WHERE ". implode(" OR ", $where) ." ORDER BY iid DESC", 0, variable_get("import_block_limit", 15));
}
+ $output = "<div class=\"item-list\"><ul>";
while ($item = db_fetch_object($result)) {
- $output .= import_format_item($item);
+ $output .= "<li>". import_format_item($item) ."</li>";
}
+ $output .= "</ul></div>";
return $output;
}
function import_feed_block($feed) {
$result = db_query_range("SELECT * FROM item WHERE fid = %d ORDER BY iid DESC ", $feed->fid, 0, variable_get("import_block_limit", 15));
-
+ $output = "<div class=\"item-list\"><ul>";
while ($item = db_fetch_object($result)) {
- $output .= import_format_item($item);
+ $output .= "<li>". import_format_item($item) ."</li>";
}
-
+ $output .= "</ul></div>";
return $output;
}
diff --git a/modules/archive.module b/modules/archive.module
index 5953223ba..45391227d 100644
--- a/modules/archive.module
+++ b/modules/archive.module
@@ -170,9 +170,9 @@ function archive_page() {
$months = array(1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December"));
for ($i = 1; $i <= 31; $i++) $days[$i] = $i;
- $start = form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
- $start = ereg_replace("<[/]?p>", "", $start);
-
+ $start = "<div class=\"inline-container\">";
+ $start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
+ $start .= "</div>";
theme("box", t("Archives"), form($start));
/*
diff --git a/modules/archive/archive.module b/modules/archive/archive.module
index 5953223ba..45391227d 100644
--- a/modules/archive/archive.module
+++ b/modules/archive/archive.module
@@ -170,9 +170,9 @@ function archive_page() {
$months = array(1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December"));
for ($i = 1; $i <= 31; $i++) $days[$i] = $i;
- $start = form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
- $start = ereg_replace("<[/]?p>", "", $start);
-
+ $start = "<div class=\"inline-container\">";
+ $start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
+ $start .= "</div>";
theme("box", t("Archives"), form($start));
/*
diff --git a/modules/cloud.module b/modules/cloud.module
index 339fedc38..45e5ae764 100644
--- a/modules/cloud.module
+++ b/modules/cloud.module
@@ -141,25 +141,40 @@ function cloud_list($limit = 10) {
$hour = -1;
$list = -1;
-
+ $inlist = false;
+ $output .= "<div class=\"item-list\">";
while ($site = db_fetch_object($result)) {
if ($hour != floor((time() - $site->timestamp) / 3600)) {
$hour = floor((time() - $site->timestamp) / 3600);
if ($hour < 12) {
+ if ($inlist) {
+ $output .= "</ul>";
+ $inlist = false;
+ }
if ($hour == 0) {
- $output .= "<br />". t("Updated less than one hour ago:");
- }
- else {
- $output .= "<br />". format_plural($hour, "Updated an hour ago:", "Updated %count hours ago:");
+ $output .= t("Updated less than one hour ago:");
+ }
+ else {
+ $output .= format_plural($hour, "Updated an hour ago:", "Updated %count hours ago:");
}
}
else if ($list) {
- $output .= "<br />". format_plural($hour, "Updated more than an hour ago:", "Updated more than %count hours ago:");
+ if ($inlist) {
+ $output .= "</ul>";
+ $inlist = false;
+ }
+ $output .= format_plural($hour, "Updated more than an hour ago:", "Updated more than %count hours ago:");
$list = 0;
}
}
- $output .= "<div style=\"padding-left: 10px;\"><a href=\"$site->link\">$site->name</a></div>";
+ if (!$inlist) {
+ $output .= "<ul>";
+ $inlist = true;
+ }
+ $output .= "<li><a href=\"$site->link\">$site->name</a></li>";
}
+ if ($inlist) $output .= "</ul>";
+ $output .= "</div>";
return $output;
}
@@ -180,7 +195,7 @@ function cloud_block($op = "list", $delta = 0) {
}
else {
$block["subject"] = t("Site cloud");
- $block["content"] = cloud_list(20) ."<br /><div align=\"right\">". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."</div>";
+ $block["content"] = cloud_list(20) ."<div align=\"right\">". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."</div>";
return $block;
}
}
diff --git a/modules/forum.module b/modules/forum.module
index a1ea30a38..862c5b4e4 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -87,7 +87,6 @@ function forum_block($op = "list", $delta = 0) {
if (empty($cache)) {
unset($items);
$content = node_title_list(db_query_range("SELECT n.nid, n.title, u.uid, u.name, GREATEST(n.created, MAX(c.timestamp)) AS sort FROM node n, forum f LEFT JOIN comments c ON c.nid = n.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'forum' AND n.nid = f.nid AND n.status = 1 GROUP BY n.nid ORDER BY sort DESC", 0, variable_get("forum_block_num", "5")), t("Active forum topics:"));
- $content .= "<br />";
unset ($items);
$content .= node_title_list(db_query_range("SELECT n.nid, n.title, u.uid, u.name FROM node n LEFT JOIN forum f ON n.nid = f.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'forum' ORDER BY n.nid DESC", 0, variable_get("forum_block_num", "5")), t("New forum topics:"));
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index a1ea30a38..862c5b4e4 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -87,7 +87,6 @@ function forum_block($op = "list", $delta = 0) {
if (empty($cache)) {
unset($items);
$content = node_title_list(db_query_range("SELECT n.nid, n.title, u.uid, u.name, GREATEST(n.created, MAX(c.timestamp)) AS sort FROM node n, forum f LEFT JOIN comments c ON c.nid = n.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'forum' AND n.nid = f.nid AND n.status = 1 GROUP BY n.nid ORDER BY sort DESC", 0, variable_get("forum_block_num", "5")), t("Active forum topics:"));
- $content .= "<br />";
unset ($items);
$content .= node_title_list(db_query_range("SELECT n.nid, n.title, u.uid, u.name FROM node n LEFT JOIN forum f ON n.nid = f.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'forum' ORDER BY n.nid DESC", 0, variable_get("forum_block_num", "5")), t("New forum topics:"));
diff --git a/modules/import.module b/modules/import.module
index ed70162b4..3dc3b22cc 100644
--- a/modules/import.module
+++ b/modules/import.module
@@ -71,13 +71,14 @@ function import_format_item($item, $feed = 0) {
global $user;
if ($user->uid && user_access("maintain personal blog")) {
- $output .= l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+// $output .= "&nbsp;". l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+ $output .= "<div class=\"blog-it\">(". l("b", "node/add/blog&amp;iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."))) .")</div>";
}
// external link
$output .= "<a href=\"$item->link\">$item->title</a>";
- return $output ."<br />";
+ return $output;
}
function import_bundle_block($attributes) {
@@ -89,20 +90,22 @@ function import_bundle_block($attributes) {
$result = db_query_range("SELECT * FROM item WHERE ". implode(" OR ", $where) ." ORDER BY iid DESC", 0, variable_get("import_block_limit", 15));
}
+ $output = "<div class=\"item-list\"><ul>";
while ($item = db_fetch_object($result)) {
- $output .= import_format_item($item);
+ $output .= "<li>". import_format_item($item) ."</li>";
}
+ $output .= "</ul></div>";
return $output;
}
function import_feed_block($feed) {
$result = db_query_range("SELECT * FROM item WHERE fid = %d ORDER BY iid DESC ", $feed->fid, 0, variable_get("import_block_limit", 15));
-
+ $output = "<div class=\"item-list\"><ul>";
while ($item = db_fetch_object($result)) {
- $output .= import_format_item($item);
+ $output .= "<li>". import_format_item($item) ."</li>";
}
-
+ $output .= "</ul></div>";
return $output;
}
diff --git a/modules/poll.module b/modules/poll.module
index d0fa6f9ef..d0a617d6b 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -306,8 +306,8 @@ function poll_view_results(&$node, $main, $block, $links) {
$percentage = round($node->chvotes[$key] * 100 / max($votestotal, 1));
$output .= "<div class=\"poll-text\">". filter($value) ."</div>";
- $output .= "<div style=\"float:left; width:". $width ."%; height: 1em;\" class=\"poll-foreground\"></div>";
- $output .= "<div style=\"float:left; width:". (100 - $width) ."%; height: 1em;\" class=\"poll-background\"></div>";
+ $output .= "<div style=\"width:". $width ."%;\" class=\"poll-foreground\"></div>";
+ $output .= "<div style=\"width:". (100 - $width) ."%;\" class=\"poll-background\"></div>";
$output .= "<div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div>";
}
}
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index d0fa6f9ef..d0a617d6b 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -306,8 +306,8 @@ function poll_view_results(&$node, $main, $block, $links) {
$percentage = round($node->chvotes[$key] * 100 / max($votestotal, 1));
$output .= "<div class=\"poll-text\">". filter($value) ."</div>";
- $output .= "<div style=\"float:left; width:". $width ."%; height: 1em;\" class=\"poll-foreground\"></div>";
- $output .= "<div style=\"float:left; width:". (100 - $width) ."%; height: 1em;\" class=\"poll-background\"></div>";
+ $output .= "<div style=\"width:". $width ."%;\" class=\"poll-foreground\"></div>";
+ $output .= "<div style=\"width:". (100 - $width) ."%;\" class=\"poll-background\"></div>";
$output .= "<div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div>";
}
}
diff --git a/modules/user.module b/modules/user.module
index acb08673b..0e1fa4647 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -352,15 +352,13 @@ function user_block($op = "list", $delta = 0) {
break;
case 1:
if ($user->uid) {
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.create"));
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.view"));
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.settings"));
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.misc"));
-
- $output = implode($content, "<br />");
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.create"));
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.view"));
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.settings"));
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.misc"));
$block["subject"] = $user->name;
- $block["content"] = "<div style=\"{ white-space: nowrap; }\">$output</div>";
+ $block["content"] = "<div style=\"white-space: nowrap;\">$output</div>";
return $block;
}
break;
diff --git a/modules/user/user.module b/modules/user/user.module
index acb08673b..0e1fa4647 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -352,15 +352,13 @@ function user_block($op = "list", $delta = 0) {
break;
case 1:
if ($user->uid) {
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.create"));
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.view"));
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.settings"));
- $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.misc"));
-
- $output = implode($content, "<br />");
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.create"));
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.view"));
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.settings"));
+ $output .= theme("theme_menu_list", module_invoke_all("link", "menu.misc"));
$block["subject"] = $user->name;
- $block["content"] = "<div style=\"{ white-space: nowrap; }\">$output</div>";
+ $block["content"] = "<div style=\"white-space: nowrap;\">$output</div>";
return $block;
}
break;