用過(guò)dedecms的朋友都知道,織夢(mèng)cms后臺(tái)系統(tǒng)基本參數(shù)里是無(wú)法直接上傳圖片的,我們更換logo圖只能到ftp里替換,非常的不方便,我們?nèi)绻胫苯釉谙到y(tǒng)基本參數(shù)里上傳,要怎么處理呢?在這里需要對(duì)代碼進(jìn)行修改,具體流程如下:


實(shí)現(xiàn)方法,打開(kāi)/dede/templets/sys_info.htm
找到:
<script language="javascript" src="../include/js/dedeajax2.js"></script>
<script language="javascript" src="../include/js/jquery/jquery.js"></script>
在下方添加:
<script language="javascript" src="js/main.js"></script>
繼續(xù)找:
<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>
找到:
echo "<input type='text' name='edit___{$row['varname']}' id='edit___{$row['varname']}' value='{$row['value']}' style='width:30%'>";
在下方添加:
}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>";
}
到此完成。最終效果如下:
【網(wǎng)站聲明】本站除付費(fèi)源碼經(jīng)過(guò)測(cè)試外,其他素材未做測(cè)試,不保證完整性,網(wǎng)站上部分源碼僅限學(xué)習(xí)交流,請(qǐng)勿用于商業(yè)用途。如損害你的權(quán)益請(qǐng)聯(lián)系客服QQ:2655101040 給予處理,謝謝支持。