$copphotos = ''; if (defined('VBA_PORTAL')) { // stick your code in here } // next put the code in a plugin using hook global_start // then use $copphotos in vBa templates under $navbar // tweak to taste