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
       
  • Replied by admin on Monday, February 03 2020, 01:25 PM · Hide· #1
    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.
    • fab966 - 3 weeks ago
      Thanks for your answer.
      I know, better a Module Params for the Heading (H1, H2, H3, none).
      I have found and solved the problem with the Thumbs Paths:
      To write Thumbs is this correct:
      $thumb_folder ="/images/thumbnails/mod_latestnewsplusdate/";
      but to read and render paths is this correct (without the first slash):
      $thumb_folder ="images/thumbnails/mod_latestnewsplusdate/";
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by fab966 on Monday, February 03 2020, 01:36 PM · Hide· #2
    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
  •  
  • Replied by admin on Monday, February 03 2020, 01:44 PM · Hide· #3
    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
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by fab966 on Monday, February 03 2020, 01:58 PM · Hide· #4
    Ok, thanks...

    Best regards
    Fabrizio
  •  
  •  
    Replied by admin on Monday, February 03 2020, 10:36 PM · Hide· #5
    You're most welcome fabrizio. Thanks!
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments