Postings

You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).

Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!

Some questions and requests

More
IP: 188.242.169.183 8 years 4 months ago #5031 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:
Code:
$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)
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 24.185.113.161 8 years 4 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: Сергей_Матюнин
More
IP: 188.242.169.183 8 years 4 months ago #5033 by Сергей_Матюнин
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
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 24.185.113.161 8 years 4 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.
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 24.185.113.161 8 years 2 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.
More
IP: 77.244.21.162 8 years 2 months ago #5059 by Сергей_Матюнин
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.