Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

question-circle Some questions and requests

  • Сергей_Матюнин
  • Сергей_Матюнин's Avatar Topic Author
  • Offline
More
5 years 8 months ago #5031 by Сергей_Матюнин
Some questions and requests was created by Сергей_Матюнин
1. How to avoid changes of module's height at animation (different news have different height)? I tryed min-height but is not so good idea. I think, height should be fixed as at highest article in current module.

2. It it possible to combine ALL js and css cache files to one for all LNE modules (as option)? Some bigger files, but but fewer requests. I have some different modules with the same styles and animation, but for every module unique cache. So, my plugin JCHOptimize creates different cache for every page with LNE modules.

3. Lazyloading for images. I make it with some hardcode in helper_standart.php:
$item->imagetag = '<img data-sizes="auto" class="lazyload" alt="'.$item->title.'" src="data:image/gif;base64,R0lGODlhhgEEAYAAAP///wAAACH5BAAAAAAALAAAAACGAQQBAAL/hI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1qt9yu9wsOi8fksvmMTqvX7Lb7DY/L5/S6/Y7P6/f8vv8PGCg4SFhoeIiYqLjI2Oj4CBkpOUlZaXmJmam5ydnp+QkaKjpKWmp6ipqqusra6voKGys7S1tre4ubq7vL2+v7CxwsPExcbHyMnKy8zNzs/AwdLT1NXW19jZ2tvc3d7f0NHi4+Tl5ufo6err7O3u7+Dh8vP09fb3+Pn6+/z9/v/w8woMCBBAsaPIgwocKFDBs6fAgxosSJFCtavIgxo8aNwhw7evwIMqTIkSRLmjyJMqXKlSxbunwJM6bMmTRr2ryJM6fOnTx7+vwJNKjQoUSLGj2KNKnSpUybOn0KNarUqVSrWr2KNavWrVy7ev0KNqzYsWTLmj2LNq3atWzbun0LN67cuXTr2r2LN6/evXz7+v0LOLDgwYQLGz6MOLHixYwbO34MObLkyZQrW76MObPmzZw7e/4MOrTo0aRLmz6NOrXq1axbu34NO7bs2bRr276NO7fu3bx7+/4NPLjw4cSL7y0AADs=" data-src="'.$filename.'" '.$extra_attribute.$extra_styling.' />'
It would be cool to be able to do something like this with settings.

3. When I analize my site with dareboost.com I see the improvements (see attach)
Attachments:

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

More
5 years 8 months ago #5032 by syw
Replied by syw on topic Some questions and requests
Hello!

I am going to try and be as thorough as possible :-) Thank you for your suggestions!

1 - Min height is a quick fix but does not take into account the fact that pages need to be responsive. The animation script sizes itself on items that are visible, that is why you get 'movement' when the script gets to the next batch of visible items. One thing you could try is crop the text to a certain number of characters, therefore limiting the height 'jumps' if the text defers a lot from one item to the next.

2 - The combination of CSS and JS files cannot be done at the module level, it has to be done through a plugin (because plugins can be aware of what is on the resulting page, module instances are only aware of themselves). That is why a plugin like JCHOptimize is perfect for this kind of task. Creating a plugin for LNEP would just replicate what JCHOptimize can do already. Make sure you have 'reset headers' set to 'no' in the advanced options of your module instances. That will prevent module instances scripts and stylesheets to be re-created on every page load.

3 - Lazyload of images is a cool feature indeed but is incompatible with high resolution images (one of the other option of the module). Reason is: the module inserts high resolution images for retinal displays using the same technique as the one you described. I need to find a better way to make these 2 features able to work with each other.

4 - The jQuery is built this way for a reason.
For instance, I am using jQuery(".lnee .innerpicture img[data-src]") to only target images created by the module (as thumbnails) and avoids looking for images that could be in the intro text.

Olivier.
The following user(s) said Thank You: Сергей_Матюнин

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

  • Сергей_Матюнин
  • Сергей_Матюнин's Avatar Topic Author
  • Offline
More
5 years 8 months ago #5033 by Сергей_Матюнин
Replied by Сергей_Матюнин on topic Some questions and requests
Thank you for the detailed answer!

About Lazyload + high resolution images: github.com/aFarkas/lazysizes
Awesome library, have both this features with very simple markup.

You can see as it works on my site photocrew.ru

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

More
5 years 8 months ago #5034 by syw
Replied by syw on topic Some questions and requests
You are welcome :-)

I will definitely look at an improved solution for lazy loading.
Note that the one library you have suggested is the one I use already, so I will make sure I update it and incorporate the necessary modifications to make both features work.
:-)

Thank you for sharing your page and your feedback !

Olivier.

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

More
5 years 7 months ago #5045 by syw
Replied by syw on topic Some questions and requests
For your information, the lazy loading technique has been added to the extension v4.5. It is complementary to the way images are swapped on retina displays.
:-)

Olivier.

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

  • Сергей_Матюнин
  • Сергей_Матюнин's Avatar Topic Author
  • Offline
More
5 years 6 months ago #5059 by Сергей_Матюнин
Replied by Сергей_Матюнин on topic Some questions and requests
Thanks!

I find the bug:

src="'.JURI::root(true).'/media/syw_latestnewsenhanced/loaders/ajax-loader.gif"

There is no this image in target folder. So it cause console errors and some bugs with module's height.

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