The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

lightbox questions

5 posters

Go down

lightbox questions Empty lightbox questions

Post by gsindiana 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?
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by LGforum 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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by gsindiana 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.
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

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

Anyone.
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by Shakespeare 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
Shakespeare
Forumember

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

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by LGforum 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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by xDroiidx 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
avatar
xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by LGforum 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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

lightbox questions Empty Re: lightbox questions

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

what would the 2nd code you provided replace?
avatar
xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by gsindiana 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
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by nextlevelgaming 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
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

lightbox questions Empty Re: lightbox questions

Post by gsindiana 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
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

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

working on reworking the code to allow a slideshow image effect
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

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

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

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by gsindiana 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.
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

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

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

I presume you followed this tutorial: https://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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

lightbox questions Empty Re: lightbox questions

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

I tried that and it had no effect. Unless I replaced with the wrong part.
avatar
gsindiana
New Member

Posts : 23
Reputation : 1
Language : english

Back to top Go down

lightbox questions Empty Re: lightbox questions

Post by nextlevelgaming 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
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

Back to top

- Similar topics

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