Jump to content

Using an SVG image as logo


Recommended Posts

Hello WHMCS, 

My main website makes use of SVG images as logo and other parts.

The WHMCS side does use png formats, I can edit the header.tpl file to make use off the svg but I'm just wondering if $assetLogoPath could also include svg formats.

I know that if you have one of these files:

/assets/img/logo.png

/assets/img/logo.jpg

$assetLogoPath is set. (but no svg support here :( )

 

Referring to :

 

Link to comment
Share on other sites

with regards to my hook in the above thread that you linked to, it could easily be tweaked to use a SVG file for a logo... :idea:

<?php

# Define $assetLogoPath 
# Written by brian!

function custom_base_img_path_hook($vars) 
{
   return array("assetLogoPath" => $vars['BASE_PATH_IMG']."/SVG-logo.svg");
}
add_hook("ClientAreaPage", 1, "custom_base_img_path_hook");
?>

JIvy5mo.png

Link to comment
Share on other sites

1 hour ago, brian! said:

with regards to my hook in the above thread that you linked to, it could easily be tweaked to use a SVG file for a logo... :idea:


<?php

# Define $assetLogoPath 
# Written by brian!

function custom_base_img_path_hook($vars) 
{
   return array("assetLogoPath" => $vars['BASE_PATH_IMG']."/SVG-logo.svg");
}
add_hook("ClientAreaPage", 1, "custom_base_img_path_hook");
?>

JIvy5mo.png

1

 

 

Thank you Brian! 

The hook works flawless, I just had to convert the font to outline for the SVG file. It looks great on desktop, but mobile is still a bit behind on this technique and left the font out.

I'm not even going to start for the email templates, that's not even close to 50% supported on SVG haha :P 

 

Anyway, my WHMCS logo is looking blade sharp. Thanks again Brian!

Link to comment
Share on other sites

  • 3 years later...
  • 5 months later...
On 5/6/2018 at 5:29 PM, brian! said:

with regards to my hook in the above thread that you linked to, it could easily be tweaked to use a SVG file for a logo... :idea:


<?php

# Define $assetLogoPath 
# Written by brian!

function custom_base_img_path_hook($vars) 
{
   return array("assetLogoPath" => $vars['BASE_PATH_IMG']."/SVG-logo.svg");
}
add_hook("ClientAreaPage", 1, "custom_base_img_path_hook");
?>

JIvy5mo.png

Hi Brian do you know,  how to display logo.svg on the email template?

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