• Resolved chrislowthian

    (@chrislowthian)


    Is it possible to Link back to the users photo on Instagram when viewing the Instagram Photo in Fancybox?

    Either by Clicking on the Photo or via a text link under the Photo saying “Comment” or something similar?

    It would make my site allot more social by allowing users to comment on the photos.

    Any help adding this in would be great.

    https://www.ads-software.com/extend/plugins/instapress/

Viewing 11 replies - 1 through 11 (of 11 total)
  • I would also like to know the answer to this question. I would like to link it back to my https://instagrid.me/ page.

    Plugin Author liechtenecker

    (@liechtenecker)

    Hello,

    unfortunately this isn’t possible in the current version by default, but we’ll thinking about including it in the future.

    I had some luck linking the photo’s title back to Instagram by changing this line on instagram.php (short code use) and widget.php (side bar widget)

    // jQuery Fancybox
    case 'fancybox':
    $result .= '<a>images->standard_resolution->url.'" rel="instagram-sc-images" title="'.$title.'">';

    to:

    // jQuery Fancybox
    case 'fancybox':
    // Custom code to link title to Instagram
    $result .= '<a href="'.$obj->images->standard_resolution->url.'" rel="instagram-sc-images" title="<a href="'.$obj->link.'" target="_blank">'.$title.'</a >"">';

    This assumes that all of your Instagram photos will have a title.

    Just keep in mind that if the developer issues an update that this change will get overwritten.

    I just ended up putting a link at the bottom. Hopefully they do upgrade the widget to link back through the photos.

    eberger3,

    Love your solution but didn’t have any luck. Got a line #?

    I would love to have a link to the instagram post – the way it does when fancybox isn’t enabled – on the title/caption OR append the title with the link, “view on instagram”.

    On my code editor it is line #340 in the instapress/instagram.php file. I did find an error on my earlier post. You need use the html codes for your special characters in some spots. Try:

    $result .= '<a href="'.$obj->images->standard_resolution->url.'" rel="instagram-sc-images" title="<a href=&quot;'.$obj->link.'&quot; target=&quot;_blank&quot;>'.$title.'</a >"">';

    Let me know how you make out.

    and on instapress/widget.php it is on line #120

    Thread Starter chrislowthian

    (@chrislowthian)

    So I am guessing you can add a link under the Instagram Picture in FancyBox?

    If so whats the best code to use?

    Thanks

    Thread Starter chrislowthian

    (@chrislowthian)

    After trying eberger3’s code:

    $result .= '<a href="'.$obj->images->standard_resolution->url.'" rel="instagram-sc-images" title="<a href=&quot;'.$obj->link.'&quot; target=&quot;_blank&quot;>'.$title.'</a >"">';

    It works fine BUT when you hover over the thumbnails it shows the link HTML in the Title which is not so great ??

    Is there a way to have the picture title then a link next to it saying “Click Here to Like or Comment”

    This would be sooooo much better but beyond my coding skills.

    Yeah, the issue is that the plugin uses the title= attribute in the thumbnail anchor tag to determine the title of the Fancybox image. When an anchor tag has a title most browsers will display the yellow tooltip or helper on hover which in our case includes the ugly html. According to Fancybox’s documentation you should be able to use the thumbnail images alt tag to populate the title but I haven’t gotten this to work.

    eberger3, how about including the username just before the caption? would that be simple to accomplish?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Instapress] Link Back to users photo on Instagram?’ is closed to new replies.