PhpWind安装分享插件

2018-02-26 15:56 更新

PhpWind安装分享插件

获取百度分享按钮PhpWind插件

点击下载:PhpWind 插件

更新日期:2011.09.21

1、从百度分享官方网站下载百度分享插件的PhpWind版本即bdshare_phpwind.zip文件。

2、到PhpWind后台的插件中心安装"百度分享按钮"。

 image5.jpg 

3、安装完成后,您需要首先对百度分享工具进行设置,复制您自己的百度分享代码,并选择按钮位置。

 image6.jpg 

一、修改帖子查看页面

修改根目录下的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
-->
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号