Latest News Plus Date: some improvements and a question

Hello,
I've found a small error in your code, that generate a thumbnail Path with double slash, e.g.:
https://www.domain.com//images/thumbnails/mod_latestnewsplusdate/10.jpg
I've fixed this error in the entry point (mod_latestnewsplusdate.php):
$thumb_folder ="images/thumbnails/".$modulebase."/"; /* No Slash before images folder */

Improvements

I gave to the Titles a Link Title Attribute.
In Template output (default.php), from:
<a class="lnpd_item_title" href="<?php echo $item->link; ?>" itemprop="url"><?php echo $item->title; ?></a>
to
<a class="lnpd_item_title" href="<?php echo $item->link; ?>" itemprop="url" title="<?php echo $item->title; ?>"><?php echo $item->title; ?></a>

I gave to the Article Title an H2 Tag, just to improve the Heading performances of my Template output.
In Template output (default.php), from:
<a class="lnpd_item_title" href="<?php echo $item->link; ?>" itemprop="url" title="<?php echo $item->title; ?>"><?php echo $item->title; ?></a>
to
<h2><a class="lnpd_item_title" href="<?php echo $item->link; ?>" itemprop="url" title="<?php echo $item->title; ?>"><?php echo $item->title; ?></a></h2>

I have a question:
the past version of Latest News + has an image processor to resampling the Thumbnails and to renderize Thumbs without CSS resizing. This was according with the Google directives to NOT resize dynamically images through CSS.
Why you have left this great feature out? It was really usefull und compliant with directives...

Thanks in advances
Fabrizio
5 years 2 months ago #1 by fab

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
Hi Fabrizio,
Thanks for the path fix and also the title atribute improvement. I'll add them for the next update.
Regarding H2, I'm not really sure adding H2 will fit all case, because template providers sometimes use H3 for module title, then technically you will have H2 under H3 which is not good. So I'll leave it as it is for the moment.

Regarding the image processor, we're indeed double the generated thumbnail size to make the thumbnail is retina ready. Doubling the size is the simplest approach to make the thumbnail does't look blurry for devices with high resolutions.
The ideal solution probably is to use scrset attribute but using scrset has its own problem. Using scrset will force the module to generate 3 sizes of image (it will tripled resource and also storage), and also not all browsers fully support scrset.
5 years 2 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

I've seen that without slash in $thumb_folder I get the right path to already existing thumbnails but for the new images in Articles I get no Thumbnails.
And more strange...
The JImage Class instead the old image.php processor works not as expected:
if I have an Image in Article with 400px X 200px, and I set the Module Thumbs Params to 300px X 150px,
I get from the Module a 800px X 400px image Thumbs (double bigger!) but 300px X 150px inline resized.

I think something not works totally correct at the moment...

why we have this *2 in the helper?
$resizedImage = $image->cropResize($thumb_width * 2, $thumb_height * 2, true);
and more...
$thumb_width and $thumb_height should be the Width/Height values from Module parameter, it isn't so?

Thanks in advance.
Fabrizio
5 years 2 months ago #3 by fab

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
As I said before, we doubled the actual size of generated thumbnail, and then resize it using img attribute.

why we have this *2 in the helper?

*2 is for doubling the size. If you don't want to have a double size thumbnail then you can delete that *2 part
5 years 2 months ago #4 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Ok, thanks...

Best regards
Fabrizio
5 years 2 months ago #5 by fab

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
You're most welcome fabrizio. Thanks!
5 years 2 months ago #6 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum