Themes Explanation Please

Discussion in 'Installation/Configuration' started by motlive, Apr 13, 2010.

  1. motlive

    motlive New Member

    Hi,

    Developing a new theme, however I can not get my head around what themes are what and there is very little documentation regarding this.

    On the System Page > Add New User

    Section says:
    Design: default

    What theme is this for?

    On the Client Page > Add Client
    Theme: Default

    What theme is this for?

    If I duplicate the default theme folder using instructions found on here:

    cp -prf default/ mytheme/

    You find that the System Page > Add New User now displays this theme, however the Add Client Page does not.

    Altering the following file:
    Line 130 of /usr/local/ispconfig/interface/lib/config.inc.php:
    $conf["theme"] = 'default';

    from default to mytheme and then reloading has no affect, I still can not set the theme for the client.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Themes are that what the name says, a theme contains the files that describe the design of the interface.

    This is a known bug which has been fixed in svn. At the moment you can change the theme only in the sys user settings or update to svn version. The theme gets applied after a relogin.
     
  3. motlive

    motlive New Member

    Hi,

    Thanks for that, I fully understand what a theme is, I was asking what themes are for what? Why are there 2 different theme selection pages?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There are no 2 different theme selection pages. There is only one theme setting for a ispconfig user and you can change this one setting from within the user list or the client settings.
     
  5. motlive

    motlive New Member

    Well there are 2 places to select a theme:

    Click "System" > "Add User" and you see:
    [​IMG]

    Click "Client" > "Add Client" and you see:
    [​IMG]
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I explained that already in #4, this is the same setting, as the sys_user depends on the client.
     
  7. motlive

    motlive New Member

    Hi,

    Ok I duplicated the directory, changed header_logo.png to my own, set the client and system page theme to my new template updated line 129-132 of /usr/local/ispconfig/interface/lib/config.inc.php and also the file /usr/local/ispconfig/server/lib/config.inc.php to represent my new theme and it still does not take affect.

    logged out and back in, closed down all sessions and used a browser that I hadnt logged in as before, the old template is still there once I log into the admin account.
     
    Last edited: Apr 15, 2010
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no need to edit these files, they are just relevant for the login screen when no user is logged in. Please see post #2 of this thread on how to set the theme for a user:

    "At the moment you can change the theme only in the sys user settings"

    The sys user settings are: system > cp users > edit user > click on the admin, change the theme and click on save. Then relogin.
     
  9. motlive

    motlive New Member

    Hi,

    I did exactly that, the only change i made for my theme was the header_logo.png file to my own.

    system > cp users > edit user > click on the admin has my theme selected

    Logged out
    Logged Back in

    Logo hasnt changed, so copied logo to the default/images directory overwriting the default one. Now the logo has changed but the system > cp users > edit user > click on the admin still shows my theme being selected and not the default theme.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    This does not mean that the theme was not changed. Did you look at the files of your theme? The Logo is set in the css files and this css file of the default theme contains a fixed link to the css of the default theme (see line

    <link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>

    in main.tpl.htm. If you did not change this in your copy of the template, then the css and logo of the default css are used from your theme and not the css and logo from your theme folder.
     
  11. motlive

    motlive New Member

    This has to be the worst theme system I have ever come across, and explains why it is near impossible to find pre-built themes.

    Outside of the themes directory and inside the folders such as "mail", "dns" etc each directory contains a folder called template, which contains a file that represents each page used for that section in the control panel.

    If I was to edit the CSS within my themes directory, to get it to actually work as I want and probably as others wanted I would need to edit each individual static htm file.

    example:
    Code:
    <h2><tmpl_var name="list_head_txt"></h2>
    <p><tmpl_var name="list_desc_txt"></p>
    That is at the top of each file inside the "templates" directories. However what I want is to put the list_head_txt inside a div, I would have to edit all these static htm files, whilst taking a bit of time would not be impossible. However when it comes to updating the control panel I can only assume that all these files will be overwritten with the new ones and all my changes will disappear.

    If I am missing something here would someone kindly explain it?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    And thats why they are not part of the theme. If we would have put these files into the themes folder, you wold have to edit your theme for every change that we do in the interfcae.

    Regarding the problem that you had above, its really easy to handle with the existing system. All lists are based on the themes file named listpage.tpl.htm, so if you want to change the h2 record only on lists, then put a named div around the placeholder in the listpage.tpl.htm file and then you have exactly one h2 per list page.

    And by the way, there are a ot of themes, but they are all owned by the isps in their corporate identity and no released to the public.
     
    Last edited: Apr 15, 2010

Share This Page