[問題]兩種自動縮圖的方法?
發表於 : 2003-06-16 11:55
外掛問題 Attachment Mod2.3.7
使用版本 phpbb 2.0.4
網站位置:還沒搞定
我試了兩種方法,都是在竹貓的文章找的,只有第一種有效,第二種卻無效,不知問題出在哪?請問兩者的差別在哪?
第一種自動縮圖
代碼:
----------開啟----------
\templates\subSilver\viewtopic_attach_body.tpl
----------尋找----------
<img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" />
----------取代----------
<a href="{postrow.attach.cat_images.IMG_SRC}" target="_blank" title="開新視窗賞圖"><img src="{postrow.attach.cat_images.IMG_SRC}" border="0" onload="javascript:if(this.width>screen.width-400) this.width=screen.width-400" /></a>
第二種自動縮圖
#-----[ Open ]------------------------------------------
#
templates/your template/bbcode.tpl
#
#-----[ Find ]------------------------------------------
#
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
#
#-----[ Replace ]------------------------------------------
#
<!-- BEGIN img --><a href="{URL}" target="_blank" title="開新視窗賞圖"><img src="{URL}" border="0" onload="javascript:if(this.width>screen.width-333) this.width=screen.width-333" /></a><!-- END img -->
#
#----completed-----
使用版本 phpbb 2.0.4
網站位置:還沒搞定
我試了兩種方法,都是在竹貓的文章找的,只有第一種有效,第二種卻無效,不知問題出在哪?請問兩者的差別在哪?
第一種自動縮圖
代碼:
----------開啟----------
\templates\subSilver\viewtopic_attach_body.tpl
----------尋找----------
<img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" />
----------取代----------
<a href="{postrow.attach.cat_images.IMG_SRC}" target="_blank" title="開新視窗賞圖"><img src="{postrow.attach.cat_images.IMG_SRC}" border="0" onload="javascript:if(this.width>screen.width-400) this.width=screen.width-400" /></a>
第二種自動縮圖
#-----[ Open ]------------------------------------------
#
templates/your template/bbcode.tpl
#
#-----[ Find ]------------------------------------------
#
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
#
#-----[ Replace ]------------------------------------------
#
<!-- BEGIN img --><a href="{URL}" target="_blank" title="開新視窗賞圖"><img src="{URL}" border="0" onload="javascript:if(this.width>screen.width-333) this.width=screen.width-333" /></a><!-- END img -->
#
#----completed-----