custom login template

  • it seems my custom logo part is ignored in index.tpl ?(
    any other way?
    it should be shown above the login box ...

    Code
    1. nano /var/www/imscp/gui/themes/default/index.tpl
    2. <div style="text-align: center;" ><img style="width: 251px; height: 78px;" alt="logo" src="logo.gif"></div>
  • @fulltilt


    Disabling the opcache code for the panel is not recommended because this would slow down the panel. You should simply make your template changes and once done, restart the imscp_panel service. And yes, the templates are loaded and cached.


    Of course, on each update you will have to resume your changes unless you create a little listener which will automatically copy your own template.


    A little example:


    http://pastebin.com/jLRY1U2p


    So here, you must in order:

    • Create the /usr/local/src/imscp-custom/themes/default directory
    • Copy your own index.tpl file inside the /usr/local/src/imscp-custom/themes/default directory
    • Create the listener file in the /etc/imscp/listeners.d directory (e.g: /etc/imscp/listeners.d/10_frontend_templates_override.pl)

    Now, each time you update or reconfigure i-MSCP, your own index.tpl will be automatically copied inside the /var/www/imscp/gui/themes/default directory.


    Note: Listener created for i-MSCP 1.3.7 and above.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Nuxwin, just one point because of apache opcode cache ...
    I guess it will happen too if a customer have uploaded or edited PHP files ...
    so we can not disable opcode in /etc/php5 because of the php.ini files template ... right?
    Would be nice if customers are able to do that from php settings f.ex.

    Edited once, last by fulltilt ().

  • @fulltilt


    For your customers, this will be ok because the opcode cache automatically does a verification for file changes. Anyway please, don't confuse the opcode cache of your customers with the opcode cache of the i-MSCP frontEnd. Both are not configured the same way.


    The opcode cache for the i-MSCP frontEnd is configured in such way that the changes on files are not detected (this explain why you need to reload the imscp_panel service each time you make a change in the frontEnd files), while the opcode cache for your customers is configured in such way that the changes in their files are automatically detected. Please, look at the underlying PHP documentation for further details.


    If you want really disable the opcode cache for your customers, you must edit the /etc/imscp/php/php.data file and set the value of the PHP_OPCODE_CACHE_ENABLED parameter to 0. Then, once done, you must trigger a reconfiguration: perl /var/www/imscp/engine/setup/imscp-reconfigure -danv


    BTW: Listener pushed on github: https://github.com/i-MSCP/imsc…6a1e417d42e72547763d0b2e4

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206