WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Can't get rid of this Border (8 posts)

  1. gabstero
    Member
    Posted 1 year ago #

    I am loving this plugin to pieces but I am battling a border that I can't get rid of. Here's a screen capture:

    https://docs.google.com/file/d/0B_N8FpsJgmErTkNHOXdYOTNOMEU/edit?usp=sharing

    thanks
    g

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

  2. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    It's most likely CSS from your theme running over to the FancyBox overlay. I'd need a live URL to find out more...

  3. gabstero
    Member
    Posted 1 year ago #

    Thanks for your help!!

    Here's the example: http://photogabi.com/2013/06/colorful-romania-part-1/

    thanks!
    g

  4. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, your theme has FancyBox already included. The modified stylesheet from http://photogabi.com/wp-content/themes/photocrati-theme-v4.5/admin/css/jquery.fancybox-1.3.4-thick.css is 'causing' the extra border. Then there is http://photogabi.com/wp-content/themes/photocrati-theme-v4.5/admin/js/jquery.fancybox-1.3.4.pack.js included which is later overwritten by the one from my plugin.

    Is there any reason why you would want to add my plugin when FancyBox is already part of your theme?

  5. gabstero
    Member
    Posted 1 year ago #

    Thanks for the tip.

    Your FancyPost displays the photo caption, and you can navigate through all the pictures in the post as if you do in a gallery. Check the same link I posted above with your plugin disabled. It only displays a border around the image - that's all.

    Yours is by far an elegant option.

    thanks!
    g

  6. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    EDIT: code removed...

    This should (in theory) give all the images that are being addressed by your themes own script, an extra attribute which will cause FancyBox to see them as belonging to one gallery...

  7. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    No, strike that previous post... It will cause an error. Better do this:

    Open your themes header.php and find the part (not far above the closing </head> tag but it might look different with PHP code intertwined) that is resonsible for this output:

    ...
    	var lighboxSelector = '.photocrati_lightbox_always, a:has(\'[class*=\'wp-image\']\'), .photocrati_lightbox';
    
    	jQuery(lighboxSelector).fancybox({
    		'overlayColor'		: '#0b0b0f',
    		'overlayOpacity'	: 0.8,
    		'centerOnScroll'	: true,
    				'titlePosition'		: 'outside'
    			});
    
    });
    </script>

    When you are sure you recognize the part that is responsible for that output, then change one line ever so slightly by adding .attr('rel','gallery') right after jQuery(lighboxSelector) and before .fancybox({... so it will look like this:

    jQuery(lighboxSelector).attr('rel','gallery').fancybox({

    Hope that helps :)

  8. gabstero
    Member
    Posted 1 year ago #

    RavanH!

    Thanks much for your help! I discovered that my theme has a setting that disables their FancyBox inclusion. So with that out of the picture your Easy FancyBox rules. Literally!

    http://photogabi.com/2013/06/colorful-romania-part-1/

    Border is gone. Thank you!

    much obliged!
    Gabi.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic