Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Image Backgrounds Still Black Even When Set to White
- This topic has 3 replies, 2 voices, and was last updated 12 years, 4 months ago by
Dezzign.
-
AuthorPosts
-
January 13, 2014 at 9:47 pm #911
Dezzign
ParticipantHello,
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 #912Ernest Marcinko
KeymasterIndeed! 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.
January 13, 2014 at 10:19 pm #913Dezzign
ParticipantThat 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 #914Dezzign
ParticipantOk 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.