Posted by emeelio on February 9, 2013 at 8:21pm
This was driving me crazy but the solution is SIMPLE:
There are a ton of posts asking how to remove the links but I wanted only the annoying "or" and "to post comments" text removed. To do this go to modules/comment and in line 2374 you will find where this is edited. Simply change the "or" by a space and remove the rest.
Check this photo on how to remove the text.
I hope this helps!
Comments
It is not a good idea to hack
It is not a good idea to hack core modules, as the next time you update drupal, your mods will be overwritten! Instead, you can achieve your results using PHP and some hooks. You can do this in your themes template.php. The following will delete the links entirely, or you can just modify the arrays mentioned for custom text/links.
<?php
function YOURTHEME_OR_MODULE_comment_view_alter(&$comment) {
// Delete the 'Login or register to post' links.
unset($comment['links']['comment']['#links']['comment_forbidden']);
}
function YOURTHEME_OR_MODULE_node_view_alter(&$node) {
// Delete the 'Login or register to post' links.
unset($node['links']['comment']['#links']['comment_forbidden']);
}
?>
You are 100% right dude. I
You are 100% right dude. I guess I was too desperate to get this going. Would you be kind to show me exactly how this hook will look to remove the 2 fields I manually got rid off? I am not sure how to do this.
Otter Creative Studio - San Diego Web Design & SEO