HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

To add more themes to the plugin

vrijvlindervrijvlinder Papillon-Sauvage MVP
edited December 2012 in Feedback

I hope Don Peregrino does not mind, But if you want to add more themes to your Admin Theme collection :

Make another new folder number it, in this case the next one would be 4 and make an images folder in that so as to copy the admin images over and put these folders in the design folder for the Admin Theme plugin.

Next, make a css file to put into the new css folder 4 , copy some new customadmin.css into that.

You wil need to alter the views/admintheme-settings.php $Options array to include the new theme/s you may want to include, I have included number 4, but as far as I know there is no limit.

 $Options = array('0' => 'default theme', '1' => 'Theme 1', '2' => 'Theme 2', '3' => 'Theme 3','4'=> 'Theme 4');

I also altered default.php like this, not sure it matters but it did not hurt so it must be ok unless I am told otherwise.

$admintheme = (C('Plugins.AdminTheme.Name'));
     switch ($admintheme)
       {
       case '1':
            $Sender->AddCssFile($this->GetResource('design/1/customadmin.css', FALSE, FALSE));
            break;
       case '2':
             $Sender->AddCssFile($this->GetResource('design/2/customadmin.css', FALSE, FALSE));
           break;
       
       case '3':
           $Sender->AddCssFile($this->GetResource('design/3/customadmin.css', FALSE, FALSE));
            break;  

       case '4':
           $Sender->AddCssFile($this->GetResource('design/4/customadmin.css', FALSE, FALSE));
            break;  
       
        case '5':
           $Sender->AddCssFile($this->GetResource('customadmin.css', FALSE, FALSE));
            break; 
}

Comments

Sign In or Register to comment.