在添加自定义标签的时候,添加自定义多图字段类型的时候

如果创建第三个会出现报错的现象



无法再创建多个相同类型的自定义标签,那么这个时候,该怎么办? 小秋简单修改下程序文件,可以临时解决这个方法。后续官方看的下用哪种方法比较稳妥,当然小秋也测试过了 没有什么问题!希望能给大家帮助!
效果图:


以下是修改方法,涉及修改的文件为:
\application\admin\logic\FieldLogic.php大约113行,找到:
1 2 3 4 5 6 7 8 9 | else if ( "imgs" == $dtype ) {
if ( empty ( $dfvalue )) {
$dfvalue = '' ;
}
$maxlen = 10001;
$fields [0] = " `$fieldname` varchar($maxlen) NOT NULL DEFAULT '$dfvalue' COMMENT '$fieldtitle';" ;
$fields [1] = "varchar($maxlen)" ;
$fields [2] = $maxlen ;
}
|
改为:
1 2 3 4 5 6 7 8 9 | else if ( "imgs" == $dtype ) {
if ( empty ( $dfvalue )) {
$dfvalue = '' ;
}
$maxlen = 10001;
$fields [0] = " `$fieldname` text COMMENT '$fieldtitle';" ;
$fields [1] = "test" ;
$fields [2] = $maxlen ;
}
|