During upgrades there are often times changes to the Master HTML Templates that your skins inherit from. If your skin templates are not customized, they will typically inherit changes from the master skin templates. This happens for the IPB Default skin automatically.
Custom skins that you install generally have their own set of template files, and as such may need to be manually updated. If your skin templates are not updated properly, unforseen issues can arise. For example you may see javascript errors on your site, or you may not see options that are present because they are not
reflected in your skin set's templates.
Your Master HTML Templates will be updated automatically during the upgrade process, however in order for them to be effective on the default skin, any skin changes must also be reverted. If you wish to do this manually, you can skip this step below, and log into your Admin Control Panel after the upgrade process has completed
to revert the changes. You would need to edit your IPB Default 2.1 skin set HTML templates, and click the \"Revert\" button for any templates that it appears next to. Alternatively, the upgrader can do this for you.
Because of the different html possibilities present for custom skin sets, the upgrader will not alter these skin sets for you. After your upgrade is complete, it is recommended that you run the \"Skin Differences Tool\" in the Admin Control Panel for your custom skin to determine if you need to make any updates to your
custom skin sets.
Do you wish to revert changes to the '{$default['set_name']}' skin set?(
If this is not your default skin, it is recommended that you skip this step and manually update your templates)
";
}
else
{
$this->ipsclass->template->content .= "
IPB Default Skin not found
This step in the upgrade process allows you to revert skin changes to the default IPB skin, to ensure that the skin updates will inherit to the default skin properly. Your IPB Default Skin was not found. You will be responsible for ensuring that you update your skin templates to ensure that
the changed template bits are applied properly.
";
}
$this->ipsclass->template->output();
}
else
{
$man = intval( $this->ipsclass->input['man'] );
$cnt = 0;
$default = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".$man ) );
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "set_id=".$man ) );
$outer = $this->ipsclass->DB->simple_exec();
if( $this->ipsclass->DB->get_num_rows($outer) )
{
while( $r = $this->ipsclass->DB->fetch_row($outer) )
{
if( $r['set_id'] == 1 )
{
continue;
}
else
{
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_templates', 'where' => 'suid='.$r['suid'] ) );
$cnt++;
}
}
}
$next = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id>".$man, 'orderby' => 'set_skin_set_id ASC', 'limit' => array(0,1) ) );
if( $next['set_skin_set_id'] )
{
$this->ipsclass->core->redirect( "index.php?act=work&workact=skinrevert&skinid={$next['set_skin_set_id']}&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}",
"$cnt skin template bits from skin set '{$default['set_name']}' reverted...." );
}
else
{
$this->ipsclass->core->redirect( "index.php?act=done&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}",
"$cnt skin template bits from skin set '{$default['set_name']}' reverted...." );
}
}
}
/*-------------------------------------------------------------------------*/
// INTRO
/*-------------------------------------------------------------------------*/
function upgrade_intro()
{
$this->ipsclass->template->content .= "
Welcome to the IPB Upgrade System
This upgrade module will upgrade you from
{$this->ipsclass->versions[$this->upgrade_from]} to
{$this->ipsclass->versions[$this->this_version]}
This first step will {$this->first_step}
";
if ( ! is_writeable( CACHE_PATH . 'cache/skin_cache' ) )
{
$this->ipsclass->template->content .= "
WARNING: cache/skin_cache is not writeable
Please check the CHMOD value on this folder before continuing. Failure to do so could mean that
your skin files will not be installed correctly.
";
}
else
{
$this->ipsclass->template->content .= "
Modules to run after this module: {$this->mod_to_run}
";
}
$this->ipsclass->template->output();
}
}
?>