Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi dropshot, can you share a link to your site? I might be able to give you some pointers 🙂

    Thread Starter dropshot

    (@dropshot)

    Hi RavanH, thanks for your reply.

    Unfortunately it’s on localhost so far.

    Is there any other info you might find useful?

    Normally, Easy FancyBox should detect links to images automatically and bind itself to them. How does Simple Instagram embed images? Can you share a source code snippet?

    Thread Starter dropshot

    (@dropshot)

    I know. It normally does. That’s why I’m left without a clue… 😉

    This is the generated HTML code for the single instagram picture

    <div class="si_item">
    <code>
    <a target="_blank" href="http://instagram.com/p/qZo5iqNOQC/">
    <img width="210" height="210" src="//scontent-b.cdninstagram.com/hphotos-xpa1/t51.2885-15/926825_667893649971475_1750257050_a.jpg">
    </a>
    </code>
    </div>

    Ah ok, that explains it. The href target is a HTML page, not an image file…

    Does Simple Instragram have an option to link to the larger image file version instead of the Instragram page?

    If not then I guess you would have to either modify the Simple Instagram plugin so that it creates HTML code with href pointing to (in the above example) http://scontent-b.cdninstagram.com/hphotos-xpa/t51.2885-15/926825_667893649971475_1750257050_n.jpg (notice the _a.jpg is replaced with _n.jpg) or you will have to write some custom javascript that replaces the link targets that wrap these instagram images on ‘document ready’. That code can then be added in the footer.php or even a text widget.

    Thread Starter dropshot

    (@dropshot)

    Ok. I was suspecting that as soon as I pasted the code.

    Thanks for the confirmation!

    Simple Instagram plugin only has two alternatives to link. Either false or true. And true is the html-page.

    I guess I could manipulate the plugin core files somehow. I rather not though. And I’m not to good with javascript. If you have something easy on your hand I would really appreciate it.

    Otherwise I will try to find another plugin.

    Thread Starter dropshot

    (@dropshot)

    Update:

    I found the shortcode had one option to display the full image (ending with _n.jpg)

    One problem down, one to go! 😉

    Thread Starter dropshot

    (@dropshot)

    Update:

    I found what to edit.

    In simple-instagram-shortcodes.php on line 69-71

    if($link == 'true'){
    	         $return .= '<a href="'.$image->link.'" target="_blank">';
    	       }

    Replace with

    if($link == 'true'){
    	         $return .= '<a href="'.$url.'" target="_blank">';
    	       }

    If someone has an update-safe-way to edit this please let me know.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘How to view with Fancybox’ is closed to new replies.