欢迎来到天天文库
浏览记录
ID:26710960
大小:566.00 KB
页数:61页
时间:2018-11-28
《phpcms v9会员注册与二次开发》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、--[PHPCMSV9二次开发]自定义字段模型-文本组·浏览:365·更新:2012-03-0811:44举报作者声明:本篇经验系本人依照真实经历原创,未经许可,谢绝转载。PHPCMSV9,我们在做作者声明:本篇经验系本人依照真实经历原创,未经许可,谢绝转载。PHPCMSV9,我们在做类似于酒店房型等类型的时候,需要用到文本组字段模型,但PHPCMS并未提供该模型。如下图所示效果:展示效果如下:----步骤/方法1.打开phpcmsmodulescontentfields目录,复制文件夹downfiles,并改名为textgroups。2.打开phpcmsmodulesc
2、ontentfieldsfields.inc.php文件,增加字段类型:'textgroups'=>'多文件上传',3.打开phpcmsmodulescontentfieldstextgroups目录(第一步复制的文件夹),修改以下文件:4.form.inc.phpfunctiontextgroups($field,$value,$fieldinfo){extract(string2array($fieldinfo['setting']));$list_str='';if($value){$value=string2array(html_entity_decode($v
3、alue,ENT_QUOTES));if(is_array($value)){foreach($valueas$_k=>$_v){$list_str.="4、ttype='text'name='{$field}_cx[]'value='{$_v[cx]}'style='width:100px;'class='input-text'>5、t:remove_div('textsgroups{$_k}')">".L('remove_out')."
4、ttype='text'name='{$field}_cx[]'value='{$_v[cx]}'style='width:100px;'class='input-text'>5、t:remove_div('textsgroups{$_k}')">".L('remove_out')."
5、t:remove_div('textsgroups{$_k}')">".L('remove_out')."
6、='input-text'>7、lass='input-text'>Remove";$('#'+returnid).append(str);}';$
7、lass='input-text'>Remove";$('#'+returnid).append(str);}';$
此文档下载收益归作者所有