Support » Plugins » [Plugin: ZenphotoPress] Feature request: Define Width and Height of thumbnails in widget?

  • Hi there

    I’ve just started using the ZenphotoPress Badge widget recently (although I’ve had Zenphoto Press installed for ages) and wondered if it would be possible to consider adding fields for defining the height and width of thumbnails please?

    I understand that at present, the widget displays the default thumbnail sizes, which works perfectly in the gallery. However, when it comes to displaying the images on the main site, it seems that a smaller/larger thumbnail might be more appropriate at times.


Viewing 11 replies - 1 through 11 (of 11 total)
  • I can understand that need. On the other hand, it’s something to be pondered carefully, since I’d like to keep the number of options to a minimum.

    If the desired size is not so different than the default one, you could try resizing the thumbnails via CSS.

    @simbul: Thanks for considering the request and for suggesting an alternative in the meantime.

    I often use the custom size fields in the WordPress editor (ZenphotoPress editor) to define the size of the image in a post, so very much hope this feature will appear in the widget options in the future.

    p/s: For anyone else, the CSS solution I’ve found involves max-width and auto height, with an adjustment for IE7.

    .storycontent img {
    max-width: 460px;
    width: expression(this.width > 460 ? 460: true);
    height: auto;


    Where do we position this CSS code ?


    I suppose a good place would be your theme’s CSS file.

    @huotg01: Just as simbul suggested 😉 You can edit the top line depending on the ‘class’ value of your div.

    @huotg01: Just as simbul suggested 😉 You can edit the top line depending on the ‘class’ value of your div.

    That’s exactly where you lost me…;-)

    For an almost newbie, could you be just a little bit more explicit about the first line ?



    @gaston: Everyone starts somewhere 🙂

    If it’s any help, this is how the original author explained it:

    .storycontent: The story content class. Change accordingly.

    img: For images found inside the .storycontent posted story

    460px: Change this accordingly (or lesser probably) to the width size of your story content box.

    width: expression(this.width > 460 ? 460: true): max-width fix for IE.

    This is my version: I’m not sure what theme you’re using for your site, but most themes will enclose e.g. the post content in a box called a ‘div’. There can be many, many divs as one box/div can fit into another.

    Most people want to style their post content box, so they assign something called a ‘class’.

    In the example above, the class or style name is ‘storycontent’ as indicated by:
    .storycontent img {

    So if your div/box class name was ‘postcontent’, your first line would be:
    .postcontent img{

    You’ll have noticed the img tag there: what this tag does is specify that this styling should only apply to images within the content box. This is because when you load an image file, <img src="link to image"> is used.

    Then everything in the brackets { and } is just styling.

    Just being a bit silly here: If we take some cupcakes (img) and box them up into two boxes (div) marked ‘Cupcakes 1’ (.postcontent) and ‘Cupcakes 2’ (.postcontent2) respectively, they could both have pink icing, or one might have blue and the other pink.

    Not sure if this will help or confuse you even more ^^.

    I like the cupcakes example (and cupcakes too…). It’s help me! 😉
    I think the present case will make me better understand CSS

    Let’s wrap-up the thing. I’m using the default Twenty Ten theme. My main goal here is to get a better control on the size of the pictures when using ZenphotoPress Badge widget (a great tool). If I correctly understand what is said before and what is said in the original author blog, this will affect all images in posts and, I suppose, also all images in the sidebar. Am I correct ?

    Let’s suppose I’m correct, my main question is now about the .storycontent: The story content class. Change accordingly. Accordingly to what ? It’s may be obvious for you, and it will probably be for me later, but for now, it’s not.

    By explaining that to me (and I thanks you for your patience)you will make an happy man 😉 and it will help me to better understand and no longer ask obvious things.

    Thanks again,


    @gaston: I guess I haven’t explained myself very well. 🙂

    You’re right in saying that it will affect images: but only images that are in the the box with a ‘class’ called .storycontent will be affected.

    If your sidebar box is within the box with a class .storycontent, then yes, the styling will also affect the sidebar images. But if the sidebar box is completely separate, then in theory it shouldn’t.

    To hopefully make it clearer, let’s just take the ZenphotoPress Widget as an example: if you were to enable the widget and ‘View (the) Source’ of the page where it appears on, you’ll probably see something like this:

    <dl class="ZenphotoPress_badge ZenphotoPress_widget"><dt><a href="http://imagelink.jpg" ><img title="32 - Image" alt="32 - Image" src="http://imagelink.jpg" /></a></dt></dl>

    As you can see, ZenphotoPress_badge and ZenphotoPress_widget have been defined as the class for the box/div called dl

    What this means is that if the max-width rule should only apply to images that appear in the widget box (dl), then your class should be defined as .ZenphotoPress_badget and/or .ZenphotoPress_widget.

    Hope this is a better attempt than last time 🙂

    Just for the sake of clarity:
    .ZenphotoPress_badge is assigned to the badge, which means both to the shortcode galleries (in posts) and to the sidebar widgets (in the sidebar).
    .ZenphotoPress_shortcode is assigned only to the shortcode galleries
    .ZenphotoPress_widget is assigned only to the sidebar widgets


    Anyway, I’d say flick got it just right 😉

    @simbul: Thanks for the clarification! 😀 I’m glad I didn’t mess up too much.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: ZenphotoPress] Feature request: Define Width and Height of thumbnails in widget?’ is closed to new replies.