albinholmlund
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Woocommerce Favourites] Error after updateHello, I had the same error and I’ve solved the bug. If you’re running a php-version older than 7.0.0, then you cant use “print” as a method name.
/*
Print the display
*/
public static function print( $atts ){But as of PHP 7.0.0 these keywords are allowed as property, constant, and method names of classes, interfaces and traits, except that class may not be used as constant name.
https://php.net/manual/en/reserved.keywords.phpIn file: includes/class-swf-display.php
So you have to replace the print method call at line 18 and 21 with for example “print_favourites” instead and then rename the method at line 33 to “print_favourites”.There were some bugs with my previous approach. This new code works better:
All occurrences of:
300px: the thumbnail width
20px: the thumbnail margin
30px: padding of the element containing the gallery..bwg_standart_thumb_0, .bwg_standart_thumb_0 span,
#bwg_standart_thumbnails_0{
max-width: 100%!important;
}$mediaW: 300px + 20px*2 + 30px*2;
@media screen and (max-width: $mediaW){
.bwg_standart_thumb_spun1_0{
margin-left: 0!important;
margin-right: 0!important;
}
}Okay guys, no worry i got it working in a kind of hackish way now. I’ll share for future readers.
(replace all 20px with your margin size and 300px with the thumbnail images width.).bwg_standart_thumb_0, .bwg_standart_thumb_0 span,
#bwg_standart_thumbnails_0{
max-width: 100%!important;
}$mediaW: 300px + 20px*2;
@media screen and (max-width: $mediaW){
.bwg_standart_thumb_0{
margin: 0;
margin-left: -20px*2;
}
.bwg_title_spun1_0{
margin-left: 20px!important;
}
}But your plugin sets the inline style max-width to none and the width to 600px of all the gallery images. That results in the images staying at 600px width. It is nothing i can control as the plugin sets a fixed width inline style.
img inline style:
max-height: none !important; max-width: none !important; padding: 0 !important; width:600px; height:450px; margin-left: 0px; margin-top: -75px;I made a test user you can login with to see the page. The page is hidden for the public atm as it’s a work in progress. I also made the images have the dimensions 600×300 now so you can clearly see how as the screen gets smaller than 600px width the body gets pushed off canvas.
Login to https://smidesverkstan.se/wp-admin with the login details:
Username: tester
Pass: asd123Go to the page and scroll down to the ‘Vad vi g?r’-section and resize the window.