Create buttons on action from ResultTasks
By "buttons", I assume you mean the buttons referenced in the screenshot below.

It's not recommended to edit the .tpl files directly - it's hard to maintain, and will be overwritten any time you upgrade.  Instead, it's preferable to use an extension with hook_civicrm_links, which allows you to inject your own links.

My Fast Action Links extension also provides a framework for adding links; you can either use it directly if it makes sense, or use it as an example of how to inject links to search results.