You can use hook_views_pre_render inside yourimplement hook_views_pre_render()
in a module file.
/**
* Implements hook_views_pre_render
*/
function MYMODULE_views_pre_render(&$view&$view) {
switch ($view->name>name) {
case 'VIEW_NAME':
// Your code here
break;
}
}
-- Edited - This is an old post, module hooks belong in a module file and not in template.php