Remove a code from core module without modifying it(using hooks?) Referring to my question about the removal of "Add new comment" link from the book page links area, is there a way to remove the code with the help of hooks. I am new to implementing hooks. I have found the solution to the problem, but I need a better way to implement it(maybe by hooks, idk).

Edit
I did face a similar problem when I had to comment out the print $tree from the core book module's book-navigation.tpl.php, as it was printing the tree at the bottom of every node, and I didn't want it that way. I used the tree navigation block in my sidebar to navigate through the tree structure. Is there a quick way to do this?
1) The suggested hook_link_alter() (in your linked question) does not exist in Drupal 7 so it doesn't work like you already found out. On the API page there's hook_node_view_alter() being mentioned which can be used instead. You can implement this specific hook both in a module and your theme's template.php file. To unset the comment link the following should work (updated based on the comment by Ajit):

function myThemeOrModule_node_view_alter(&amp;$build) {
  if ($build['#node']-&gt;type == 'book') {
    unset($build['links']['comment']['#links']['comment-add']);
  }
}


If it's not quite right you can try (in your development environment) finding out what to unset by adding the following line inside the function: drupal_set_message('&lt;pre&gt;'.var_export($build['links'], TRUE).'&lt;/pre&gt;'); (until you have a better tool available).

2) Overriding template files is handled like paul-m already mentioned by creating a copy of the necessary tpl.php file inside your theme folder and doing all the changes there.

3) If you end up needing to override theme functions then you should create a copy of it inside your theme's template.php file where you can modify it.

Don't forget to clear the caches after adding a new function or template.