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


實(shí)現(xiàn)方法,打開/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)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!