Posted by jason342 on
I want your opinion on the matter whether this will cause any unforeseen problems in the drupal or not.
I want to remove 'reply' from comments, I found a quick way to do it, by simply placing ‘//’ to omit the 'reply' link in modules/comment.module:
Before:
$links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");After:
// $links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");It worked, but will this cause any issues?
I’ve tested it and everything works fine, but I’m worried about unforeseen problems, will there be any?
Thanks!
Comments
I wanted to test this
This could be usefull to manage comments for articles, you can trash a comment without destroying the next ones, but did you test it in forums ???
I don’t recommend you
I don’t recommend you applying it just yet until we find out from a knowledgeable member if that procedure does not cause any problems in drupal.
What that does is remove the ‘reply’ button from displaying in article comments and forums. i.e. stopping users from replying to articles/forum topics via the reply link. Instead users are forced to use the comment form all the time in order to leave a comment.
So, does anybody have any knowledge whether this procedure will cause problems or not?
anyone?
anyone?
shouldn't cause a problem.
shouldn't cause a problem. make a note that you've done this. When/If an update is release to the comment module your change will be overwritten and you will have to make this change again.
Thanks for confirming this
Thanks for confirming this procedure is ok to do, VeryMisunderstood.
Also, your advice also applies to when a new version of drupal is out, say 4.7.5 for example and not just a new update of the comment module, right?
Since I recall you telling me in order to update old drupal to new I just overwrite the old drupal files with the new one, replacing all the core files. I guess this means module/comment.module, yes?
correct. because the
correct. because the comment.module is part of core. any time your drupal core is updated so too will the module be.
Thank you!
Thank you.
I have a question VM,
I have a question VM,
By omitting that line would it not cause problems for other codes that are associated with this line I am omitting out?
For example I’m sure there are codes that indirectly attached to the line I am taking out?
I got a slight worry feeling that I am causing some problem by doing this.
the line that you commented
the line that you commented out. it's only function is to display the reply link and to inform drupal core where in the thread to insert the comment. by commenting out the link, the reply link is removed. Obviously if you use threaded comments they will no longer work. As youve removed the reply link.
add new comment links still function properly.
There is no secondary effects to removing the reply link from comments as previously stated. There is no "other" code that references this line of code that you commented out.
Thanks for clearing that up
Thanks for clearing that up VM. I feel more confident implementing it now. And you're right, I will not be using threaded comments.
Just for the record, I use the ‘comment form’ that shows at the end of the comment page option, instead of a “add new comment” link.
Not that I believe it would effect the code I’m commenting out, after your clear clarification. But just thought to mention it just incase it does.
correct. no effect.
correct. no effect.