Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #298321

    Hi,
    I have a ‘terms and conditions’ page. I would like users to be able to view the t&c in a lightbox.

    Is it possible to have page open in a lightbox?

    Thanks!

    #298444

    Hey!

    Open js/avia.js and look for this lines:

    autolinkElements:   'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"]',
    videoElements	: 	'a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"]',
    

    Replace them by:

    autolinkElements:   'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href*=".jpg?"], a[href*=".png?"], a[href*=".gif?"], a[href*=".jpeg?"], a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]',
    videoElements	: 	'a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]',
    

    Finally, set the “terms and conditions” link like this:

    yourwebsite.com/terms-and-conditions?iframe=true
    

    Regards,
    Josue

    #298452

    Hi! Thanks for your quick reply!
    I gave that link a try with my own page in the link but, unfortunately, it opened the page in the same window, not a lightbox.
    (running wp 3.9.1 and latest enfold).
    Thanks again!

    #298453

    Hey!

    Please see my reply again, you need to do some modification in the js/avia.js file first.

    Regards,
    Josue

    #298466

    Oops – I missed that part. Sorry – let me do that first!

    #298472

    Got it. Worked great!! Is this one of those things I need to keep track of and update on every theme upgrade?
    BTW – I missed the top part because for some reason this page scrolled to the bottom – didn’t notice that when I loaded the page.
    Cheers,
    WJ

    #298492

    Glad it works, you are welcome.
    No, this is expected to be included in the next update.

    Best regards,
    Josue

    #298507

    how do we set the height and width of the pop up?

    #298510

    Hey!

    Try with this code (Quick CSS):

    .mfp-iframe-holder .mfp-content {
        max-width: 1200px !important; /* Change this value */
    }

    Cheers!
    Josue

    #298513

    thanks, that works. any solution for the height?

    #298519

    Hey!

    You could try something like this:

    .mfp-iframe-scaler {
        min-height: 1200px;
    }

    Be aware that forcing a fixed height will make the popup look distorted on smaller screens.

    Best regards,
    Josue

    #311853

    Hi Josue

    We used to be able to pass in params over the URI such as:
    ?iframe=true&width=100%&height=100%
    How come we can’t do that anymore? As you said yourself the above solution are absolute values which won’t work on small devices…

    #311968

    Hi @epresley!

    Have you tried setting a % value instead of px? try this:

    .mfp-content, .mfp-iframe-scaler {
        max-width: none !important;
        height: 100%;
        width: 100%;
    }

    Best regards,
    Josue

    #347020
    This reply has been marked as private.
    #347462

    Hi!

    the link “Allgemeinen Geschäftsbedingungen” does work for me. By clicking I get to http://testdomain.balance-circle.de/agb/?iframe=true
    Could you fix it?

    Best regards,
    Andy

    #347784

    Hello Andy,

    thanks for your answer. No it doesn´t work.. It should open as iframe in lightbox..

    Best regards
    Bruno

    #348051

    Hi Bruno!

    Add the following code to that custom text:

    <script>jQuery('body').avia_activate_lightbox();</script>
    

    Regards,
    Josue

    #349600

    Hello Josue!

    Thank you, it works now!!

    Best Regards
    Bruno

    #349628

    You are welcome Bruno, glad to help :)

    Regards,
    Josue

    #351263

    Hi,

    I tried this and it works, but i opens the hole page include the header and footer in lightbox.. How can i get it to open a page without that?

    Not like this:
    not like this
    Like this only:
    Like this

    • This reply was modified 10 years, 1 month ago by Kimsejer.
    #351306

    The easiest way would be to create a separate page for this, without header and footer eg. and call it just with the lightbox.

    Else you need to work with Javascript..

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘Page in lightbox’ is closed to new replies.