WordPress.org

Forums

Easy FancyBox
Facebook Like and Disable right click to Easy FancyBox (5 posts)

  1. xperimenter
    Member
    Posted 3 years ago #

    Is there a way to add Facebook Like and disable right click options to this plugin. Examples are here http://fancyapps.com/fancybox/

    I guess it is not a big deal for guys who created the plugin, but definately not for an average user like myself :) Could you please advise where to paste that pieces of code to make it work? If not possible, can you include these options to the next version?

    Thank you!

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 3 years ago #

    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...

  3. xperimenter
    Member
    Posted 3 years ago #

    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.

  4. RavanH
    Member
    Plugin Author

    Posted 3 years ago #

    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...

  5. xperimenter
    Member
    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.