Page 1 of 1

Drupal 7 Remove: "Log in or register to post comments"

Posted: 2023 May 03, 22:55
by Mihai

Code: Select all

[root @ centos drupalroot]$ cd modules/comment/
[root @ centos comment]$ vim comment.module
Replace line 2392

Code: Select all

return t('<a href="@login">Log in</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
with

Code: Select all

return t('<a href="@login"></a><a href="@register"></a> ', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
or

Code: Select all

// return t('<a href="@login">Log in</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
Restart httpd.service

Code: Select all

[root @ centos ~]$ service httpd restart
or

Code: Select all

[root @ centos ~]$ /etc/init.d/httpd restart