Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Built in Image Resizing Does Not Enlarge Images in a Popup. Opens a new tab instead. Solution?

aeryaery Gtricks Forum in 2.2 :) ✭✭✭

Example - http://www.gtricks.com/youtube-tricks/watch-blocked-youtube-videos-not-available-in-your-country/

When you click on images, they are supposed to open in a popup. They used to work before as far as I remember. But now cannot see this functionality working.

PS - I had same problem some time back in a theme I was testing. Still did not get answer. May be this time, I will get decent solution.

There was an error rendering this rich post.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Would it make sense for the images to pop up in an iframe?

    Wouldn't the popup be contained to that iframe?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    You need to use the Fancybox plugin . You can't make images pop up with normal popup js . I tried but got the hash instead of the image .

  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭

    @hgtonight no, not in iframe. Just the enlarged (original size) image in popup like with the fancy box plugin.

    @vrijvlinder bingo. Same functionality.

    But as far as I remember, this was present by default in Vanilla. No need to add any extra. plugin.

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    If it was in there I never saw it. In fact I had to make them open in a new window because they opened in the same page and it was irritating ... who knows but if you want that functionality back you could just try the fancybox , I think what you refer to is the lightbox , and I seem to have read somewhere that it was removed or disabled for some reason or another. .. will search for that discussion ...

  • hgtonighthgtonight ∞ · New Moderator

    @aery said:
    hgtonight no, not in iframe. Just the enlarged (original size) image in popup like with the fancy box plugin.

    I was alluding to the fact that embedded comments are an iframe and putting a pop up effect (like fancybox) would be restricted to that iframe.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭

    @hgtonight sorry sorry. My bad.

    Accidently I mentioned wrong url. The correct one is http://forum.gtricks.com/discussion/785/hindu-gods-cartoon-illustration-by-pixars-animator

    Here is images has to be in popup though embedded or not.

    BTW, You are right on that iframe thing :)

    PS: Please edit the original post with this url so other can help.

    There was an error rendering this rich post.

  • hgtonighthgtonight ∞ · New Moderator
    edited June 2013

    Looks like the image resize function has changed slightly from 2.0.18.8 to 2.1b1.

    2.1b1 links to the image, 2.0.18.8 changes the dimensions to full width.

    Check it out in /js/global.js line 1223 (2.1b1) and line 818 (2.0.18.8).

    In 2.1b1, they trigger an event that could be hooked into via JS.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited June 2013

    never mind looked at wrong version.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭

    I have tried to replace that js code with that of 2.0.18.8. Argh! it did not work.

    I also saw this triple equal-to's in a image resizing statement. Is that typo or intentionally done?

    if (node.tagName.toLowerCase() === 'img')

    There was an error rendering this rich post.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I think I know why the pop up gets the hash when I make it popup. I have been experimenting adding a drop zone in the uploads, I believe the images get encoded base64 and decoded when opening it in another window. There is no instruction to decode it in the pop up so what we see is the base64 strings.

  • hgtonighthgtonight ∞ · New Moderator

    @aery said:
    I also saw this triple equal-to's in a image resizing statement. Is that typo or intentionally done?

    if (node.tagName.toLowerCase() === 'img')

    The triple equal operator is called the identity operator and is probably intentional. It is commonly called a "strict comparator" since it also checks the variable type.

    For more information: http://www.c-point.com/javascript_tutorial/jsgrpComparison.htm

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭

    Oh that's knowledgeable.

    I learned in my programming class 10 years back that double equal to == is for comparisio. Now, I see they have something new.

    There was an error rendering this rich post.

Sign In or Register to comment.