summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-11-24 12:14:31 +0000
committerDries Buytaert <dries@buytaert.net>2001-11-24 12:14:31 +0000
commit42ecb27802c2ed2b5a6d2452d62818ade183aad1 (patch)
tree32716327c9c7561eba772e92f95138f1a9ba62f0 /modules/node
parent3c7f5559a99744884574b1c5f8ecbaffcc71500a (diff)
downloadbrdo-42ecb27802c2ed2b5a6d2452d62818ade183aad1.tar.gz
brdo-42ecb27802c2ed2b5a6d2452d62818ade183aad1.tar.bz2
A set of updates to the "_link" system:
- Made the /comment links/ jump to the comments instead of to the top of the page. - Replaced the "Add comment"-button by a "add new comment"-link. (This should make UnConeD jump up and down of wild excitement.) - Moved all comment related logic from theme.inc and node.module to comment.inc and comment.module (where they belong). - Added some links to ease the site's usability/navigation.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 53de72abf..6b0dd88fe 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -143,16 +143,16 @@ function node_link($type, $node = 0, $main = 0) {
$links = $node->links;
}
- if ($node->teaser != $node->body && $main) {
- $links[] = "<a href=\"node.php?id=". $node->nid ."\">". t("read more") ."</a>";
+ if ($main && $node->teaser != $node->body) {
+ $links[] = "<a href=\"node.php?id=$node->nid\">". t("read more") ."</a>";
}
- if ($node->comment) {
- $links[] = "<a href=\"node.php?id=". $node->nid ."\">". format_plural(node_get_comments($node->nid), "comment", "comments") ."</a>";
+ if (module_invoke($node->type, "access", "update", $node)) {
+ $links[] = "<a href=\"module.php?mod=node&op=edit&id=$node->nid\">". t("edit") ."</a>";
}
-
+
if (user_access("administer nodes")) {
- $links[] = "<a href=\"admin.php?mod=node&op=edit&id=". $node->nid ."\">". t("edit") ."</a>";
+ $links[] = "<a href=\"admin.php?mod=node&op=edit&id=$node->nid\">". t("administer") ."</a>";
}
}