获取百度分享按钮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]的上面)
<!--
EOT;
if ($db_sharesite == 1 && $read[pid] == 'tpc'){
if(isset($db_hackdb['bdshare'])){
print <<<EOT
-->
{$bdshare_code_tieTop}
<!--
EOT;
}
}
print <<<EOT
-->
(加在$read[content]的下面)
<!--
EOT;
if ($db_sharesite == 1 && $read[pid] == 'tpc'){
if(isset($db_hackdb['bdshare'])){
print <<<EOT
-->
{$bdshare_code_tieBottom}
<!--
EOT;
}
}
print <<<EOT
找到根目录下apps/diary/index.php加入下面的一行代码,位置如下所示:
<?php
!defined('A_P') && exit('Forbidden');
!$db_dopen && Showmsg('dairy_close');
$USCR = 'user_diary';
//* include pwCache::getPath(R_P. 'data/bbscache/o_config.php');
pwCache::getData(R_P. 'data/bbscache/o_config.php');
//* require_once pwCache::getPath(D_P."data/bbscache/forum_cache.php");
pwCache::getData(D_P."data/bbscache/forum_cache.php");
pwCache::getData(D_P.'data/bbscache/bdshare_config.php');
require_once(R_P.'require/showimg.php');
在如下模板文件:
apps/diary/templates/m_diary.htm
apps/diary/templates/m_space_diary.htm
中找到: {$diary[content]},在这个标签的上面和下面分享加上如下代码,同样修改设置后无需更改代码(加在 {$diary[content]} 的上面)
<!--
EOT;
if(isset($db_hackdb['bdshare'])){
print <<<EOT
-->
{$bdshare_code_diaryTop}
<!--
EOT;
}
print <<<EOT
-->
====加在 {$diary[content]} 的下面====
<!--
EOT;
if(isset($db_hackdb['bdshare'])){
print <<<EOT
-->
{$bdshare_code_diaryBottom}
<!--
EOT;
}
print <<<EOT
-->
免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系QQ:712375056。
Copyright © 2009-2022 56dr.com. All Rights Reserved. 特网科技 特网云 版权所有 特网科技 粤ICP备16109289号
域名注册服务机构:阿里云计算有限公司(万网) 域名服务机构:烟台帝思普网络科技有限公司(DNSPod) CDN服务:阿里云计算有限公司 百度云 中国互联网举报中心 增值电信业务经营许可证B2
建议您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流浏览器浏览本网站