注意:里面的红色字
第一步:
打开你的admin/info/NewsAddPic.asp文件将里面的
<td><div align="center">图片地址</div></td>
<td colspan="3"><input name="PicPath" type="text" id="PicPath" style="width:65%" value="<%=Request("PicPath")%>" >
<input type="button" name="Submit4" value="选择图片" onClick="OpenWindowAndSetValue('../inc/SelectPic.asp?CurrPath=/<% = UpFiles %>',550,300,window,document.NewsForm.PicPath);"></td>
修改为:
<td>图片地址</td>
<td colspan="3"><input name="PicPath" type="text" id="PicPath" style="width:65%" value="<%=Request("PicPath")%>" >
<input type="button" name="PPPChoose" value="选择图片" onClick="OpenWindowAndSetValue('../inc/SelectPic.asp',550,290,window,document.NewsForm.PicPath);"></td>
第二步:
添加:(自己看位置哦,这里我就不说了,这个就是你要发布文字新闻还是图片新闻的选择条件了)
<td> 图片新闻
<input type="checkbox" name="PicNewsTF" value="1" <%If Request("PicNewsTF")="1" then Response.Write("checked") end if%> onClick="ChoosePicType();">
</td>
第三步:
如果是用缩略图的朋友将:
if Request.Form("PicPath")="" then
INewsAddObj("PicPath") = PicPath
else
INewsAddObj("PicPath")= Request.Form("PicPath")
end if
替换为:
if Request.Form("PicNewsTF")="1" and Request.Form("PicPath")="" then
INewsAddObj("PicPath") = PicPath
else
INewsAddObj("PicPath")= Request.Form("PicPath")
end if
如果用原版的请将:
if Request.Form("PicPath")="" then
Response.Write("<script>alert('请输入图片地址');</script>")
Response.End
end if
修改为:
if Request.Form("PicNewsTF")="1" and Request.Form("PicPath")="" then
Response.Write("<script>alert('请输入图片地址');</script>")
Response.End
end if
将
INewsAddObj("PicNewsTF") = 1
替换为:
if Request.Form("PicNewsTF") = "1" then
INewsAddObj("PicNewsTF") = "1"
else
INewsAddObj("PicNewsTF") = "0"
end if
好了,现在将你后台的发布文字新闻的连接改为这个文件就可以了,
还需要注意的是,就是修改文章里,根据这个进行适当的修改!OK~~~~~大家来试试吧!
那文章是文字还是图片啊
帮主,你看看这个是怎么回事?
[upload=jpg]UploadFile/2005-6/200562220381286984.jpg[/upload]