要安装全功能播放器的朋友点这里:
http://www.huasa.net/bbs/viewthread.php?tid=5435
Oytktk(靖飒)带 您 欣 赏 时 间
演示图片在二楼.
▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷
[发布编号]:靖字 第:0002
[插件名称]:Music Heartland(音乐厅)
[适用版本]:Discuz! 4.1.0
[插件作者]:Oytktk(靖飒)
[插件发布]:Powered by 上海华飒科技 © 2006
[发布日期]:2006-4-2
[插件用途]:
▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷▶▷
关于安装与使用的说明
一、需要修改的文件列表:
1、升级数据库.
2、templates\default\VIEWHTHREAD.HTM
3、templates\default\post_newthread.htm
4、templates\default\post_editpost.htm
5、include/newthread.inc.php
6、include/editpost.inc.php
7、templates\default\actions.lang.php
8、导入插件!
二、修改文件完毕并上传至您的服务器以后,您将需要在您的后台“更新缓存”方可使用!
后台升级数据库代码(SQL)升级安装的朋友往下看一步:
- ALTER TABLE `cdb_posts` ADD `mp3_url` VARCHAR( 255 ) NOT NULL ;
- ALTER TABLE `cdb_threads` ADD `mp3_thread` VARCHAR( 100 ) NOT NULL ;
- ALTER TABLE `cdb_threads` ADD `mp3_type` VARCHAR( 10 ) NOT NULL ;
复制代码
以能安装过的此插件的朋友只要升级下面的语句即可:
- ALTER TABLE `cdb_threads` ADD `mp3_thread` VARCHAR( 100 ) NOT NULL ;
复制代码
======================================================================
■ 1. 按结构上传所有文件;
■ 2. 以管理员身份进入后台,
■ 添加插件, 导入 *plug_weather.txt 并开启插件.
文件修改如下:
templates\default\VIEWHTHREAD.HTM
查找:
- <input type="text" name="subject" size="80" value="" tabindex="1"
复制代码
后面加
templates\default\post_newthread.htm
查找:
- <input type="text" name="subject" size="45" value="$subject" tabindex="3"
复制代码
后面加
查找:
上面加:
- $MY_MUSIC_FOR_D4_BY_OYTKTK_START
- <!--{if $readonly && !$poll}-->
- {template post_musical}
- <!--{/if}-->
- $MY_MUSIC_FOR_D4_BY_OYTKTK_END
复制代码
templates\default\post_editpost.htm
查找:
上面加
- $MY_MUSIC_FOR_D4_BY_OYTKTK_START
- <!--{if $readonly && !$polloptions}-->
- {template post_musicedit}
- <!--{/if}-->
- $MY_MUSIC_FOR_D4_BY_OYTKTK_END
复制代码
include/newthread.inc.php
查找:
下面加:
- //Music Heartland (音乐厅) By oytktk(靖飒)
- @require DISCUZ_ROOT.'./forumdata/cache/plugin_mymusic.php';
- $mucfg = $_DPLUGIN['mymusic']['vars'];
- $musicfid=$mucfg['musicfid'];
- foreach( explode(',', $musicfid) as $fids ){
- if ($fid == $fids) {$readonly = "readonly"; break;}
- }
- //Music Heartland (音乐厅) By oytktk(靖飒) end...
复制代码
查找:
- if($subject == '' || $message == '') {
复制代码
上面加:
- //Music Heartland (音乐厅) By oytktk(靖飒)
- if($readonly && ($mp3_name == '' || $mp3_artist == '') && !$upload && !$mp3_m_r) {
- showmessage("对不起, 您没有输入音乐必选参数!");
- }
- //Music Heartland (音乐厅) By oytktk(靖飒) end...
复制代码
查找:
- $subscribed = !empty($emailnotify) && $discuz_uid ? 1 : 0;
复制代码
下面加:
- //Music Heartland (音乐厅) By oytktk(靖飒)
- $mp3_thread = AddSlashes(strip_tags(trim($mp3_name)))."|".AddSlashes(strip_tags(trim($mp3_artist)));
- //Music Heartland (音乐厅) By oytktk(靖飒) end...
复制代码
查找:
后面加:
查找:
- '$displayorder', '$digest'
复制代码
后面加:
- , '$mp3_m_r', '$mp3_thread'
复制代码
查找:
- usesig, htmlon, bbcodeoff
复制代码
后面加:
查找:
- '$usesig', '$htmlon', '$bbcodeoff'
复制代码
后面加:
include/editpost.inc.php
查找:
下面加:
- //Music Heartland (音乐厅) By oytktk(靖飒)
- @require DISCUZ_ROOT.'./forumdata/cache/plugin_mymusic.php';
- $mucfg = $_DPLUGIN['mymusic']['vars'];
- $musicfid=$mucfg['musicfid'];
- foreach( explode(',', $musicfid) as $fids ){
- if ($fid == $fids) {$readonly = "readonly"; break;}
- }
- //Music Heartland (音乐厅) By oytktk(靖飒) end...
复制代码
查找:
- include template('post_editpost');
复制代码
上面加:
- //Music Heartland (音乐厅) By oytktk(靖飒)
- $mp3_i=0;
- foreach( explode('|', $thread['mp3_thread']) as $fids ){
- $mp3thread[$mp3_i] = $fids;
- $mp3_i++;
- }
- //Music Heartland (音乐厅) By oytktk(靖飒) end....
复制代码
查找:
- $db->query("UPDATE {$tablepre}threads SET iconid='$iconid'
复制代码
上面加:
- //Music Heartland (音乐厅) By oytktk(靖飒)
- $mp3_thread = AddSlashes(strip_tags(trim($mp3_name)))."|".AddSlashes(strip_tags(trim($mp3_artist)));
- //Music Heartland (音乐厅) By oytktk(靖飒) end...
复制代码
(注意)再在后面加:
- , mp3_type='$mp3_m_r', mp3_thread='$mp3_thread'
复制代码
查找:
- message='$message', usesig='$usesig'
复制代码
后面加:
templates\default\actions.lang.php
查找:
下面加:
修改文件部分已经完成.
到后台设置插件参数!
[ 本帖最后由 oytktk 于 2007-8-24 09:02 编辑 ] |