• Resolved rengland77

    (@rengland77)


    Are there directions for this somewhere and I just can’t find them?
    I’m just gonna have a link in my footer that opens my Privacy Policy page.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would like to know the same thing….how to do inline popup of html, php, etc…..

    Plugin Author dFactory

    (@dfactory)

    Hi all.
    Sorry for the late reply.
    This functionality is not documented yet but the idea is this:

    To use lightbox for a iframe, inline element (like div) or ajax we’ve introduced a data-rl_content attribute.

    The atrribute can have any of 3 parameters: iframe, inline or ajax and you add it to a link like this:

    $link = '<a href="#contact-form" data-rel="lightbox" data-rl_content="inline">Link to div</a>'; ?>

    and in case of iframe like this:

    $link = '<a href="iframe_url_here" data-rel="lightbox" data-rl_content="iframe">Link to iframe</a>'; ?>

    You have to put the link into a variable as it has to be parsed by RL function that handles adding proper syntax depending on the lightbox script used. So your next step is:

    if ( function_exists( 'rl_add_lightbox' ) ) {
    	echo rl_add_lightbox( $link );
    }

    It’s also possible to check if your current lightbox support iframe, inline or ajax content like this:

    if ( function_exists( 'rl_current_lightbox_supports' ) ) {
    	$supports = rl_current_lightbox_supports( 'iframe' ); // true, false
    }

    At least that’s how it works now. Not very user friendly as there’s no option to do that in your post content. But that’s the ground for the future GUI and/or the shortcode.

    • This reply was modified 6 years, 9 months ago by dFactory.
    Thread Starter rengland77

    (@rengland77)

    I can handle code, this is fantastic. Thank you!

    Hi again. So is there a simple inline answer for Videos and HTML like you do for images? I would also like to popup Youtube videos. Need inline “<a href=” type of thing

    Like the way I popup images:

    <a href="/wp-content/uploads/2016/02/MyLargePicture.jpg" rel="lightbox[MYStuff]" title="Here is the title that goes under the picture. ">Click For Picture</a>

    Would love to have simple inline code like that above to show .html, or a youtube video. Does this exist yet? Something that could work in HTML (a wordpress post). Would be great.

    • This reply was modified 6 years, 8 months ago by Microcap.
    • This reply was modified 6 years, 8 months ago by Microcap.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to link to iFrame’ is closed to new replies.