-
AuthorPosts
-
July 31, 2014 at 5:16 pm #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!
July 31, 2014 at 10:34 pm #298444Hey!
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,
JosueJuly 31, 2014 at 10:53 pm #298452Hi! 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!July 31, 2014 at 10:56 pm #298453Hey!
Please see my reply again, you need to do some modification in the js/avia.js file first.
Regards,
JosueJuly 31, 2014 at 11:19 pm #298466Oops – I missed that part. Sorry – let me do that first!
July 31, 2014 at 11:25 pm #298472Got 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,
WJAugust 1, 2014 at 12:06 am #298492Glad it works, you are welcome.
No, this is expected to be included in the next update.Best regards,
JosueAugust 1, 2014 at 1:35 am #298507how do we set the height and width of the pop up?
August 1, 2014 at 1:50 am #298510Hey!
Try with this code (Quick CSS):
.mfp-iframe-holder .mfp-content { max-width: 1200px !important; /* Change this value */ }
Cheers!
JosueAugust 1, 2014 at 2:07 am #298513thanks, that works. any solution for the height?
August 1, 2014 at 2:34 am #298519Hey!
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,
JosueSeptember 1, 2014 at 3:01 pm #311853Hi 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…September 1, 2014 at 6:09 pm #311968Hi @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,
JosueNovember 6, 2014 at 9:47 am #347020This reply has been marked as private.November 7, 2014 at 12:19 am #347462Hi!
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,
AndyNovember 7, 2014 at 4:36 pm #347784Hello Andy,
thanks for your answer. No it doesn´t work.. It should open as iframe in lightbox..
Best regards
BrunoNovember 8, 2014 at 3:39 am #348051Hi Bruno!
Add the following code to that custom text:
<script>jQuery('body').avia_activate_lightbox();</script>
Regards,
JosueNovember 11, 2014 at 6:42 pm #349600Hello Josue!
Thank you, it works now!!
Best Regards
BrunoNovember 11, 2014 at 7:35 pm #349628You are welcome Bruno, glad to help :)
Regards,
JosueNovember 14, 2014 at 3:10 pm #351263Hi,
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:
Like this only:
- This reply was modified 10 years ago by Kimsejer.
November 14, 2014 at 4:54 pm #351306The 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..
-
AuthorPosts
- The topic ‘Page in lightbox’ is closed to new replies.