*****************************************************************
*---------------------------------------------------------------
* 点歌台 V1.0.0 for discuz! 6.0.0 RC1
*---------------------------------------------------------------
* 演示网站: http://ylstu.cn/
*---------------------------------------------------------------
* 原版作者: 雪狼 (伊乐园中文论坛)
*---------------------------------------------------------------
* 最终修改:小气鬼[玉林学生社区]www.ylstu.cn
*---------------------------------------------------------------
* 修改日期: 2007.8.16
*---------------------------------------------------------------
*****************************************************************
特别感谢原插件作者以及5.50的修改者的劳动!!
下面是全新安装说明。
安装说明:
1。打开 songconfig.php 文件,按照自己喜欢设定:
$index_width="98%"; //表格宽度
$trans_unit="credits"; // 此处请勿修改
$unit_name="精灵币"; // 货币名称
$usecredit=5; //点歌需要积分
$fee=5; //点歌需要现金
$day=21; //歌曲保留时间,单位为天,默认0为永久保存
2。上传文件
将压缩包中的所有内容按结构上传到你的论坛安装目录。
如果您以前安装过点歌台,则只须按结构直接将文件覆盖
主程式:
将 song.php, addsong.php, deletesong.php, editsong.php, hearsong.php, songconfig.php 上传到论坛根目录
模板:
club_addsong.htm, club_song.htm, club_editsong.htm, club_hearsong.htm, club_submitsong.htm,
song_submit.htm, index_songs.htm 上传到风格模版目录 默认为:./templates/default/
图和音乐档:
delete.gif, edit.gif, song.gif,music_pyg.gif, diange2.jpg, xys.mid 上传到 ./images/song/
资料文件档:
将 /song/song.dat 上传到 ./song/song.dat
3。建立数据库表格
以管理员身份登陆,进入后台管理。选择"数据管理"--"数据库升级",将下面的文字粘贴进去:
QUOTE:
DROP TABLE IF EXISTS cdb_xn_song;
CREATE TABLE cdb_xn_song (
sgid int(12) NOT NULL auto_increment,
username varchar(50) NOT NULL,
touser varchar(50) NOT NULL,
songname varchar(50) NOT NULL,
songurl varchar(80) NOT NULL,
songtype varchar(10) NOT NULL,
content varchar(200) NOT NULL,
stime int(11) DEFAULT '0' NOT NULL,
particular int(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (sgid),
UNIQUE sid (sgid),
KEY sid_2 (sgid)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
4。对songconfig.php内的各参数进行设置
在song.dat文件内添加内置歌曲(按song.dat文件内提示)
5。与论坛结合
后台导入
"discuz_plugin_PYG_song.txt" 文件
*********************************************************************************
论坛主页显示点歌台信息
*********************************************************************************
打开index.php
找到,
if(empty($gid))
如果您安装的是独立的点歌台
在前面添加,
//点歌插件 v1.0.0 For DZ6.0 RC1 小气鬼最终修正版
if (empty($action))
{
$time_limit = time()-3600*24*7;
$query=$db->query("SELECT * FROM cdb_xn_song WHERE stime>='$time_limit' ORDER BY stime DESC");
$num=0;
while($result = $db->fetch_array($query)) {
$touser=$result['touser'];
$username=$result['username'];
$songurl=$result['songurl'];
$content=$result['content'];
$sgid=$result['sgid'];
$songname=$result['songname'];
$stime = date('Y年m月d日',$result['stime']);
$particular=$result['particular'];
$num++;
// $temp1.="<center><a href=\"club_song.php?fs=st&sgid=$sgid\" onclick=\"javascript:window.open('club_hearsong.php?songid=$sgid','','width=450,height=500,scrollbars=yes')\"><font color=blue>$username</font> 点了一首 <u><font color=green>$songname</font></u> 送给 <font color=RED>$touser</font> 听,并想对".$touser."说: <font color=RED>$content</font></a> ($stime)";
if ($particular == 0) {
$temp1.="<left><a href=\"hearsong.php?songid=$sgid\"><font color=blue>$username</font> 点了一首 <u><font color=green>$songname</font></u> 送给 <font color=RED>$touser</font> 听,并想对".$touser."说: <font color=RED>$content</font></a> ($stime)<br>";
} else {
$temp1.="<left><a href=\"hearsong.php?songid=$sgid\"><font color=blue>$username</font> 点了一首 <u><font color=green>$songname</font></u> 送给 <font color=RED>$touser</font> 听。<font color=#F5AE04><b>**** 内容保密 ****</b></font></a> ($stime)<br>";
}
}
}
if($num==0) {
$temp1.='<center> 目前暂时没有点歌信息!';
}
//点歌插件 v1.0.0 For DZ6.0 RC1***End*********
打开discuz.htm
找到,
<!--{if !empty($newpmexists) || $announcepm}-->
<div style="clear: both; margin-top: 5px" id="pmprompt">
{template pmprompt}
</div>
<!--{/if}-->
在前面添加
<br>
{template index_songs}
这样就可以了!
反安装代码
DROP TABLE cdb_xn_song;
玉林学生社区,创建和谐校园社区!