pretypto社交工具不共享灯箱深链接

prettyPhoto social tools do not share lightbox deep-link

本文关键字:链接 共享 工具 pretypto      更新时间:2023-09-26

为了解决我的相关pretypto问题,我试着重新启用深度链接,希望它的社交工具Twitter和Facebook会接收到深度链接的URL,并在Twitter上/点赞/分享它,而不是图库页面,但它没有。

另外,当在新选项卡/窗口/浏览器/会话中加载深链接URL时,pretypto灯箱无法加载深链接中引用的相应图像,而是加载页面,就好像深链接不存在一样。

我不确定深度链接共享问题是否由于hastag函数的问题:在jquery. pretyphoto .js中的function setHashtag() ?

任何关于修复这个深度链接问题的指导将不胜感激:-)

干杯!

答案:

你需要在你的主题中找到一些需要改变的东西(事实上,它可能在你的案例中的文件avia.js中第466行)

——1),social_tools: ",

2), deeplinking = false,

您需要更改为

deeplinking = true,

并添加2个元素(iframe_markup, inline_markup),并更改social_tools,如下所示:

所以新的第466行看起来像
elements.prettyPhoto({
    social_tools:'<div class="pp_social"><div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&href='+location.href+'&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>',
    slideshow: 5000,
    deeplinking: true,
    overlay_gallery:false,
    default_width: ww,
    iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
    inline_markup: '<div class="pp_inline">{content}</div>',
    default_height: wh
});

那是twitter和facebook。只需在上面看到的相同格式中添加您想要的其他内容。尼克。

参考:http://www.kriesi.at/support/topic/single-image-share