diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-02-09 17:39:40 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-02-09 17:39:40 +0000 |
commit | 9281d0cdd7279b5e0e1d60c75bc38c2ae41c247a (patch) | |
tree | ef8e63c627fcd10c94db50dc7cd6ef93ddc5cc66 /modules/blog.module | |
parent | 6953d95b2d121c86e76379ceeb9ad1af428c64e0 (diff) | |
download | brdo-9281d0cdd7279b5e0e1d60c75bc38c2ae41c247a.tar.gz brdo-9281d0cdd7279b5e0e1d60c75bc38c2ae41c247a.tar.bz2 |
- Applied Alastair's date patch.
- Removed all instances of '$user->nodes'.
- Committed Moshe's taxonomy patch - minus the node_compact_list() bit. It needs a bit more thought/work. This patch changes the links of taxonomy pages/feeds so update your custom code and themes accordingly!
Themes should now use "taxonomy_link("taxonomy terms", $node)" to get an array of taxonomy term links. The old construct is deprecated and should be changed.
// old theme blob:
if (function_exists("taxonomy_node_get_terms")) {
foreach (taxonomy_node_get_terms($node->nid) as $term) {
$terms[] = l($term->name, NULL, array(), "or=$term->tid");
}
}
// new theme blob:
if (module_exist("taxonomy")) {
$terms = taxonomy_link("taxonomy terms", $node);
}
// old URL:
http://foo.com/index.php?or=1,2
// new URL:
http://foo.com/?q=taxonomy/page/or/1,2
Diffstat (limited to 'modules/blog.module')
-rw-r--r-- | modules/blog.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/blog.module b/modules/blog.module index 06747b516..16ac41932 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -155,23 +155,23 @@ function blog_page_user($uid = 0) { $account = $user; } - $result = pager_query("SELECT nid FROM node WHERE type = 'blog' AND uid = '$account->uid' AND status = 1 ORDER BY nid DESC", $user->nodes ? $user->nodes : variable_get("default_nodes_main", 10)); + $result = pager_query("SELECT nid FROM node WHERE type = 'blog' AND uid = '$account->uid' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); while ($node = db_fetch_object($result)) { node_view(node_load(array("nid" => $node->nid)), 1); } - print pager_display(NULL, ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); + 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)))); } function blog_page_last() { global $user, $theme; - $result = pager_query("SELECT nid FROM node WHERE type = 'blog' AND status = 1 ORDER BY nid DESC", $user->nodes ? $user->nodes : variable_get("default_nodes_main", 10)); + $result = pager_query("SELECT nid FROM node WHERE type = 'blog' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); while ($node = db_fetch_object($result)) { $output = node_view(node_load(array("nid" => $node->nid)), 1); } - $output .= pager_display(NULL, ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); + $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."))); return $output; } |