Advertisement:

Author Topic: Sakela theme: Issues with thumbnail size & mobile view  (Read 246 times)

urmitnick

  • Jr. Member
  • **
  • Posts: 55
Sakela theme: Issues with thumbnail size & mobile view
« on: June 15, 2019, 06:00:41 am »
Hello,

I'm using Sakela theme for my website.it's a great theme; but I have some issues to solve:

1- In the Latest ads section, the size of the preview is not equal for all the ads (see attached picture), it depends on the format of the picture (portrait / landscape) and its size. How can I make all the previews have the same size?

2- When I use the mobile view for this theme, comments section comes before seller informations. I want to reverse this order. What file should I edit?

Regards

urmitnick

  • Jr. Member
  • **
  • Posts: 55
Re: Sakela theme: Issues with thumbnail size & mobile view
« Reply #1 on: July 03, 2019, 10:53:16 pm »
Any help please?

urmitnick

  • Jr. Member
  • **
  • Posts: 55
Re: Sakela theme: Issues with thumbnail size & mobile view
« Reply #2 on: July 12, 2019, 05:48:14 am »
Regarding the image thumbnail size, I figured out the source of the issue; when the image uploader creates the thumbnail taking in consideration the image size you put in media settings (eg.  240 x 200); it resizes the image according to the width (240) while keeping the aspect ratio which may lead in different height size from image to another.

where will can I find the script that resizes the image?

urmitnick

  • Jr. Member
  • **
  • Posts: 55
Re: Sakela theme: Issues with thumbnail size & mobile view
« Reply #3 on: July 13, 2019, 06:41:38 am »
in the ItemActions.php this part is responsible of creating the thumbnail:

Code: [Select]
// Create thumbnail
                            $path = $tmpName."_thumbnail";
                            $size = explode('x', osc_thumbnail_dimensions());
                            ImageProcessing::fromFile($normal_path)->resizeTo($size[0], $size[1])->saveToFile($path, $extension);

where size[0] is the width and size[1] is the height given in media settings (oc-admin).
 
And I think that the script doing this is in jquery.fineuploader.min.js but I can't figure out which part to change.

any help?

WEBmods

  • Hero Member
  • *****
  • Posts: 936
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Sakela theme: Issues with thumbnail size & mobile view
« Reply #4 on: July 15, 2019, 01:54:07 pm »
Hello.

I think you just need some CSS.

Add this style to your latest ads img tag:

Code: [Select]
    object-fit: cover;
    height: 250px;

Change height as you wish. It will go from this:



to this:



Regards.