how to: themes

Discussion in 'Installation/Configuration' started by tedeu, May 12, 2009.

  1. tedeu

    tedeu New Member

    Hello,
    after i install IPS Config 3, where to go for themes ?
    Where to go to modify them , that's what i ment ...
    Becasue i installed as told on the howtoforge, and my linux (Fedora10) is in text mode, and i can't make any templates or modify template in text mode, so how can i extract the themes part and put it on a windows machine so i can customize the template ?
    Thank you verry mutch , and i wait for an answer.
     
  2. tedeu

    tedeu New Member

    Nobody knows ?
    Come on, it's a simple question (i guess):rolleyes:
     
  3. ago2guy

    ago2guy New Member

    I'm no expert, but I tripped upon the following while hunting for the jobs quere trigger.

    /usr/local/ispconfig/interface/web/theme/defaut

    also the theme appears to be set as part of the config() array variable so if you change folder name, you will have to edit it as well.

    a.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Correct. Just make a copy of the folder /usr/local/ispconfig/interface/web/theme/defaut e.g. like this:

    cp -prf /usr/local/ispconfig/interface/web/theme/defaut /usr/local/ispconfig/interface/web/theme/mytheme

    and then change the files in the mytheme folder. The theme will be available automatically, you can choose it when you change a cp user or client.
     
  5. patrick232

    patrick232 New Member

    ok, i just made a copy of the default-folder and made some changes. i choosed to use the new theme in the controlpanel and .. nothing happened :D

    then i made a mistake (at least i think this is the problem) - because i tried to rename the default-folder from "default" to "default_backup" and renamed my new theme to "default". now i get the error (when browsing ispconfig with my webbrowser):
    Code:
    Strict Standards: Non-static method vlibTemplateError::raiseError() should not be called statically, assuming $this from incompatible context in /usr/local/ispconfig/interface/lib/classes/tpl.inc.php on line 161
    vlibTemplate Error: Template (main.tpl.htm) file not found.
    after re-changing the name of the default-backup-folder back to "default" it still doesnt work.

    i dont have any clue why it doesnt work anymore.. so any hints or suggestions would be nice :)

    best regards patrick
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you changed the owner of the files or the permissions.
     
  7. patrick232

    patrick232 New Member

    ty for the fast reply

    Code:
    root@webhost:/usr/local/ispconfig/interface/web/themes# ls -al
    total 16
    drwxr-s---  4 ispconfig ispconfig 4096 May 22 09:36 .
    drwxr-s--- 16 ispconfig ispconfig 4096 Feb 26 23:12 ..
    drwxr-sr-x  8 ispconfig ispconfig 4096 May 22 08:52 mytheme
    drwxr-sr-x  7 ispconfig ispconfig 4096 Feb 26 23:12 default
    i changed the owner with chown to ispconfig and changed permissions with chmod -R 755

    i can even browse http:// domain.com:8080/themes/default/templates/main.tpl.htm
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. Then there might be a problem with the session. Close all browser windows and then start the internet browser again and connect to ispconfig.

    If this does not help, download the latest ispconfig again (no problem if its the same version that you have installed) and run the update.php script. Choose 'n' when you were asked if your services shall be reconfigured so that only the ispconfig files will be copied again.

    Not sure what causes this on your setup. Making a new theme by copying the default theme should work, but I will try it on my test server.
     
  9. patrick232

    patrick232 New Member

    yep, restarting the browser did the trick :)

    but changing the theme for a specific user didnt work so far. what i did so far:
    * change user-theme for user XY
    * logged in with user XY (via the login-button, right to the user in the system-user-list)
    * restarted browser

    the user gets displayed the default-theme

    as i only need 1 theme, im changing the default-theme now (so it works for me)
     
  10. patrick232

    patrick232 New Member

    ok, here is another problem i couldnt solve so far.

    i changed the main.tpl.htm and added some divs and other stuff. all works fine except when i refresh the site or logout. then all the stuff i added in the main.tpl.htm has gone.

    it seems like any other template has been loaded - but didnt find any hint in the code yet. i think its releated on the $_SESSION?

    maybe anyone can give me some hints, ty :)

    --
    patrick
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Please edit the line:

    $conf["theme"] = 'default';

    in /usr/local/ispconfig/interface/lib/config.inc.php which defines the name of the default theme e.g. when no user is logged in.
     
  12. patrick232

    patrick232 New Member

    hmm i changed the default-theme (dont have any other theme), so this line is ok for me - isnt it?

    i.e. i deleted the line 74 in /usr/local/ispconfig/interface/themes/default/templates/main.tpl.htm:
    Code:
    <span>hosting control panel</span>
    when browsing server:8080 there is no "hosting control panel", but after logging out "hosting control panel" appears again and other content i added to main.tpl.htm doesnt exist anymore. i need to restart my browser to see "my default"-theme again.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    yes, then its fine.

    Strange. Must be some kind of browser cache problem as ispconfig has no other copy of this file and no caching. Or did you add some kind of php cache to your installation?
     
  14. patrick232

    patrick232 New Member

    ok it works now, but i dont have a clue why :p

    here is what i have done so far:
    • installed ispconfig3.0.0.9 on fresh debian2.6-netinstall (xen-vm)
    • changed /usr/local/ispconfig/interface/web/themes/default (cause adding another theme didnt work. though the theme has been displayed with a checkbox in the cp (user and group i think), it didnt have any effect after selecting the theme for a user.
    • so i decided to change the default-theme itself - which seemed to work at first. but after logout/refresh the strange behaviour described above happened.
    • after posting in here, i tried to follow till's hint. in fact i created a symbolic link from the current default-theme-folder to default_2 and changed the $conf["theme"] = 'default'; in /usr/local/ispconfig/interface/lib/config.inc.php to $conf["theme"] = 'default_2';
    • no all works like id liked it to work at first :p after logging out/refreshing theres still "my theme" displayed

    maybe someone can figure out how this works - as it works for me im kinda happy and wont touch a running system :p

    best regards
    --
    patrick
     

Share This Page