- Posts: 18
- Thank you received: 3
How to set "stripes Color" to transparent?
- Appie Thrasher
-
Topic Author
- Offline
Less
More
4 years 3 months ago #343175
by Appie Thrasher
How to set "stripes Color" to transparent? was created by Appie Thrasher
-- url of the page with the problem -- : still localy developping
-- HikaShop version -- : 4.6.1 [2207041030]
-- Joomla version -- : 3.10.10
-- PHP version -- : 7.4
-- Browser(s) name and version -- : Firefox developer 103.0b7 (64-bits)
-- Error-message(debug-mod must be tuned on) -- : none
Is it possible to set the stripes color to transparent?
Normally I just delete the color setting in hikashop config to get transparent color coding and that works fine with categories en product background views.
But if I do that same thing in stripes color I get a white background color. If I put in some other color code, for example #faf208, it works as supposed to, and I get a yellow background.
Thanks for your time,,
Greetz
Appie
-- HikaShop version -- : 4.6.1 [2207041030]
-- Joomla version -- : 3.10.10
-- PHP version -- : 7.4
-- Browser(s) name and version -- : Firefox developer 103.0b7 (64-bits)
-- Error-message(debug-mod must be tuned on) -- : none
Is it possible to set the stripes color to transparent?
Normally I just delete the color setting in hikashop config to get transparent color coding and that works fine with categories en product background views.
But if I do that same thing in stripes color I get a white background color. If I put in some other color code, for example #faf208, it works as supposed to, and I get a yellow background.
Thanks for your time,,
Greetz
Appie
Please Log in or Create an account to join the conversation.
4 years 3 months ago #343180
by nicolas
Replied by nicolas on topic How to set "stripes Color" to transparent?
Hi,
We never thought about that.
Try adding the code:
before the code:
in the file administrator/components/com_hikashop/helpers/image.php
It should normally generate a transparent background when no color is set in that setting.
Note that as generated thumbnails are cached, you might need to delete the folders / files under the images/com_hikashop/upload/ folder so that HikaShop can regenerate the thumbnails with the transparent background instead of using the images already generated.
Please let us know how it goes so that we can integrate the change on our end.
We never thought about that.
Try adding the code:
Code:
else {
$bgcolor = imagecolorallocatealpha($resource, 255, 255, 255, 127);
}
Code:
if($bgcolor === false) {
It should normally generate a transparent background when no color is set in that setting.
Note that as generated thumbnails are cached, you might need to delete the folders / files under the images/com_hikashop/upload/ folder so that HikaShop can regenerate the thumbnails with the transparent background instead of using the images already generated.
Please let us know how it goes so that we can integrate the change on our end.
The following user(s) said Thank You: Appie Thrasher
Please Log in or Create an account to join the conversation.
- Appie Thrasher
-
Topic Author
- Offline
Less
More
- Posts: 18
- Thank you received: 3
4 years 3 months ago #343192
by Appie Thrasher
First thanks for the quick answer..
I put in the code like this:
After that I completely removed the thumb files, and removed cache in Joomla.
Sadly the new generated thumb still has a white background in my case. But maybe I did the code wrong?
Thanks again.
Greetz
Appie
Replied by Appie Thrasher on topic How to set "stripes Color" to transparent?
nicolas wrote: Hi,
try adding the code:before the code:Code:else { $bgcolor = imagecolorallocatealpha($resource, 255, 255, 255, 127); }Code:if($bgcolor === false) {
First thanks for the quick answer..
I put in the code like this:
Code:
if($bgcolor === false || $bgcolor === -1)
$bgcolor = imagecolorallocate($resource, hexdec($rgb[0]), hexdec($rgb[1]), hexdec($rgb[2]));
}
}
else {
$bgcolor = imagecolorallocatealpha($resource, 255, 255, 255, 127);
}
if($bgcolor === false) {
$bgcolor = imagecolorallocatealpha($resource, 255, 255, 255, 0);
if($bgcolor === false || $bgcolor === -1)
$bgcolor = imagecolorallocate($resource, 255, 255, 255);
}
return $bgcolor;
}
After that I completely removed the thumb files, and removed cache in Joomla.
Sadly the new generated thumb still has a white background in my case. But maybe I did the code wrong?
Thanks again.
Greetz
Appie
Please Log in or Create an account to join the conversation.
4 years 3 months ago #343214
by nicolas
Replied by nicolas on topic How to set "stripes Color" to transparent?
Hi,
I did the same modification on my end and I did get the transparent stripes on my thumbnails:
i.imgur.com/gfuPv1o.png
You can see there are no white stripes there and if I look at the image with my browser's console you can see the transparent stripes.
So I'm not sure why it wouldn't work for you.
I did the same modification on my end and I did get the transparent stripes on my thumbnails:
i.imgur.com/gfuPv1o.png
You can see there are no white stripes there and if I look at the image with my browser's console you can see the transparent stripes.
So I'm not sure why it wouldn't work for you.
Please Log in or Create an account to join the conversation.
- Appie Thrasher
-
Topic Author
- Offline
Less
More
- Posts: 18
- Thank you received: 3
4 years 3 months ago #343216
by Appie Thrasher
That's strange indeed , so I looked into it a bit further..
Uploaded a tests onto my live server and indeed there it works fine.. THANKS!
Need to check my local synology whats missing... think imgmagic needs to be installed going to look in that problem now.
Nicolas thanks for your time and patience
Greetz,
Appie
Replied by Appie Thrasher on topic How to set "stripes Color" to transparent?
nicolas wrote: Hi,
I did the same modification on my end and I did get the transparent stripes on my thumbnails:
i.imgur.com/gfuPv1o.png
You can see there are no white stripes there and if I look at the image with my browser's console you can see the transparent stripes.
So I'm not sure why it wouldn't work for you.
That's strange indeed , so I looked into it a bit further..
Uploaded a tests onto my live server and indeed there it works fine.. THANKS!
Need to check my local synology whats missing... think imgmagic needs to be installed going to look in that problem now.
Nicolas thanks for your time and patience
Greetz,
Appie
Please Log in or Create an account to join the conversation.
4 years 3 months ago #343219
by nicolas
Replied by nicolas on topic How to set "stripes Color" to transparent?
Hi,
Thanks for your feedback. We'll include the modification for the next version of HikaShop.
Thanks for your feedback. We'll include the modification for the next version of HikaShop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.129 seconds