Indexhibit

Login:

Created by:
Daniel Eatock &
Jeffery Vaska

Built with Indexhibit

Lazyload Plugin

 

Indexhibit version: 2.0
Thread is not resolved.

DerekMTL
CANADA
1 year(s) ago
Permalink Post

Hello!

I was hoping to implement the lazyload plugin on my news page but have a few questions.

I downloaded the plugin from this site appelsiini.net/projects/… and added it to my plugins folder

I added the this code between my tags in index.php

  1. <script src="jquery.js" type="text/javascript"></script>
  2. <script src="jquery.lazyload.js" type="text/javascript"></script>

I uploaded my images to my image file folder via .ftp and placed my image code in the body on my test exhibit (over and over)

  1. <img class="lazy" src="derekbroad.com/files/grey.gif" data-original="http://www.derekbroad.com/files/…;

Now I need to put this "in my code" but i am not really sure where? Does this also go in the index.php?

  1. $("img.lazy").lazyload();

As of right now I just get a grey block and my "data-original" does not load.

Any help would be greatly appreciated.
My test page is derekbroad.com/index.php/info/test/

Thanks!
Derek

arsondpi
GREECE
1 year(s) ago
Permalink Post

the class "lazy" needs to be added to the format so images can be generated dynamically (lines 172 and 193)

You don't need to load jquery again - so skip that 'cause its already in the template.
The javascript plugin needs to be added after line 57 - try something like:

  1. $OBJ->template->add_js('jquery.lazyload.js');

(that is assuming that you uploaded the plugin to the correct javascript folder)

As for the javascript line, try adding it to the code of line 62...

DerekMTL
CANADA
1 year(s) ago
Permalink Post

Hello,

Thanks you for your response! I am a bit new to jquery, so please forgive me.. lol
I just want to make sure I am doing the right thing!

I uploaded the jquery.lazyload.js to my site/ndxzsite/js folder. I noticed there is already a jquery.lazyload.min.js there. Hope this is okay

As far as the code, I am adding the

  1. $OBJ->template->add_js('jquery.lazyload.js');

to my index.php on on line 62? Is this the main index.php at the root or the one in my default folder?

I added my

  1.     <script src="jquery.js" type="text/javascript"></script>
  2.     <script src="jquery.lazyload.js" type="text/javascript"></script>

to the index.php in the default folder between the head tags. I hope this is correct.

And lastly, Adding the class "lazy" to lines 172 and 193, which file will I be adding this too?

Thanks again for all your help. Very much appreciated.

Thanks!

arsondpi
GREECE
1 year(s) ago
Permalink Post

Err- Derek, this requires code basics knowledge.
As I mentioned you don't need to load jquery again - so skip that 'cause its already in the template.
The rest need to be added in the actual format php file.

DerekMTL
CANADA
1 year(s) ago
Permalink Post

Okay, thanks for your help!

TwoOfEight
AUSTRIA
1 year(s) ago
Permalink Post

Hi,

So, lazy load is already installed on indexibit v2.x.x ?
Beacause derekmtl said: '' I uploaded the jquery.lazyload.js to my site/ndxzsite/js folder. I noticed there is already a jquery.lazyload.min.js there. Hope this is okay ''

Vaska A
UNITED STATES
1 year(s) ago
Permalink Post

It's in the files but we have not utilized it yet. There are issues with Lazyload that prevent it from working on some browsers - otherwise this would be much more simple.

TwoOfEight
AUSTRIA
1 year(s) ago
Permalink Post

Aha, but if I download it and do what 'arsondpi' said it should work?

TwoOfEight
AUSTRIA
1 year(s) ago
Permalink Post

Additionally; You mean it does not work on some browser due to the onboard lazyload version or due to other issues with indexebit itself as well if I update/load lazy load for myself?

arsondpi
GREECE
1 year(s) ago
Permalink Post

It's not that easy - you do need coding skills...

TwoOfEight
AUSTRIA
1 year(s) ago
Permalink Post

Additionally; You mean it does not work on some browser due to the onboard lazyload version or due to other issues with indexebit itself as well if I update/load lazy load for myself?

Vaska A
UNITED STATES
1 year(s) ago
Permalink Post

No, I actually mean the web browsers themselves - it's not an Indexhibit issue in that respect.

Why don't you simply try Pindaros' advice and see how it goes. I'm thinking on this a little bit but right now I have other things on my plate that need to be dealt with first.

TwoOfEight
AUSTRIA
1 year(s) ago
Permalink Post

Ok. and who/where is Pindaros advice for what?

Vaska A
UNITED STATES
1 year(s) ago
Permalink Post

His forum nick is arsondpi (look above).

TwoOfEight
AUSTRIA
1 year(s) ago
Permalink Post

;-) ok. cheers

Showing 1 - 15 of 15 posts in Forum » Customize » Lazyload Plugin
 

You need to be logged in to post.