<?php
if (!is_array($cache))
{
	$cache = array();
}

switch (THIS_SCRIPT)
{
	case 'newthread':
		$cache[] = 'dbtech_vbsignatures_newthread';
		$cache[] = 'dbtech_vbsignatures_newthread2';
		$cache[] = 'dbtech_vbsignatures_newthread2_questionbit';
		break;
		
	case 'showthread':
		$cache[] = 'dbtech_vbsignatures_showthread';
		$cache[] = 'dbtech_vbsignatures_showthread_questionbit';
		break;
		
	case 'profile':
		$cache[] = 'dbtech_vbsignatures_modifyavatar';
		break;
}

if ($vbulletin->userinfo['permissions']['dbtech_vbsignaturespermissions'] & $vbulletin->bf_ugp_dbtech_vbsignaturespermissions['canview'])
{
	// Global templates
	$cache[] = 'dbtech_vbsignatures_navbar_link';
	
	if ($vbulletin->options['dbtech_vbsignatures_integration'] & 1 OR $vbulletin->options['dbtech_vbsignatures_integration'] & 2)
	{
		$cache[] = 'dbtech_vbsignatures_quicklinks_link';
	}
}

/*
if (in_array('usercp_nav_folderbit', (array)$cache) OR in_array('usercp_nav_folderbit', (array)$globaltemplates))
{
	/*
	// UserCP templates
	$cache[] = 'dbtech_vbsignatures_usercp_nav_link';
	$cache[] = 'dbtech_vbsignatures_options';
	$cache[] = 'dbtech_vbsignatures_options_bit';
	$cache[] = 'dbtech_vbsignatures_options_bit_bit';
	*/
//}
/*
if (intval($vbulletin->versionnumber) == 3)
{
	$cache[] = 'dbtech_vbsignatures.css';
	
	$globaltemplates = array_merge($globaltemplates, $cache);
}
*/
?>