Page 1 of 1

Admin Template: anyone created/modified the admin layout?

Posted: Thu Aug 18, 2005 4:44 pm
by Woudloper
Currently I am testing and trying some stuff out with CMS Made Simple and I am wondering (as I could not find much information about this) if someone ever created a custom admin template? So that e.g. the colors (currently they are a bit grey) match the company colors.

Are there any examples available for creating admin templates? If so, and if possible I really would like to see them. A screenshot is enough to give me a impression.

Furthermore I am wondering if it is really possible to easily design a template for the admin section and if the admin section is actual working correctly with the template?

A lot of questions, but I would appriciate it if someone can answer some of them.

Re: Admin Template: anyone created/modified the admin layout?

Posted: Thu Aug 18, 2005 5:27 pm
by sjg
The admin section isn't really written in a standard Smarty-template way, which would have been the right approach. Instead, I came up with a complicated theming system based upon a class which you could override.

The easy approach is to make a copy of the CMSROOT/admin/themes/default directory, and call it something like CMSROOT/admin/themes/mytheme.

Rename the defaultTheme.php file to mythemeTheme.php, and change the class declaration at line 18 from

Code: Select all

class defaultTheme extends AdminTheme
to

Code: Select all

class mythemeTheme extends AdminTheme
Then, you can go in and edit it to your heart's content. Specifically, if you're just wanting to change colors, you'd focus on CMSROOT/admin/themes/mytheme/css/style.css.

You can also change all the icons if you want; they'll be in CMSROOT/admin/themes/mytheme/images

You also have a lot of flexibility in the code itself, if you want it. Look around the theme file, or its base class which is in CMSROOT/lib/classes/class.admintheme.inc.php

I'll be gone over the next ten days, but after that, I'll be around to be helpful.

___Samuel___

Re: Admin Template: anyone created/modified the admin layout?

Posted: Mon Aug 29, 2005 9:30 am
by Woudloper
Thanx for the explenation. I have started developing (and testing arround) with a new admin theme. As I am not experienced with the way you are using PHP (I can only read, understand it and change some stuff) for the admin section with classes, etc.

I read the 'class.admintheme.inc.php' and together with the code which was already in your 'defaultTheme.php' I am testing and trying some stuff out. The first thing I would like to do is: Give the admin console a Title, but I can't get this to work. Do I need to the function SetInitialValues($cms, $userid, $themeName) to my own TestTheme.php file or can I just place the following code somewhere in the class:

Code: Select all

$this->title = 'My Test Theme';
$this->subtitle = 'This is a subtitle testline';
When placing is directly below the class decleration (thus: class TestTheme extend AdminTheme {) I receive the following errormessage:
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in G:\serverroot\cmsmadesimple\admin\themes\cmsnew\cmsnewTheme.php on line 20
Hope you can anser my question.

Re: Admin Template: anyone created/modified the admin layout?

Posted: Wed Jan 11, 2006 11:21 pm
by numer9
is this topic still current, or deprecated?

cause if anyone else is basing on this piece of information, I shall add my addition - you should also change some part of codes to make new theme separate. To be exact, when recurcively grep'ed for "default" string, i found:

Code: Select all

css/style.css:53:
css/style.css:54:
css/style.css:84:
login.php:9:
login.php:14:   
tmontTheme.php:88: 
tmontTheme.php:120: 
so that's 7 more place to go to :) then you got your own admin theme which can be switched from admin panel.

Am I right?

regards,
#9