then why don't you use the vbulletin function to import style ?
it's xml_import_style() btw.
ok this is what I did:
PHP Code:
// Install templates
require_once(DIR . '/includes/adminfunctions_template.php');
// +++++++++
// XML Temps
// +++++++++
if (!($xml = file_read('./'.$vbulletin->datastore->registry->config[Misc][admincpdir].'/jukebox.xml')))
{
print_form_header('jukebox_install', 'start');
print_table_header("Jukebox 1.1 Installation");
construct_hidden_code('caction', '4');
print_description_row("Error. jukebox.xml located in directory '".$vbulletin->datastore->registry->config[Misc][admincpdir]."' was not found. Please make sure it is uploaded then press the submit button below");
print_submit_row("Add Templates", 0);
}
else
{
$All_Styles = $vbulletin->db->query("select styleid from " . TABLE_PREFIX . "style where parentid < 0"); // Grab master styles only
while($SID = $vbulletin->db->fetch_array($All_Styles))
{
$ID[] = $SID['styleid'];
}
foreach($ID as $StyleID)
{
xml_import_style($xml, $StyleID, -1, '', 1);
}
define('NO_POST_EDITOR_BUILD', true);
build_all_styles();
}
credit goes to Zero Tolerance.