Jump to content

Client Area Logo - Retina Compatible


Recommended Posts

Hi! I just created a brand new WHMCS installation, but now I'm trying to show a retina compatible logo at client area. I am uploading at /assents/img/logo.png and /assents/img/logo@2x.png however logo@2x.png file is ignored.

Even I try to create a hook defining a new $assetLogoPath with a .svg file but doesn't work either.

Can you have any idea to add Retina Compatibility to client area logo?

Link to comment
Share on other sites

I think you're doing it right, but sometimes the problem is the .svg file itself... i've seen it fail with some .svg files, but work with most others... 9_9

for example, in the above linked hook thread, the .svg used is from wikimedia... https://upload.wikimedia.org/wikipedia/en/c/ce/SVG-logo.svg ... and that works. :idea:

iyP9L9t.png

similarly, if I download a logo from a GitHub repository, then they seem to work too...

6VWC85q.png1i6Ch5Y.png

so try the hook using one of those logos, and that should tell you whether the hook will work for you, or if there is an issue with your svg logo itself... also, I assume you have checked that the template (if custom) is actually using $assetLogoPath ?

Link to comment
Share on other sites

On 24/5/2018 at 3:23 AM, brian! said:

I think you're doing it right, but sometimes the problem is the .svg file itself... i've seen it fail with some .svg files, but work with most others... 9_9

for example, in the above linked hook thread, the .svg used is from wikimedia... https://upload.wikimedia.org/wikipedia/en/c/ce/SVG-logo.svg ... and that works. :idea:

iyP9L9t.png

similarly, if I download a logo from a GitHub repository, then they seem to work too...

6VWC85q.png1i6Ch5Y.png

so try the hook using one of those logos, and that should tell you whether the hook will work for you, or if there is an issue with your svg logo itself... also, I assume you have checked that the template (if custom) is actually using $assetLogoPath ?

I again @brian! probably there is something wrong because even with those images still broken. Just text appears. :( You have another idea?

Link to comment
Share on other sites

11 hours ago, Marco Aguilar said:

I again @brian! probably there is something wrong because even with those images still broken. Just text appears. :( You have another idea?

if it's just showing text, that would imply that it's either not finding the image in the path supplied, or perhaps a corrupt file / wrong mime type...

here's a test, try the hook below and see if it works (does for me) - it's loading the image from a remote Wikimedia server, so it's bypassing any local paths previously defined...

<?php

# Define $assetLogoPath 
# Written by brian!

function custom_base_img_path_hook($vars) 
{
   return array("assetLogoPath" => "https://upload.wikimedia.org/wikipedia/en/c/ce/SVG-logo.svg");
}
add_hook("ClientAreaPage", 1, "custom_base_img_path_hook");
?>

with a bit of effort, you can even remotely link to the GitHub logos (not that you should in practice - we're just testing!)..

7sY02CQ.png

you won't need to do that though - either the above remote Wikimedia SVG logo will work for you... or it won't. :)

if it doesn't work, then can you view the local .svg logo in the browser directly, e.g by typing the direct path of the image in the browser address bar?

if you're still having issues, then feel free to send me a PM with a link to your WHMCS site... maybe once I see the site, I can see the cause of the problem.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated