Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Image Backgrounds Still Black Even When Set to White
This topic contains 3 replies, has 2 voices, and was last updated by Dezzign 9 years, 8 months ago.
- AuthorPosts
- January 13, 2014 at 9:47 pm #911
Hello,
Firstly, great plugin, well done! The latest update seems good although deeting all the old files and plugin before updating is a scary because you loose customisations. Although I deleted the plugin and the files as suggested it did still seem to remember some of the important settings for me.
My questions is: throughout my search results generated by the plugin I have a Black background on all my png images. Although I have set the background option to white (fff) in the settings & manually edited the style1.css file to have a fff background I still get the black background. I have flushed all wordpress caches and have flushed the image cache in the Ajax search Pro plugin too, but I still get a black background. These are the plugin’s image cache settings: http://tinyurl.com/k7mysu8
Just try to do some searches on this page here and you’ll see what I mean: http://www.copypastesoftware.net/video-example/
Thanks in Advance
RichardJanuary 13, 2014 at 10:07 pm #912Indeed! I tested it and its broken. The problem was, that the new administrator interface outputs the color values in “rgba” format and the coloring algorithm awaits a hex format. I will fix it tomorrow morning in the repository, until then I will show you a quick temporary solution:
Open up the wp-content/plugins/ajax-search-pro/includes/imagecache.class.php file and go to line 76, and you should see something like this:
function img_resizer($src,$quality,$w,$h,$saveas, $color) { if (!extension_loaded('gd') || !function_exists('gd_info')) { return ""; } $method = $this->can_get_file(); if( $method==false) { return ""; }
Change it to:
function img_resizer($src,$quality,$w,$h,$saveas, $color) { if (!extension_loaded('gd') || !function_exists('gd_info')) { return ""; } $color = "#ffffff"; $method = $this->can_get_file(); if( $method==false) { return ""; }
Save the file, empty the search cache and the upcoming images should now have a white background.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 13, 2014 at 10:19 pm #913That worked like a charm! Thanks 🙂 While we’re on the subject, is it possible to set the image backgrounds as transparent instead of a color?
Thanks Again
RichardJanuary 13, 2014 at 10:35 pm #914Ok don’t fuss too much as I’ve just set the image background to match the container background and it gives the transparent background affect. The only problem is the rollover colour changes but I’ve set the colours very close so it’s hard to notice anyway. Thanks again for you help, much appreciated.
- AuthorPosts
You must be logged in to reply to this topic.