- Committed Adrian's item patch. It would be nice if one or more of the

standard themes could be updated to demonstrate the possibilities.
4.2.x
Dries Buytaert 2003-04-29 20:48:50 +00:00
parent 5ce6e015d0
commit 2d6408dff3
4 changed files with 36 additions and 12 deletions

View File

@ -34,7 +34,11 @@ function node_title_list($result, $title = NULL) {
$items[] = l($node->title, "node/view/$node->nid", array("title" => t("Comments: %number", array("%number" => $number)))); $items[] = l($node->title, "node/view/$node->nid", array("title" => t("Comments: %number", array("%number" => $number))));
} }
return theme("theme_item_list", $items, $title); return theme("theme_node_list", $items, $title);
}
function theme_node_list($items, $title) {
return theme("theme_item_list",$items,$title);
} }
// Update the 'last viewed' timestamp of the specified node for current user. // Update the 'last viewed' timestamp of the specified node for current user.

View File

@ -34,7 +34,11 @@ function node_title_list($result, $title = NULL) {
$items[] = l($node->title, "node/view/$node->nid", array("title" => t("Comments: %number", array("%number" => $number)))); $items[] = l($node->title, "node/view/$node->nid", array("title" => t("Comments: %number", array("%number" => $number))));
} }
return theme("theme_item_list", $items, $title); return theme("theme_node_list", $items, $title);
}
function theme_node_list($items, $title) {
return theme("theme_item_list",$items,$title);
} }
// Update the 'last viewed' timestamp of the specified node for current user. // Update the 'last viewed' timestamp of the specified node for current user.

View File

@ -351,10 +351,10 @@ function user_block($op = "list", $delta = 0) {
break; break;
case 1: case 1:
if ($user->uid) { if ($user->uid) {
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.create")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.create"));
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.view")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.view"));
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.settings")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.settings"));
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.misc")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.misc"));
$output = implode($content, "<br />"); $output = implode($content, "<br />");
@ -370,7 +370,7 @@ function user_block($op = "list", $delta = 0) {
$items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid"); $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid");
} }
$output = theme("theme_item_list", $items); $output = theme("theme_user_list", $items);
$block["subject"] = t("Who's new"); $block["subject"] = t("Who's new");
$block["content"] = $output; $block["content"] = $output;
@ -379,6 +379,14 @@ function user_block($op = "list", $delta = 0) {
} }
} }
function theme_user_list($items, $title = '') {
return theme("theme_item_list",$items, $title);
}
function theme_menu_list($items, $title = '') {
return theme("theme_item_list",$items, $title);
}
function user_link($type) { function user_link($type) {
$links = array(); $links = array();

View File

@ -351,10 +351,10 @@ function user_block($op = "list", $delta = 0) {
break; break;
case 1: case 1:
if ($user->uid) { if ($user->uid) {
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.create")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.create"));
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.view")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.view"));
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.settings")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.settings"));
$content[] = theme("theme_item_list", module_invoke_all("link", "menu.misc")); $content[] = theme("theme_menu_list", module_invoke_all("link", "menu.misc"));
$output = implode($content, "<br />"); $output = implode($content, "<br />");
@ -370,7 +370,7 @@ function user_block($op = "list", $delta = 0) {
$items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid"); $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid");
} }
$output = theme("theme_item_list", $items); $output = theme("theme_user_list", $items);
$block["subject"] = t("Who's new"); $block["subject"] = t("Who's new");
$block["content"] = $output; $block["content"] = $output;
@ -379,6 +379,14 @@ function user_block($op = "list", $delta = 0) {
} }
} }
function theme_user_list($items, $title = '') {
return theme("theme_item_list",$items, $title);
}
function theme_menu_list($items, $title = '') {
return theme("theme_item_list",$items, $title);
}
function user_link($type) { function user_link($type) {
$links = array(); $links = array();