Osclass forums
Support forums => Themes => Topic started by: urmitnick 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
-
Any help please?
-
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?
-
in the ItemActions.php this part is responsible of creating the thumbnail:
// 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?
-
Hello.
I think you just need some CSS.
Add this style to your latest ads img tag:
object-fit: cover;
height: 250px;
Change height as you wish. It will go from this:
(https://i.postimg.cc/fRDH58sT/before.jpg)
to this:
(https://i.postimg.cc/5N359bcb/now.jpg)
Regards.