Viewing 4 replies - 1 through 4 (of 4 total)
  • FancyBox as a WordPress plugin has some restrictions, so you cannot expect the same flexibility as a stand-alone, hand-integrated extension. That said, you might try this:

    Use the Facebook like-button creator tool and choose the iframe button version. Copy the code and paste it into the Alt text field of a thumbnail image. Make sure you remove any link title field content and have the plugins options ‘Show title’ and ‘Allow title from alt’ checked. You should now have a facebook like button in the image title inside FancyBox.

    If not, you might need to replace all the double quotes (“) inside the button code with single quotes (‘) to make it work…

    Thread Starter xperimenter

    (@xperimenter)

    Thank you for the suggestion, RavanH! I tried and it works, but it is not convenient to copy-paste iframe code for each and every picture. It also looks jammed together with text, since I use Alt text field as a description for pictures in fancybox window instead of just title. BTW how to align Alt text to the left when displayed in fancybox? If I put 2-3 lines it looks ugly with align to center.

    I hope Facebook Like feature will be integrated in the next version.

    Also, RavanH, can you please answer another question I posted: how to disable right mouse click? I don’t really like an idea of people copying any image they like from my portfolio.

    Middle-aligned titles is the FancyBox default when you use Title position ‘Float’ or ‘Inside’. The other two use let-aligned titles. You could change this by either installing the plugin Safe CSS or editing your themes stylesheet and adding this rule:

    #fancybox-title-inside {
    text-align: left;
    }

    About the title being jammed close to the facebook like button, you can give some margin style rules to the iframe… But I understand you have too many images on your site.

    Disabling right-click will be an option in the next release but for now, you can add this code to a text widget in your sidebar or footer:

    <script type="text/javascript">
    jQuery(document).bind('contextmenu',function(e){e.preventDefault();});
    jQuery(document).bind('dragstart',function(e){e.preventDefault();});
    </script>

    This will disable the right click context menu and prevent dragging images. However, it is impossible to completely prevent download of your images since the source URL in each link is still visible and direct access to these files cannot be prevented. Otherwise they would not be visible on your site…

    Thread Starter xperimenter

    (@xperimenter)

    RavanH, you’re rock! )) I tried to install a FancyBox for WP first, I had questions and posted them to a support forum no one replied at all, so was with some other plugins. But you replied promptly and was very helpful. I am happy to deal with you guys and will keep using your plugin! Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Facebook Like and Disable right click to Easy FancyBox’ is closed to new replies.