DiscuzX3.2百度分享没有图片的临时解决方法-Discuz教程下载

DiscuzX3.2百度分享没有图片的临时解决方法

开通本站Svip会员,全站资源免费下
  1. <!-- Baidu Button BEGIN -->
  2. <div style="margin:0 76px 0 76px;">
  3. <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
  4. <!--{eval $i =0}-->
  5. <!--{loop $post[attachments] $att}-->
  6. <!--{if $i < 5}-->
  7.     <!--{eval
  8.     $threadattachmenturl[] = 'http://www.moke8.com/ data/attachment/forum/'.$att['attachment'];
  9.     }-->
  10. <!--{/if}-->
  11. <!--{eval $i++}-->
  12. <!--{/loop}-->
  13. <a class="bds_mshare"></a>
  14. <a class="bds_tsina"></a>
  15. <a class="bds_qzone"></a>
  16. <a class="bds_tqq"></a>
  17. <a class="bds_t163"></a>
  18. <a class="bds_tsohu"></a>
  19. <a class="bds_kaixin001"></a>
  20. <a class="bds_renren"></a>
  21. <a class="bds_baidu"></a>
  22. <a class="bds_hi"></a>
  23. <a class="bds_thx"></a>
  24. <a class="bds_youdao"></a>
  25. <a class="bds_sqq"></a>
  26. <span class="bds_more"></span>
  27. <a class="shareCount"></a>
  28. </div>
  29. <script type="text/javascript" id="bdshare_js" data="type=tools&uid=746779" ></script>
  30. <script type="text/javascript" id="bdshell_js"></script>
  31. <script type="text/javascript">
  32. var bds_config={"snsKey":{'tsina':'2622423733','tqq':'801374458','t163':'SGly8AdEHUrJTs4z','tsohu':'aRln3Yp2CrjC8StD'}}
  33. <!--{if $threadattachmenturl != Null}-->
  34. var bds_config = {
  35.         'bdPic':'{echo implode('||',$threadattachmenturl)}'
  36. };
  37. <!--{/if}-->
  38. document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?CDNversion=" + Math.ceil(new Date()/3600000)
  39. </script></div>
  40. <!-- Baidu Button END -->
复制代码
这样可以结局代码分享后没有图片的问题,但新的2个问题出现了。

1、分享到百度时,如果帖子中存在多个图片,则会无法识别,仍然会提示只有一个图片且无法正常显示。
2、分享到百度时,如果帖子中没有图片而存在附件,则会把附件也识别为图片但无法显示。

求修复帖子中多个图片显示问题和误将附件识别为图片的问题。

全部评论 0

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部