Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

WP Photo Sheller Template 4 – Thumbnail Size Change – Bulk Import

by

Tips and Tricks HQ Support Portal › Forums › WP Photo Seller › WP Photo Sheller Template 4 – Thumbnail Size Change – Bulk Import

Tagged: buy a bundle of ex 3 photos in one download

  • This topic has 8 replies, 2 voices, and was last updated 8 years, 11 months ago by Peter.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • July 6, 2016 at 9:52 am #13577
    kopicinfo
    Member

    Dear Team,

    i would like to change the Thumbnail Size to 259×259. I have already changed the css File /wp-content/plugins/wp-photo-seller/views/photo/template-4/gallery-template-4.css?ver=2.1.3

    But it still use the following Thumbnail url… i dont know why: <img alt=”test” src=”http://freshlight-fotografie.de/wp-content/uploads/wp_photo_seller/9/Test-150×150.jpg”&gt;

    i still uploading with the “Bulk Import Function”. Where can i change the size from 150×150 to 259x259px.

    Many thanks

    This is the Testpage:

    [http://freshlight-fotografie.de/test-thumb/]

    July 6, 2016 at 10:18 pm #73632
    Peter
    Member

    You can’t change the thumb source size for that template because it is coded to use only the 150px thumbs. Have you looked at the other templates? Maybe you might find one which suits your needs?

    July 11, 2016 at 8:41 am #73633
    kopicinfo
    Member

    Hi,

    yes i know its codeded for 150px but i would like to change it. i always displayed in the right 259×259. but i think i have to change it at the upload function. in which file i will find the code?

    I need to show it in 259x 259px :/

    July 12, 2016 at 5:12 am #73634
    Peter
    Member

    but i think i have to change it at the upload function. in which file i will find the code?

    No it’s more complicated than that.

    I will need to examine the code more carefully to see if it is possible to add some filters instead.

    July 12, 2016 at 11:37 am #73635
    kopicinfo
    Member

    Ok,

    i hope you will find fast an soultion. Because i need it quickly..

    thank you in advance…!

    best regards

    July 12, 2016 at 12:01 pm #73636
    kopicinfo
    Member

    I think i solved my problem. I found it in ..modelsWPSPhotoProduct.php

    function create_photo_product_by_id($image_id, $custom_var_id=”, $thumb_w=’150′, $thumb_h=’150′)

    July 12, 2016 at 12:51 pm #73637
    Peter
    Member

    Please note that we do not support any changes made to the core plugin code.

    Also, you will lose those changes if you ever upgrade this plugin to a future release.

    In other words if you want to modify the code that’s fine but as long as you understand that we cannot provide support for those changes.

    July 12, 2016 at 1:43 pm #73638
    kopicinfo
    Member

    Yes i know :)… i have one more question. Perhaps you can answer it quickly. I still add “Add to Card” via shortcode [WPS_display_compact_cart]. I would like to add this shorcode directly in my php file here.

    <div id=”content-wrap” class=”container boxed”>

    <div class=”breadcrumb row boxed”>

    >>>>>>>>>>>>>> HERE [WPS_display_compact_cart]

    </div>

    what i have to do? – how can i call the function in PHP file

    July 13, 2016 at 1:14 am #73639
    Peter
    Member

    Ok I have a better way to do this thumbnail change and it doesn’t require you to mess with the photo seller.

    I have sent you a copy of a newer version which contains a filter.

    You will need to add some code to your theme’s functions.php file.

    The following is what you will need to add to your functions.php:

    add_filter( 'wps_template4_thumb_path', 'change_template4_thumb', 10, 7 );

    function change_template4_thumb( $thumb_url, $image_file_path, $source_dir, $source_dir_url, $special_image_dir, $image_id, $gallery_id ){
    $path_info = pathinfo($image_file_path);
    $thumb_name = $path_info['filename'].'-259x259.'.$path_info['extension'];

    $thumb_path = $source_dir . $thumb_name;

    //create a thumb for front end
    if(!file_exists($thumb_path)){
    $thumb_in_special_dir = $source_dir .'/'.$special_image_dir.'/'.$thumb_name;

    if(file_exists($thumb_in_special_dir)){
    //simply copy this file to this gallery's root dir
    copy($thumb_in_special_dir, $thumb_path);
    }else{
    $resized_file = image_make_intermediate_size($image_file_path, '259', '259', true); //Make a thumb
    if(!$resized_file){
    //failed!
    return $thumb_url;
    }else{
    //We need to copy the newly created thumb from special folder to root folder
    copy($thumb_in_special_dir, $thumb_path);

    }
    $thumb_url = $source_dir_url.$thumb_name;

    }
    }else{
    $thumb_url = $source_dir_url.$thumb_name;
    }
    return $thumb_url;
    }

    The above will produce 259×259 thumbnails. (I tested it and it works)

    Then you will need to produce your own custom CSS to make the 150 size boxes larger.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ