获取百度分享按钮PhpWind插件
更新日期:2011.09.21
1、从百度分享官方网站下载百度分享插件的PhpWind版本即bdshare_phpwind.zip文件。
2、到PhpWind后台的插件中心安装"百度分享按钮"。
3、安装完成后,您需要首先对百度分享工具进行设置,复制您自己的百度分享代码,并选择按钮位置。
一、修改帖子查看页面
修改根目录下的read.php,加入下面的一行代码,位置如下:<?php
define('SCR','read');
require_once('global.php');
L::loadClass('forum', 'forum', false);
require_once(R_P.'require/bbscode.php');
//* include_once pwCache::getPath(D_P.'data/bbscache/cache_read.php',true);
pwCache::getData(D_P.'data/bbscache/cache_read.php');
pwCache::getData(D_P.'data/bbscache/bdshare_config.php');
S::gp(array('fpage','toread'), 'GP', 2);
S::gp(array('uid','displayMode'));
修改根目录下template/win/read.htm,在$read[content]标签的上面和下面分别加入下面的代码,之后更改设置后无需修改此代码。(加在$read[content]的上面)
{$bdshare_code_tieTop}
(加在$read[content]的下面)
{$bdshare_code_tieBottom}
{$bdshare_code_diaryTop}
====加在 {$diary[content]} 的下面====
{$bdshare_code_diaryBottom}