• Resolved anderssonolofandreas

    (@anderssonolofandreas)


    Hi!

    I’m working with a project where I’m trying to create a form of filterable knowledgebase/galley so that when you press the search result links they open up in a lightbox instead of take you to another page and I bought Ari Fancy Lightbox Pro in order to get that functionality.

    I’ll write a script that adds target_”blank” and ari-fancybox ari-fancybox-iframe to the seach result-links but still have some questions.

    When I try Ari Fancy Lightbox function on a internal PDF link a very small “ribbon” opens up and I have to scroll in a really wierd way. The same happends when I manually add the target attribute and classes to the search-links – a very narrow lightbox opens up.

    Is there a way to make the lightbox size fit the link content?

    Best reagrds,
    Andreas

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author arisoft

    (@arisoft)

    Hello,

    Could you provide a link to a page where the problem occurs? If it is private, you can send it by email ([email protected]).

    Plugin Author arisoft

    (@arisoft)

    BTW, the plugin doesn’t detect size of loaded content (for iframe content including PDF files). By default it uses the following width and height values which are defined in a CSS file:

    width: 80%;
    height: 80%;

    These values can be overridden if add data-options attribute to “A” element:

    <a href='https://www.ari-soft.com' class='ari-fancybox-iframe' data-options='{"iframe":{"css":{"width":"20%","height":"150px"}}}'>Open lightbox</a>

    Thread Starter anderssonolofandreas

    (@anderssonolofandreas)

    Hi,

    Thanks for the quick reply.

    The link is test.apologia.se, if you scoll down to the section “Om” and down to Vision there is a read me button which now goes to a external link.

    Thread Starter anderssonolofandreas

    (@anderssonolofandreas)

    It seems to be the fancybox-outer elements overflow-y: auto; that causes the issue. When I remove it things look good IMO =)

    Any suggestions as the where it’s suitable to change that CSS value?

    Plugin Author arisoft

    (@arisoft)

    The problem occurs because old version of Fancybox library (2.1.4) is loaded by your theme. We are investigating further how to resolve this problem and report about results soon.

    Plugin Author arisoft

    (@arisoft)

    The conflict can be resolved if remove wp-content/themes/thegem/js/fancyBox/jquery.fancybox.pack.js file. Try to activate “Remove 3rd party plugins” parameter which is located on “Advanced” tab on “ARI Fancy Lightbox -> Settings” page. If it doesn’t help, then a custom PHP code should be placed in child theme functions.php to remove the script. It will look like:

    wp_deregister_script( 'jquery_fancybox' );

    Just specify correct script name.

    Thread Starter anderssonolofandreas

    (@anderssonolofandreas)

    Wow! I’m really impressed by your support =D Just clicking “Remove 3rd party plugins” worked great!

    A thousand thanks =)

    Plugin Author arisoft

    (@arisoft)

    You are welcome ??

    Thread Starter anderssonolofandreas

    (@anderssonolofandreas)

    After making some progress with the PDF-link I noticed another issue occured which I’m not sure how to fix.

    My plan in to make the pages which is in my search results display in a lightbox. I’ve tried manually adding target=”_blank” and the class=”ari-fancybox ari-fancybox-iframe” but notice that:

    – When I have “Remove 3rd party plugins” checked the links does not open in a lightbox but rather takes me to a new page (in a new tab).

    – When “Remove 3rd party plugins” is not checked (and functions.php is not modified and …pack.js is not removed) and I manually add target and class attribute the link does in a lightbox but in a very narrow one =(.

    Do you have any ideas on how to resolve this is other thoughts I’d be very happy =)

    Plugin Author arisoft

    (@arisoft)

    If search results are loaded via AJAX then it requires to init new elements (anchors in search results) each time when search is completed. Is custom DOM event raised when search is completed?

    Thread Starter anderssonolofandreas

    (@anderssonolofandreas)

    Not yet, but I’ll write that code in a while. What I’m curious about is if I need something more than ari-fancybox and ari-fancybox-iframe classes and target _blank in order for it to work? It seems so given that I don’t get any light when i manually add thoose values in inspector

    Plugin Author arisoft

    (@arisoft)

    If you use PRO version then the following javascript code can be called to attach the lightbox to elements which are added dynamically:

    ARI_FANCYBOX_INSTANCE.convertElements()

    or use the following code for free version:

    jQuery('.ari-fancybox-iframe').fancybox(jQuery.extend(true, {}, ARI_FANCYBOX_HELPER.defaults.lightbox, ARI_FANCYBOX && ARI_FANCYBOX.lightbox ? ARI_FANCYBOX.lightbox : {}, {type: 'iframe', iframe: {scrolling: 'auto'}}))

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I bought Ari Fancy Lightbox Pro in order to get that functionality.

    For pro or commercial product support please contact the author directly on their site.

    https://www.ari-soft.com/

    As the author is aware, commercial products are not supported in these forums. As you are their customer I am sure they will have no problem supporting you there.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Super-tiny lightbox’ is closed to new replies.