1 我使用分享工具为 http://www.jiathis.com/
2 选配好分享工具的风格,复制html代码。我选择的代码为:
View Code
<!-- JiaThis Button BEGIN lipu add 2012-7-23 start --> <div id="jiathis_style_32x32"> <a class="jiathis_button_qzone"></a> <a class="jiathis_button_tsina"></a> <a class="jiathis_button_tqq"></a> <a class="jiathis_button_renren"></a> <a class="jiathis_button_kaixin001"></a> <a class="jiathis_button_feixin"></a> <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a> <a class="jiathis_counter_style"></a> </div> <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1343019667486321" charset="utf-8"></script> <!-- JiaThis Button END lipu add 2012-7-23 end-->
3 打开对应风格的portal文件夹下的view.htm ,这个模版为默认的文章详情页面模版。我在文章最下面部分添加分享菜单,如图:
(1)确定位置:
找到代码:
<script type="text/javascript" src="{$_G[setting][jspath]}home.js?{VERHASH}"></script>
<div id="click_div">
在这段代码上面添加分享按钮的代码:
随便在外面套个table,好处是不影响别的样式,且好控制位置,代码如下:
View Code
<!-- JiaThis Button BEGIN lipu add 2012-7-23 start --> <table style=" margin:0 auto; padding-top:10px;"> <tr> <td> <div id="jiathis_style_32x32"> <a class="jiathis_button_qzone"></a> <a class="jiathis_button_tsina"></a> <a class="jiathis_button_tqq"></a> <a class="jiathis_button_renren"></a> <a class="jiathis_button_kaixin001"></a> <a class="jiathis_button_feixin"></a> <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a> <a class="jiathis_counter_style"></a> </div> <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1343019667486321" charset="utf-8"></script> </td> </tr> </table> <!-- JiaThis Button END lipu add 2012-7-23 end--> <br/>
(2)代码截图: