PHPCMS安裝分享按鈕

2018-02-26 15:16 更新

PHPCMS安裝分享按鈕

如果您選擇使用側(cè)邊欄式分享插件,我們建議您將插件代碼嵌入頁(yè)尾,加快頁(yè)面主體的載入速度,步驟如下:

1、打開(kāi)您的站點(diǎn)上位于該位置的模版文件:phpcms/templates/default/content/footer.html,用于修改。

2、復(fù)制您獲得的分享按鈕代碼。

3、將您獲得的百度分享代碼復(fù)制到</body>標(biāo)簽之前,即可完成代碼嵌入。

官方默認(rèn)模版示例:

{if $allow_visitor==1}
{$content}
<!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
        <span class="bds_more">分享到:</span>
        <a class="bds_qzone"></a>
        <a class="bds_tsina"></a>
        <a class="bds_tqq"></a>
        <a class="bds_renren"></a>
    </div>
    <script type="text/javascript" id="bdshare_js" data="type=tools&uid=0" ></script>
    <script type="text/javascript" id="bdshell_js"></script>
    <script type="text/javascript">
        document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);
    </script>
<!-- Baidu Button END -->
<!--內(nèi)容關(guān)聯(lián)投票-->

 

如果您選擇使圖標(biāo)、文字或按鈕樣式的按鈕,您可以自由地將按鈕代碼嵌入到您網(wǎng)站的各個(gè)位置。下面以文章內(nèi)容頁(yè)面為例進(jìn)行說(shuō)明文章內(nèi)容頁(yè)面:

1、打開(kāi)您的站點(diǎn)上位于該位置的模版文件:phpcms/templates/default/content/show.html,用于修改。

2、復(fù)制您獲得的分享按鈕代碼。

3、將您獲得的百度分享代碼復(fù)制到"{$content}"標(biāo)簽之前或之后,即可完成代碼嵌入。

官方默認(rèn)模版示例:

<a href="{APP_PATH}index.php?m=link" target="_blank">友情鏈接</a>
<br />
Powered by <strong><a href="http://www.phpcms.cn" target="_blank">PHPCMS</a></strong> <em>{get_pc_version(1)}</em> &copy; 2011 <img src="{IMG_PATH}copyright.gif"/>{tjcode()}{php echo runhook('glogal_footer')}
</p>
</div>
<script type="text/javascript">
$(function(){
	$(".picbig").each(function(i){
		var cur = $(this).find('.img-wrap').eq(0);
		var w = cur.width();
		var h = cur.height();
	   $(this).find('.img-wrap img').LoadImage(true, w, h,'{IMG_PATH}s_nopic.gif');
	});
})
</script>
<!-- Baidu Button BEGIN -->
    <script type="text/javascript" id="bdshare_js" data="type=slide&img=0&uid=0" ></script>
    <script type="text/javascript" id="bdshell_js"></script>
    <script type="text/javascript">
        document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);
    </script>
<!-- Baidu Button END -->
</body>
</html>
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)