Which hook or tpl file controls the output of a view (to manipulate the results)? I am creating a recurring events views page, but currently the output of my view is displaying multiple references of the same date event. I am also not using Fields as an output, I am using content|teaser. 

I have come up with 2 methods of resolving this issue, but wanted to clarify which is best and how to go about it.


Find a hook that outputs the Views rows and then write a conditional to compare each row and delete the duplicates.
Create a tpl file and do a preg_replace() on the views output to delete duplicate rows of the same data.


Now the question is how do i go about finding this hook or what to name the Views tpl file as? I only want it specific to this events page.
Views Template Suggestion

All views templates can be overridden with a variety of names, using the view, the display ID of the view, the display type of the view, or some combination thereof.

Below are different template suggestions you can use for overriding the defaults.

Let consider a example View, named foobar. Style: unformatted. Row style: Fields. Display: Page.

Display output: This controls the structure of the overall view, including the position of and code around the view administrative links, header, exposed filters, pager, "more" link, footer and feed icon. This template also controls the position of and code around the primary view content, empty content, and attached views.

views-view--foobar--page.tpl.php
views-view--page.tpl.php
views-view--foobar.tpl.php
views-view.tpl.php


Style output: This controls the structure of this particular view display's style, e.g. HTML List, Table, Unformatted, etc. This includes the view title and the code surrounding each row (item in your view) of the given style.

views-view-unformatted--foobar--page.tpl.php
views-view-unformatted--page.tpl.php
views-view-unformatted--foobar.tpl.php
views-view-unformatted.tpl.php


Row style output: This controls the internal structure of each row (item in your view), including the label and the content for each field.

views-view-fields--foobar--page.tpl.php
views-view-fields--page.tpl.php
views-view-fields--foobar.tpl.php
views-view-fields.tpl.php


Fields: There will be one entry for each field in your display, allowing you to control the structure and code for each. If your row style is set to "Node," there won't be any field entries, and the view will use the node's template file instead.

Lets take you have added Title field in the field list, then below are the suggestion to theme title field

views-view-field.tpl.php
views-view-field--title.tpl.php
views-view-field--foobar.tpl.php
views-view-field--foobar--title.tpl.php
views-view-field--page.tpl.php
views-view-field--page--title.tpl.phpfoobar
views-view-field--foobar--page.tpl.php
views-view-field--foobar--page--title.tpl.php
views-view-field--page-1.tpl.php
views-view-field--page-1--title.tpl.php
views-view-field--foobar--page-1.tpl.php
views-view-field--foobar--page-1--title.tpl.php


Views Preprocessors suggestion
If you want to alter the display of any view with preprocess functions, then you can use the below suggestions to modify the display of any view.



Altering Views result
To alter the result of the view itself(i.e modifying the results before its being rendered) you can use any of the following hook,


hook_views_pre_render
hook_views_post_execute


For using these hooks, you can refer the answer by jimajamma.

References


https://api.drupal.org/api/views/theme!theme.inc/group/views_templates/7
http://www.ostraining.com/blog/drupal/views-templates/
http://webpartners.es/en/drupal-7-views-templates-and-preprocess
https://api.drupal.org/api/views/theme!theme.inc/7
https://drupal.org/node/352970
Why doesn&#39;t adding results in hook_views_pre_render work?