+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: More Picture dimensions needed!!!

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    10

    More Picture dimensions needed!!!

    Hey.. Is it extremely hard to ad more picture dimensions.. in addition to "Thumbnail" and "Picture".. I need two more - small thumbnail and medium picture.. It's quite useful if you want to show images in different sizes.. and speeds up page load time when you dont have to load full image and scale it like about 50%...

    Maybe you can show me a direction - files to change or smth!

    Thanks.

  2. #2
    Quote Originally Posted by Raivo Vaikla View Post
    Hey.. Is it extremely hard to ad more picture dimensions.. in addition to "Thumbnail" and "Picture".. I need two more - small thumbnail and medium picture.. It's quite useful if you want to show images in different sizes.. and speeds up page load time when you dont have to load full image and scale it like about 50%...

    Maybe you can show me a direction - files to change or smth!

    Thanks.
    This is an old thing i have complained about. The script should use small thumbnail and medium picture . Not normal to have 15 images of 300 kb each loaded for each product. we should have 15 thumbnails + 15 medium pictures to be displayed when we are using the carousel and the large image should be used just when you open the image viewer (same implementation wich is available in any major script). Since they did not provide a solution to this i assume that it involves big changes, changes that they do not want to make, even if they know it is wrong

  3. #3
    Junior Member
    Join Date
    Sep 2011
    Posts
    10
    Would this be the right place to add other dimensions:
    includes/controllers/my_listings.inc.php

    from around line 58 to line 193

    Don't care much for admin side photo management for now... only front end.

  4. #4
    Hello Raivo and Petrache,

    It's really extremely hard for create new image type. needs many changes in many files. That's why you should create a new ticket with your request and we will do it like customization for you.
    Viktor,
    Flynax technical department,
    Best wishes.

  5. #5
    Flynax developer John's Avatar
    Join Date
    Oct 2009
    Posts
    606
    Hello Guys,
    Victor is right, it is enough hard task to add one more resize picture dimension to upload process and apply it to your layout,
    but I will try to guide you have to add one more image version and save new name to database, it will be your headache how to add it to layout:

    NOTE: this instruction suits the Flynax 4.0.1 and 4.1.0 versions only.

    1. Open the file: /libs/upload/upload.php and find this code:
    Code:
    Only registered members can view the code.
    as you can see there are two current image versions, thumbnail and large image.
    2. let's add our new image version like this:
    Code:
    Only registered members can view the code.
    I added one more image version by adding one more item to the config array (image_400x300 is our new image version key),
    now the system will create one more copy of the uploaded image for us and store it under the same directory with name we specified.

    All looks great but we have to add this new copy image name to database, so we have to do:
    3. Go to your Admin Panel >> Database and run the following sql query (image_400x300 is our new image version key)
    Code:
    Only registered members can view the code.
    3. find this code in the same file:
    Code:
    Only registered members can view the code.
    and add one more line to the array like this:
    Code:
    Only registered members can view the code.
    Done, now we have one more copy of the image in the file system and name of new image in the database for each listing photo.
    If you have an idea what you need this for, then you know what to do next.

    John
    Last edited by John; January 28, 2013 at 08:37 AM.

  6. #6
    Junior Member
    Join Date
    Sep 2011
    Posts
    10
    Perfect! Looks doable to me.. and adding new size options to admin side would also be fairly simple.. I will test it in about 6 hours..
    Hope it works.
    Thank you very much, John!

  7. #7
    Flynax developer John's Avatar
    Join Date
    Oct 2009
    Posts
    606
    Quote Originally Posted by Raivo Vaikla View Post
    Hope it works.
    I hope so, let us know if the instruction is proper or not, cheers!

    John

  8. #8
    Junior Member
    Join Date
    Sep 2011
    Posts
    10
    Hey! Got it working perfectly. I also added 4 lines to tables __config and 4 lines to __lang_keys so I can change size options in admin area.
    There is a tricky part though.. Uploading works fine and files are added into database.. But when I choose to crop the uploaded image - new files won't get updated.. I'm gonna look into it but if you can assist me, it would be great!!
    Thanks!

  9. #9
    Senior Member
    Join Date
    Dec 2012
    Posts
    102
    can we do this only for a specific listing type? like, if i add a listing of type auto, have 3 sizes for pictures, else have only the default two..

  10. #10
    Senior Member
    Join Date
    Dec 2012
    Posts
    102
    guys? anyone?

+ Reply to Thread