Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[发布] 论坛点歌台 For DZ 5.0.0 RC1【可以给所有人点歌】

[复制链接]
飘云! 发表于 2006-8-1 15:49:32 | 显示全部楼层 |阅读模式
说明:
雪舞倾情 兄弟已经在此发布了一个插件:https://discuz.dismall.com/viewth ... p;extra=&page=1

我试用了一下,发现:
1.不能编辑歌曲(“未定义操作,请返回”);
2.首页排列不整齐;

故对其进行了修改,希望大家喜欢~~

*****************************************************************
*---------------------------------------------------------------
*    点歌台 V1.0.0 for discuz! 5.0.0 RC1                        
*---------------------------------------------------------------
*    演示网站: http://piaoyun.miyahost.com/bbs/song.php          
*---------------------------------------------------------------
*    原版作者: 雪狼 (伊乐园中文论坛)                                       
*---------------------------------------------------------------
*    最终修改: 飘云[飘云阁初学者破解组织]WwW.ChiNaPYG.CoM                               
*---------------------------------------------------------------
*    修改日期: 2006.8.1                        
*---------------------------------------------------------------                                       
*****************************************************************


特别感谢原插件作者的劳动!!


下面是全新安装说明。

        安装说明:

        1。打开 songconfig.php 文件,按照自己喜欢设定:

        $index_width="98%"; //表格宽度
        $trans_unit="credits"; // 此处请勿修改
        $unit_name="飘云币"; // 货币名称
        $usecredit=5; //点歌需要积分
        $fee=5; //点歌需要现金
        $day=10; //歌曲保留时间,单位为天,默认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。建立数据库表格

        以管理员身份登陆,进入后台管理。选择"数据管理"--"数据库升级",将下面的文字粘贴进去:

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" 文件

*********************************************************************************
论坛主页显示点歌台信息
*********************************************************************************

打开discuz.php
找到,

        if(empty($gid))


如果您安装的是独立的点歌台

在前面添加,

//点歌插件 v1.0.0 For DZ5.0.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 DZ5.0.0 RC1***End*********


打开discuz.htm
找到,


<!--{if !empty($newpmexists)}-->
        {template pmprompt}
<!--{/if}-->

在前面添加


<br>
{template index_songs}

打开 actions.lang.php 语言包


添加:

        241 => '浏览点歌台',
             242 => '正在点歌',
             243 => '正在听歌',
             244 => '正在编辑点歌',
             245 => '正在删除点歌',


这样就可以了!
反安装代码

DROP TABLE cdb_xn_song;

[ 本帖最后由 飘云! 于 2006-8-1 15:52 编辑 ]
xinruby02 发表于 2006-8-1 16:34:42 | 显示全部楼层
升级错误,MySQL 提示: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=gbk' at line 1

--------------------------
数据库升级出错?
怎么办呀?
回复

使用道具 举报

 楼主| 飘云! 发表于 2006-8-1 16:57:04 | 显示全部楼层
原帖由 xinruby02 于 2006-8-1 16:34 发表
升级错误,MySQL 提示: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=gbk' at line 1

------ ...


把这句去掉:DEFAULT CHARSET=gbk
回复

使用道具 举报

泡海椒 发表于 2006-8-1 17:26:11 | 显示全部楼层
▄︻┻═┳ ︻┳═一 ▄︻┳一· ▄︻┳═一 ︻┳═一oO ︻︼─一 ▄︻┻┳═一 ▄︻┳一 ▄︻┻═┳一 ▄︻┳-一
回复

使用道具 举报

dujunjie 发表于 2006-8-1 17:36:46 | 显示全部楼层
哦  支持起  一会做一个
回复

使用道具 举报

tianye1990 发表于 2006-8-1 17:39:51 | 显示全部楼层
广告位
回复

使用道具 举报

mufeng1981 发表于 2006-8-7 13:33:33 | 显示全部楼层
顶.....
回复

使用道具 举报

hanxingo 发表于 2006-8-7 13:38:26 | 显示全部楼层
0000000000
回复

使用道具 举报

pandyer 发表于 2006-8-7 16:19:31 | 显示全部楼层
"插件数据文件已损坏,无法导入,请返回。"
怎么会使啊?
回复

使用道具 举报

vision888 发表于 2006-8-17 09:33:58 | 显示全部楼层
装了后怎么出现2个图中的框
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-10-2 02:38 , Processed in 0.232041 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表