Page 1 of 1

How to create a new admin theme (without erasing the default) ?

Posted: Thu Jan 11, 2007 6:58 pm
by leMich
Hi,

i'm trying to make a theme for the admin part. I don't want to edit the default one, i want to make a second theme, and choose in the admin panel wich theme i want to use. I tried to duplicate the admin/default folder, rename it and select it in the admin. But when i edit the css in the new folder, nothing happens. I think the css path is always pointing to the default folder. Has anyone a solution ? What is the good method to create an admin theme ?

Re: How to create a new admin theme (without erasing the default) ?

Posted: Thu Jan 11, 2007 7:48 pm
by Dee
Hi,
The folder name (default) is used in quite some files:

Code: Select all

themes # find * | xargs grep /default
default/css/style.css:   background: url(themes/default/images/vstippled.gif) repeat-y right top;
default/css/style.css:   background: url(themes/default/images/vstippled.gif) repeat-y left top;
default/css/style.css:   background: url(themes/default/images/show_navtools.gif) no-repeat;
default/css/style.css:   background: url(themes/default/images/hide_navtools.gif) no-repeat;
default/css/style.css:   background-image: url(themes/default/images/icons/topfiles/shortcut.gif);
default/css/style.css:   background: #fff url(themes/default/images/hstippled.gif) repeat-x center;
default/css/style.css:   list-style-image: url("themes/default/images/icons/system/stop.gif");
default/defaultTheme.php:               echo '<div><p class="logocontainer"><img src="themes/default/images/logo.gif" alt="" /><span class="logotext">'.lang('adminpaneltitle').'</span></p></div>';
default/defaultTheme.php:               echo '<__script__ type="text/javascript" src="themes/default/includes/standard.js"></__script>';
default/login.php:<__script__ src="themes/default/includes/standard.js" type="text/javascript"></__script>
default/login.php:      <div class="lblayout lbtopmargin"><p><img src="themes/default/images/logo.gif" alt="" /><span class="logotext"><?php echo lang('logintitle')?></span></p></div>
Regards,
D

Re: How to create a new admin theme (without erasing the default) ?

Posted: Thu Jan 11, 2007 7:58 pm
by Dee
Also, you have to rename the defaultTheme.php to yourthemeTheme.php and edit it to change

Code: Select all

class defaultTheme extends AdminTheme
into

Code: Select all

class yourthemeTheme extends AdminTheme
Hope that helps,
D

Re: How to create a new admin theme (without erasing the default) ?

Posted: Fri Jan 12, 2007 6:07 am
by cyberman
Dee wrote:

Code: Select all

class yourthemeTheme extends AdminTheme
Thanx for that :). Searched, but never found.

Re: How to create a new admin theme (without erasing the default) ?

Posted: Mon Mar 26, 2007 12:49 pm
by 10010110
I’m exactly about to do that as a client asked me to skin the admin interface with their company colors/logo etc. However, I can’t find this line:

Code: Select all

themes # find * | xargs grep /default
I changed all the other occurrences of the default folder reference and it’s showing, for example, the company logo on the login screen alright. But after logging in it still shows the default user interface and the source code reveals that it’s still looking for the default directory. Does this one line that I mentioned above have something to do with this? Or where do I have to look for this?
Any help is appreciated.

Re: How to create a new admin theme (without erasing the default) ?

Posted: Mon Mar 26, 2007 1:10 pm
by cyberman
Have you choose new admin template in admin panel?

Re: How to create a new admin theme (without erasing the default) ?

Posted: Mon Mar 26, 2007 1:57 pm
by RonnyK
You won't find that line, as it is the unix-command Dee used to go through all files to see where the word default is used. All lines below that line are the results of that command.

themes is the dir he is in:
find is the command
/default is the string he is looking for

Ronny

Re: How to create a new admin theme (without erasing the default) ?

Posted: Mon Mar 26, 2007 5:13 pm
by Dee
10010110 wrote: I’m exactly about to do that as a client asked me to skin the admin interface with their company colors/logo etc. However, I can’t find this line:

Code: Select all

themes # find * | xargs grep /default
I changed all the other occurrences of the default folder reference and it’s showing, for example, the company logo on the login screen alright. But after logging in it still shows the default user interface and the source code reveals that it’s still looking for the default directory. Does this one line that I mentioned above have something to do with this? Or where do I have to look for this?
Any help is appreciated.
As RonnyK explained, that line is just the unix command I used to find occurences of "/default" in the theme files.
If you changed those occurences and renamed defaultTheme.php+changed the class name (as explained above), then you should be able to select your new/own admin theme as Cyberman pointed out (My Preferences » User Preferences).

Because you changed yourtheme/yourthemeTheme.php to contain:

Code: Select all

echo '<div><p class="logocontainer"><img src="themes/yourtheme/images/logo.gif" alt="" /><span class="logotext">'.lang('adminpaneltitle').'</span></p></div>';
it should now be displaying the logo.gif from your theme directory.
You should overwrite logo.gif with your new logo, or make the code point at your logo, like:

Code: Select all

echo '<div><p class="logocontainer"><img src="themes/yourtheme/images/mycompanylogo.gif" alt="" /><span class="logotext">'.lang('adminpaneltitle').'</span></p></div>';
Regards,
D

Re: How to create a new admin theme (without erasing the default) ?

Posted: Thu Mar 29, 2007 11:09 am
by 10010110
Ah OK, I’ve found it. I did everything correctly but I only changed the Administration Theme in the Global Settings. Didn’t know that you have to do that for every user too.
So is the default theme always the default one (haha!) or is it possible to make the custom theme the default? Or should I just have the default theme as the copy while the former default will be customized?

Re: How to create a new admin theme (without erasing the default) ?

Posted: Thu Mar 29, 2007 6:10 pm
by Dee
If I'm correct the theme selected in the Global Settings as "Administration Theme" is used for the login screen and as the "default" theme for new users. The default theme is nothing more than the "standard" theme that comes with CMS Made Simple.

Regards,
D

Re: How to create a new admin theme (without erasing the default) ?

Posted: Tue Jul 17, 2007 9:55 am
by SimonSchaufi
here is an example of a new theme:

defrebirth.zip

in

http://themes.cmsmadesimple.org/Full_Themes.html

you are free to add your own too

Re: How to create a new admin theme (without erasing the default) ?

Posted: Tue Jul 17, 2007 9:59 am
by wuschel
new theme
Admintheme is meaning not a template

Re: How to create a new admin theme (without erasing the default) ?

Posted: Tue Jul 17, 2007 10:01 am
by cyberman
Please make a look at defrebirth.zip :)
new look for admin panel new colours and images much more interesting that's all folks

Re: How to create a new admin theme (without erasing the default) ?

Posted: Tue Jul 17, 2007 10:11 am
by wuschel
Sorry.

Re: How to create a new admin theme (without erasing the default) ?

Posted: Tue Jul 17, 2007 2:48 pm
by SimonSchaufi
wuschel wrote: Sorry.
Vergeben!