CameleonQc
Forum Replies Created
-
Never mind, it started working this afternoon, without any further change from my part. The shortcode wasn’t even working yesterday and led to a 404 page. Duh! This is a total mystery to me, but hey, the important thing is that it now works. ??
- This reply was modified 6 years, 2 months ago by CameleonQc.
Forum: Plugins
In reply to: [WP Photo Album Plus] How to set Users’ minimum upload size?Got it, thank you! ??
Forum: Plugins
In reply to: [WP Photo Album Plus] How to set Users’ minimum upload size?Woohoo! I made my very first patch! LOL! Thank you very much for your help, it’s much appreciated.
Forum: Plugins
In reply to: [WP Photo Album Plus] How to set Users’ minimum upload size?OK, I found a way to do exactly what I want. I needed to change the operator || by && to apply the min value to only one of the two sides (either one). Then, the message needed to be modified accordingly.
This is the modification I made to the code to make it work
// Is it not too small?
$ms = wppa_opt( ‘upload_frontend_minsize’ );
if ( $ms ) { // Min size configured
if ( $imgsize[0] < $ms && $imgsize[1] < $ms ) { // changed the logical operator
$wppa_alert .= esc_js( sprintf( __( ‘Uploaded file is smaller than the allowed minimum of %d pixels on the longer side.’ , ‘wp-photo-album-plus’), $ms, $ms ) ); // changed the message
return false;
}
}Forum: Plugins
In reply to: [WP Photo Album Plus] How to set Users’ minimum upload size?For min value: I dont want to set a minimum for both sides of an image. Only the largest side.
For example:
width > 2000 or height > 2000For max, it doesn’t matter, it’s fin as it is.
- This reply was modified 7 years, 10 months ago by CameleonQc.
Forum: Plugins
In reply to: [WP Photo Album Plus] How to set Users’ minimum upload size?Sorry, there was a glitch and I replied twice.
- This reply was modified 7 years, 10 months ago by CameleonQc.
Forum: Plugins
In reply to: [WP Photo Album Plus] How to set Users’ minimum upload size?Thank you so much, I really appreciate this. However, the way it is implemented is a bit restrictive for my intended use. It doesn’t matter with the max size if the value is the same for width and height. If it’s bigger than 3000px on any side, it’s too big, period.
However, let’s say that I set min size at 2000px because I want to be able to display a high quality image from the album at full width on my home page (it’s a photo club). A user could upload an image of 2200 x 1800, for example which I could use, but the new function rejects it because one of the sides is “smaller” than 2000 x 2000. That’s the message it returns in such cases. I need an image with at least one side bigger than the min size in the settings to be accepted.
I could try to go with a min value for the smaller size, hoping that the longer side will be over that value, but if someone uploads a panoramic image, for example, there is no way that I can guess the ratio to set a minimum height that would allow the desired width to be accepted as well… If I set my min at 1600 thinking that the width of a standard image should reach 2000, a panoramic image of 1600 x 5000 would then get rejected because of the max size… This pano would get accepted if only the size of the longer side could be set at a minimum of 2000 px and not its height.
Is there a way to do that? Thank you so much, your service is fantastic!
I’m learning to code, and I haven’t touched PHP yet, but I will this year, and I love looking at the changes you make. Great learning!
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] An error has occured. Bad RequestSame problem here !