I've tried adding many functions to the template.php file, and have come up with nothing but errors....

So if I was to add this function.

if (module_exists('advanced_profile')) {
$vars = advanced_profile_addvars($hook, $vars);
}

Where would I do it?