WordPress.org

Ready to get started?Download WordPress

Forums

ZenphotoPress
Size of thumbnails in widget (8 posts)

  1. wildfisher
    Member
    Posted 3 years ago #

    I have thumb sizes set in Zenphoto - Configuration - Theme = 150, but in Zenphoto badge (widget) all thumbs have size 100x100.
    I have tried to dig in the problem and see that thumbs img src looks like /zenphoto/zp-core/i.php?a=2008_vishera&i=vish200808_314.JPG&s=thumb
    So s=thumb determines image size and should be default for Zenphoto , but as I said earlier I have set it to 150 in Zenpress ...

    By the way in classes.php there is query "SELECT name, value FROM db_options_table WHERE theme IS NULL AND (name = 'mod_rewrite' OR name = 'thumb_size')" ... I don't understand how it works because there is no table "db_options_table" in the database ...

    Zenphoto version is 1.4.0.2

    Hope for your help.

  2. wildfisher
    Member
    Posted 3 years ago #

    Simbul, pls reply. I am ready to dig into it further, but I need some directions, please.

  3. Simbul
    Member
    Plugin Author

    Posted 3 years ago #

    Sorry, I've been abroad for a while and I couldn't look into it until now.

    The name you see in the query is not the name of the table: a translation is performed by method translateTables in the ZenphotoPressDB class.

    As for the problem you're mentioning, it's because the widget and the shortcode do not get the size parameters from the settings. The settings were meant to provide a way to avoid typing the same size over and over again the the ZP popup - and they came well before the widget was even implemented.
    It could be argued that, once the settings are set, they should apply to everything. However, in the current version there's no such feature.

  4. wildfisher
    Member
    Posted 3 years ago #

    Hi, Simbul!
    Sorry for bothering you again, but I don't understand why the size of thumbnails displayed by the widget is exactly 100x100. This size settings should come from some place in your code or from Zenphoto common settings, right?
    As I wroted earlier I have changed thumbnails settings in Zenphoto to 150. Now I have found in your zenphoto_bridge.php this line
    $out = array('mod_rewrite' => false, 'thumb_size' => '100');
    and change it to
    $out = array('mod_rewrite' => false, 'thumb_size' => '150');
    But nothing have changed - thumbs are still 100x100.
    In WordPress article I use this code
    [zenphotopress album=28 sort=random number=10]

    Thank you for reply in advance.

  5. wildfisher
    Member
    Posted 3 years ago #

    May be option "&s=thumb" for i.php is deprecated ?

  6. Simbul
    Member
    Plugin Author

    Posted 3 years ago #

    That may actually be the case. Looks like adding s=thumb just generates a thumbnail with a fixed size, ignoring the Zenphoto settings (which ZenphotoPress should inherit).

  7. davidcool
    Member
    Posted 2 years ago #

    Has anyone figured out a fix for this? I can confirm that I'm having a similar issue. When I changed my thumbnail size to 112px in zenphoto most of my images are output via the plugin at 112px, but sometimes 1 or 2 are still at 100px.

    When this first happened, I deleted some images from zenphoto and reuploaded and it fixed the problem. Now that's not an option though with many pictures.

    I'd be happy to dig into the code and look around, give me some line numbers of potential places to look if you have them.

    Great plugin! Will be even better when this is sorted out.

    Cheers

    *edit: Ooops.. I'm actually having a problem with the badge widget... Not sure if this is still the right place to post, but sounds like the problem may be related so I'll leave it here.

  8. davidcool
    Member
    Posted 2 years ago #

    My solution to this was suggested in another post, I used some CSS:

    .ZenphotoPress_badge a img {
    	width: 112px;
    	height: 112px;
    }

    Just change the width and height to the dimensions you want your thumbs to be.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic