图片的自动缩小修改方法 for bbsxp 7
By admin
at 2007-07-16
0人收藏 • 1205人看过
1、用记事本打开setup.asp,把到如下代码:
str=ReplaceText(str,"\[IMG\]([^"&CHR(34)&"[]*)(\[\/IMG\])","<img border=0 src=$1 >")
替换为:
'####### 图片自动缩小 v1.1 代码改进:IPSC #########
str=ReplaceText(str,"\[IMG\]([^"&CHR(34)&"[]*)(\[\/IMG\])","<a href=$1 target=_blank title=说明:图片如缩小看不清,点图片可在新窗口浏览!><img border=0 src=$1 onload="&CHR(34)&"javascript:if(this.width>540)this.width=540"&CHR(34)&" onmouseover="&CHR(34)&"javascript:if(this.width>540)this.width=540"&CHR(34)&"></a>")
str=ReplaceText(str,"<IMG([^src=]*)(src=)","<img $1 onload="&CHR(34)&"javascript:if(this.width>540)this.width=540"&CHR(34)&" onmouseover="&CHR(34)&"javascript:if(this.width>540)this.width=540"&CHR(34)&" src=")
'##################################################
2、这步可以不改,但建议改,用记事本打开ShowPost.asp,找到以下代码:
<%content=UBBCode(Rs("content"))%>
<div style="OVERFLOW:auto;WIDTH:100%;"><br><%=mtface(qzwawa(content))%></div>
替换成:
<%content=UBBCode(ybbencode(Rs("content")))%>
<div style="OVERFLOW:auto;WIDTH:100%;"><br><%=mtface(qzwawa(content))%></div>
- 登录后方可回帖