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

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
leMich
Forum Members
Forum Members
Posts: 68
Joined: Fri Jan 06, 2006 9:39 am

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

Post 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 ?
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

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

Post 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
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

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

Post 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
cyberman

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

Post by cyberman »

Dee wrote:

Code: Select all

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

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

Post 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.
cyberman

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

Post by cyberman »

Have you choose new admin template in admin panel?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

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

Post 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
10010110

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

Post 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?
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

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

Post 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
SimonSchaufi

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

Post 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
wuschel

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

Post by wuschel »

new theme
Admintheme is meaning not a template
cyberman

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

Post 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
SimonSchaufi

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

Post by SimonSchaufi »

wuschel wrote: Sorry.
Vergeben!
Post Reply

Return to “Layout and Design (CSS & HTML)”