The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

lightbox questions

View previous topic View next topic Go down

lightbox questions

Post by gsindiana on August 24th 2012, 12:36 am

i noticed that this only works if it is not a linked image, like how most post when copying from the upload just so they dont have to add the img tags. is there a way to have this still work for that instead of it still opening in a new window?

also, is there something i can do to make the image a thumbnail when posted, then they zoom when clicked to full size of what was posted?

and finally, if a user posts 3 images in a post, can if be scrolled through in the lightbox, instead of closing and opening another image, etc?

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by LGforum on August 24th 2012, 1:48 am

Just remove the [url] tags from the img in your post. Then it won't be a link and won't open in a new window.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 24th 2012, 2:48 am

Ik how to do it myself, I'm just speaking for the other members that posts and use them. It makes this half cool then lol.

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 25th 2012, 6:13 pm

Anyone.

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by Shakespeare on August 25th 2012, 10:51 pm

@gsindiana wrote:i noticed that this only works if it is not a linked image, like how most post when copying from the upload just so they dont have to add the img tags. is there a way to have this still work for that instead of it still opening in a new window?

I'm confused on what your asking right here. Are you saying you want people to be able to just post a pic link without the img tags, and then when its clicked it opens in the lightbox, not a new tab?

Shakespeare
Forumember

Female Posts : 55
Reputation : 10
Language : English
Location : America

Back to top Go down

Re: lightbox questions

Post by LGforum on August 27th 2012, 2:31 am

Oh i get ya, all you need to do is change this:
Code:
$(function() {
  $('.postbody div img, .postbody .content img, .entry-content img, .post-entry div img').each(function () {
      $(this).not('a>img').not('img[src*="/smiles/"]').wrap('<a href="' + $(this).attr('src') + '" class="fa_fancybox"></a>');
  });     
  $(".fa_fancybox").fancybox();
});

To this:
Code:
$(function() {
  $('.postbody .content img, .entry-content img, .post-entry div img').filter(function(){ return this.parentNode.tagName.toLowerCase() != 'a'; }).fancybox();
});

Much better.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: lightbox questions

Post by xDroiidx on August 27th 2012, 2:43 am

will that make any image pop up when clicked^? cause i really want that, it would be cool to click on images in peoples signatures and have it popup

xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: lightbox questions

Post by LGforum on August 27th 2012, 2:57 am

If you want to make any image, change it this:
Code:

$(function() {
  $('img').fancybox();
});

OR so it doesn't affect your banner or navbar or sidebar or anything like that do this:
Code:
$(function() {
  $('img', document.getElementById('main-content')).fancybox();
});

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: lightbox questions

Post by xDroiidx on August 27th 2012, 3:51 am

what would the 2nd code you provided replace?

xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 28th 2012, 11:41 pm

@LGforum wrote:Oh i get ya, all you need to do is change this:
Code:
$(function() {
  $('.postbody div img, .postbody .content img, .entry-content img, .post-entry div img').each(function () {
      $(this).not('a>img').not('img[src*="/smiles/"]').wrap('<a href="' + $(this).attr('src') + '" class="fa_fancybox"></a>');
  });     
  $(".fa_fancybox").fancybox();
});

To this:
Code:
$(function() {
  $('.postbody .content img, .entry-content img, .post-entry div img').filter(function(){ return this.parentNode.tagName.toLowerCase() != 'a'; }).fancybox();
});

Much better.

when i changed that on mine it did nothing, the fancybox didnt work either?

edit, if you scroll down, this is what i am wanting to achieve, either by each post (if 5 pics were posted you could view as an image gallery, instead of clicking 1 at a time), scroll down to image gallery to preview. it adds the arrows to go to next image (wanting it for each post if possible if not and for each thread that would work to)

http://fancyapps.com/fancybox/#useful

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by nextlevelgaming on August 29th 2012, 3:12 pm

only thing I could suggest is a CSS lightbox that uses lightweight javascript. and by this I mean you will have to edit the CSS in your stylesheet, as well as some of your templates. If you would like to give this a whirl let me know and ill work on it and give you the code.


Ok some trial and error: i tried making it useful for profile image first inside the profile and start from there. Only issue I am having now is it is not resizing to create the correct light box so. I will keep trying and let you know.


Last edited by nextlevelgaming on August 29th 2012, 3:25 pm; edited 1 time in total (Reason for editing : trial and error)

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 29th 2012, 5:50 pm

Yes I would be interested. I've never been good with js. Wish I was sometimes. Like right now lol. Thanks

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 30th 2012, 1:41 am

working on reworking the code to allow a slideshow image effect

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by xDroiidx on August 30th 2012, 3:44 am

i just dont get where to place the javascript that u posted, in the original fancybox javascript page

xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 30th 2012, 11:19 pm

im not sure either, if you search for lightbox you can come up with the main source coding if you were to use this on a webpage, i messed around will pulling and editing parts, but like i said. im not to familiar with js and such.

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by LGforum on August 31st 2012, 1:03 am

What do you mean you don't know where to put it?

I presume you followed this tutorial: http://help.forumotion.com/t113681-add-a-lightbox-effect-to-the-images-of-the-forum

Swap the chunk I said in my post for the new code..

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: lightbox questions

Post by gsindiana on August 31st 2012, 5:49 pm

I tried that and it had no effect. Unless I replaced with the wrong part.

gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

Re: lightbox questions

Post by nextlevelgaming on September 3rd 2012, 9:56 am

I'm still working on lightweight javascript and the css3 code for ya. I haven't forgotten. Its just having some visual errors thats all. give me some time if you are still interested give me a pm thanks

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum