ISP Config 3.1 custom logo

Discussion in 'Tips/Tricks/Mods' started by bajlek, Sep 20, 2016.

  1. bajlek

    bajlek New Member

    Hello, I just follow tutorial on Ubuntu 16.04 and ISP Config 3.1 and everything is set up and working like a charm. I have just question if it is possible to change logo.png ane [email protected]. I already uploaded new logos but main.tpl.htm seems to use base64 and I dont know anything about that. Can someone tells me how to use custom logo (both - logo.png and [email protected])

    Thank you very much
     
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    IIRC the logo ist loaded from the database.
     
  3. bajlek

    bajlek New Member

    I see,but I cannot find it. Can you give me a tip where to find? Is there any hidden table in ispconfig db?
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Looks like it's in the dbispconfig database on the ispconfig master server, in sys_ini.default_logo, and there is a sys_ini.custom_logo which you should be adding your custom logo to.

    The content is output directly into html output, and format is "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMg.......".

    To convert your file contents to base64 text you can use the 'base64' program, which on debian comes in the 'coreutils' package. Eg. the base64 output for the default logo is:
    Code:
    # base64 < /usr/local/ispconfig/interface/web/themes/default/assets/images/logo.png
    iVBORw0KGgoAAAANSUhEUgAAAMgAAABBCAYAAACU5+uOAAAItUlEQVR42u1dCWwVVRStUJZCK6Hs
    FNAgWpaCJkKICZKApKUFhURQpEnZF4EEUJZYEEpBIamgkQpUQBZRW7YCBqQsggsQEAgKLbIGCYsS
    CNqyQ8D76h18Hd/MvJk/n/bXc5KT+TNz79vPzNv+/2FhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AOAe++s0akTsRZxMnE6cGkKcxkwhPofaBPwWRzxxB/EO8UGI8xhxEGoV8EscY8qBKFRcgdoFAhXH
    C+VUHAbHo5aBQASyrZwL5DoxEjUNeBXI9XIuEMEE1DTgVSA3FA3qIDEtBLnTQiBDUNOAV4EUKhpU
    RojmZQQEAjwKgSwK0bykWQgEU74ABAKBABAIBOIJffoNrkRsS0whDiMO5uNw4gBiSxvfG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DzWe24oGdZX4CzGfWCD4U93GBQdqNSw4Uiny8K9h4buO
    hlU2scq+Q1G1i233k63hFwBPEfcS04l1FGJoynbH+fgz8ZKFQJLDAMDjk/psCPzw20XxE6mmdLd2
    4d8KNQ14FciUEPl1xHvEhlK6W2j65aOWgUAEUpV4NEREstyDQNqjloFARVKL/xukrAvkGjGC09zG
    wfYKsQdqF/BTKMnEJcTtxC3EPAU3iic5cRkfjc/ZFvZuuZm4gXjOouG35LQ2Yfutkq/4pfpN/E9T
    DVCjQGkJqQExho+CjYlRPseRiQE3EIriaMZTw4K3mOJv23J8jme23RsEAMqqQJrb9PnnEbPEVpUA
    uJD4Mf/PoCqeONQCUJYFElGKf7ojpnqjUQtAWRdJaf1t2w8ofSAUBNKulATSEaUPhIpIRj9icbyF
    UgdCTSRTeR0i2HwfpQ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBnG392D9QU+JXhxAAAAAElF
    TkSuQmCC
    
    You of course need to prepend `data:image/png;base64,` to that.
     
    liane and Robetus like this.
  5. webguyz

    webguyz Active Member HowtoForge Supporter

    Any idea if there is a max size pixel wise? I created a custom log (about 300 pixels wide) and it did replace the logo at the login screen but it did not put the logo in the upper left hand corner after logging in. Probably too big.
    I tried 275p wide, 250p wide, 230p wide, 200p, 175p wide but no go.
    Maybe a bug or where it will not see the custom logo after logging in

    Thx!
     
    Last edited: Oct 20, 2016
  6. BeNeDeLuX

    BeNeDeLuX New Member

    I have more or less the same problem! My custom logo is set perfect on the login screen but not inside ispConfig.
    It is also doubled. Cleared the browser cache and used some other browser with the same result.
    The strange thing is, i overwrite also into the default logo field inside the db with my logo but the ispConfig Logo is still there.
    ispconfig-logo.JPG

    BTW: i had to change the db structure for the logo fields from typ "TEXT" to "LONGTEXT" because the Logo was to large in base64 (225 x 60 pixel).
     
  7. suther

    suther Member

    Would be nice If there will be an upload-form for new logo.
     
  8. BeNeDeLuX

    BeNeDeLuX New Member

    Got it now :)
    Updated to 3.1.1, replaced logo.png / [email protected] and set the base64 code again in the default logo field.
    Logo is correct displayed on all pages.
     
  9. webguyz

    webguyz Active Member HowtoForge Supporter

    BeNeDeLuX,
    I updated to 3.1.1 but still unable to add customer logo after doing everything you did. My logo is 250px54p
    Can you tell me the size of your logo? Maybe mine is to big? My logo appears on the login screen but not the main cp. Driving me crazy :)

    Thanks!
    UPDATE: Never mind. I tried an online base64 conversion service and after updating custom logo it worked just fine. Must have been having problems with the base64 conversion I was initially using
    This site has a real nice drag and drop interface and works great!
    https://www.base64-image.de/
     
    Last edited: Nov 19, 2016
    liane and hsluis like this.
  10. BeNeDeLuX

    BeNeDeLuX New Member

    Of course ;)
    size.JPG
     
  11. webguyz

    webguyz Active Member HowtoForge Supporter

    Turned out my image conversion was the problem. Using the website in my previous post to convert my image I updated the custom_logo field in the sys.ini table and that's all I had to update and it worked immediately!
     
  12. fossoffice

    fossoffice New Member

    We have to remove line breaks from the output of "base64" in order to work properly.

    So, if I may join all solutions here, in order to change the logo with a custom png file (200x65px), all you have to do is fill the dbispconfig.sys_ini.custom_logo field with the output of this command:
    echo "data:image/png;base64,`base64 < path/to/your/custom_logo.png | tr -d '\n'`"​
    Replace path/to/your/custom_logo.png accordingly. You must have in mind the correct symbols (', " and `) if something is messed during copy-paste.

    Anyway, I suggest we all realize these people's work and show some respect to their logo when forming our branding.
     
    ahrasis, Fire Fox, till and 1 other person like this.
  13. Richard Foley

    Richard Foley Member

    well said, fossoffice,
    Proudly using open-source linux, nginx, mysql and ISPConfig here!
    R.

     

Share This Page