1、打开/dede/templets/sys_info.htm,找到
<script language="javascript" src="../include/js/jquery/jquery.js"></script>在下方添加:
<script language="javascript" src="js/main.js"></script>2、找到
<input type="radio" name="vartype" value="bstring" class='np' />多行文本</td>改成:
<input type="radio" name="vartype" value="bstring" class='np' />多行文本 <input type="radio" name="vartype" value="pic" class='np' />图片 </td>3、找到
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' style='width:30%'>";在它后面,else前再加一层判断:
}else if($row['type']=='pic') { echo "<table><tbody><tr><td><input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' style='width:250px;'></td> <td><input type='button' name='set9' value='浏览... 'class='coolbg np' style='width:60px' onClick="."SelectImageN('form1.edit___{$row['varname']}','','idd_{$row['varname']}');"." /></td>"; if($row['value']){ echo "<td><img src=".$row['value']." style='max-width:150px;max-height: 100px;' id='idd_{$row['varname']}' ></td></tr></tbody></table>"; }else{ echo "<td><img src='images/pview.gif' style='max-width:150px;max-height: 100px;' id='idd_{$row['varname']}'></td></tr></tbody></table>"; } }最终添加新变量多了个图片类型:
最终添加的图片类型的banner效果:
调用方法:
{dede:global.indexbannerthree/}