when comment form is set to be below comments the talk module shows a "Add comment" link in the talk page
it shouldn't be, instead it might have a local anchor to scroll the page down to the comment form already shown
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | talk.patch | 1.44 KB | agentrickard |
Comments
Comment #1
volocuga commentedFound same problem...Here is my way (drupal 5):
Open talk.module
Around line 191 you will see :
$output .= '<p>' . l(t('Add new comment'), "comment/reply/$node->nid") . '</p>';Add span class for link
$output .= '<p><span class="talk-add-comment">' . l(t('Add new comment'), "comment/reply/$node->nid") . '</span></p>';Now you can hide or theme it by css.To hide:
span.talk-add-comment {display:none;}Note,I am not coder,so method above is stupid may be :) But simple
Comment #2
arhak commented@volocuga: thanks for your workaround, it might help others
still, the "feature request" remains
Comment #3
avpadernoComment #4
avpadernoI am changing the referring version to the last available. Is the report still valid for this version?
Comment #5
avpadernoThe report is still valid for the 6.x-1.5 version.
Comment #6
agentrickardHere's a fix. This is an svn formatted patch, so maybe someone can update it.
Comment #7
avpadernoI don't see anything wrong with the attached patch. I am not sure what the difference between SVN, and CVS patch would be.
I tested it, and it works for me.
Comment #8
agentrickardNothing _wrong_, it should apply, it just isn't standard.
http://drupal.org/patch/create
Comment #9
avpadernoI meant that I don't see any significative difference between the format used by the patch you attached, and the format I would normally expect. I am sorry if I was not clear in my statement.
Comment #10
avpadernoComment #11
avpadernoI am changing the status of the report.
Comment #12
cwgordon7 commented@agentrickard - What is the purpose of moving the
$comments = comment_render($node, 0);line up before the if block? I mean, it shouldn't cause any harm, but is there a reason behind the change that I'm missing?Comment #13
avpadernoActually, the code should be optimized a little.
With the patch applied, there is are a line like
if ($add_comments && $node->comment_count > 0) {, and one likeif ($node->comment_count > 1 && $add_comments) {one after the other. It would be preferable to use two nested IFs and avoid to check$add_commentstwice.Comment #14
agentrickard@cwgordon7
No reason. Just a side-effect of how I tested the patch, forgetting that $node->comment_count was already set, I thought I had to load comments before running a check.
I think the change in #13 is a good one, too.
Comment #15
cwgordon7 commentedThis should be fixed in the development release, thanks everyone.
Comment #34
silverwing commentedClosing comments (due to spam)