You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d8cd549
Browse filesBrowse the repository at this point in the historyBrowse files
- Added Marco's long-awaited taxonmy module and patches - a replacement
for the meta system. The patches add some extra functionality to the
comment system (for example, comments can be set read-only) and fix a
couple of small problems.
+ I integrated the required SQL updates from the varius *.mysql files
into the "update.php" script. Upgrading should be easy ...
+ I did not apply/commit the "user.diff" as requested by Marco ...
+ I didn't know what to do with "forum.module" and "forum2.module":
what do you want me to do with it Marco? Which one should go in?
+ Can we remove "node_index()" now; both from "node.module" and the
themes?
+ Thanks Marco!
// here we should check if this node has read-only comments, but we already check on submit
391
+
// and this way we save a query. it's just a cosmetic issue. otherwise just uncomment next
392
+
// line and related bracket some lines below
393
+
394
+
//if (node_comment_mode($comment->nid)) {
381
395
if (user_access("post comments")) {
382
396
if (comment_access("edit", $comment)) {
383
397
$links[] = "<a href=\"module.php?mod=comment&op=edit&id=$comment->cid\" title=\"". t("Make changes to your comment.") ."\"><span style=\"color: $theme->type\">". t("edit your comment") ."</span></a>";
@@ -386,6 +400,7 @@ function comment_links($comment, $return = 1) {
386
400
$links[] = "<a href=\"module.php?mod=comment&op=reply&id=$comment->nid&pid=$comment->cid\" title=\"". t("Reply to this comment.") ."\"><span style=\"color: $theme->type;\">". t("reply to this comment") ."</span></a>";
387
401
}
388
402
}
403
+
//}
389
404
390
405
391
406
return $theme->links($links);
@@ -553,10 +568,10 @@ function comment_search($keys) {
553
568
// index.
554
569
//
555
570
// "select"'s value is used to relate the data from the specific nodes
556
-
// table to the data that the search_index table has in it, and the the
571
+
// table to the data that the search_index table has in it, and the the
557
572
// do_search functino will rank it.
558
573
//
559
-
// The select must always provide the following fields - lno, title,
574
+
// The select must always provide the following fields - lno, title,
560
575
// created, uid, name, count
561
576
//
562
577
// The select statement may optionally provide "nid", which is a secondary
@@ -565,7 +580,7 @@ function comment_search($keys) {
565
580
$find = do_search(array("keys" => $keys,
566
581
"type" => "comment",
567
582
"select" => "select s.lno as lno, c.nid as nid, c.subject as title, c.timestamp as created, u.uid as uid, u.name as name, s.count as count FROM search_index s, comments c LEFT JOIN users u ON c.uid = u.uid WHERE s.lno = c.cid AND s.type = 'comment' AND s.word like '%'"));
** Node page: add a "post comment" link if the user is allowed to
600
-
** post comments.
615
+
** post comments and if this node is not read-only
601
616
*/
602
617
603
618
if (user_access("post comments")) {
604
-
$links[] = "<a href=\"module.php?mod=comment&op=reply&id=$node->nid#comment\" title=\"". t("Share your thoughts and opinions related to this posting.") ."\">". t("add new comment") ."</a>";
619
+
if ($node->comment == 2) {
620
+
$links[] = "<a href=\"module.php?mod=comment&op=reply&id=$node->nid#comment\" title=\"". t("Share your thoughts and opinions related to this posting.") ."\">". t("add new comment") ."</a>";
621
+
} else {
622
+
$links[] = t("This discussion is closed: you can't post new comments.");
623
+
}
605
624
}
606
625
}
607
626
}
@@ -751,14 +770,14 @@ function comment_update_index() {
751
770
// Return an array of values to dictate how to update the search index
752
771
// for this particular type of node.
753
772
//
754
-
// "last_update"'s value is used with variable_set to set the
773
+
// "last_update"'s value is used with variable_set to set the
755
774
// last time this node type (comment) had an index update run.
756
775
//
757
776
// "node_type"'s value is used to identify the node type in the search
758
777
// index (commentt in this case).
759
778
//
760
779
// "select"'s value is used to select the node id and text fields from
761
-
// the table we are indexing. In this case, we also check against the
780
+
// the table we are indexing. In this case, we also check against the
0 commit comments