|
找到文件/template/当前模板/touch/forum/post.htm
1、Discuz手机端多图选择功能代码discuz默认文件是85行左右,友久网的免费手机模板是255行
找到代码:
- <input type="file" name="Filedata" id="filedata"
复制代码 修改为:
- <input type="file" name="Filedata" multiple="multiple" id="filedata"
复制代码 2、Discuz手机端多图上传功能代码
找到代码:
- $.buildfileupload({
- uploadurl:'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2',
- files:this.files,
- uploadformdata:{uid:"$_G[uid]", hash:"<!--{eval echo md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}-->"},
- uploadinputname:'Filedata',
- maxfilesize:"$swfconfig[max]",
- success:uploadsuccess,
- error:function() {
- popup.open('{lang uploadpicfailed}', 'alert');
- }
- });
复制代码 修改为:
- for (var i=0;i<this.files.length;i++ ) {
- var file_data = [];
- file_data.push(this.files[i]);
- $.buildfileupload({
- uploadurl:'misc.php?mod=swfupload&operation=upload&type=image&inajax=yes&infloat=yes&simple=2',
- files:file_data,
- uploadformdata:{uid:"$_G[uid]", hash:"<!--{eval echo md5(substr(md5($_G[config][security][authkey]), 8).$_G[uid])}-->"},
- uploadinputname:'Filedata',
- maxfilesize:"2000",
- success:uploadsuccess,
- error:function() {
- popup.open('上传失败,请稍后再试', 'alert');
- }
- });
- }
复制代码 至此,Discuz手机端多图上传功能完成
|
|