cokelight 寫:對不起…我想我弄錯了外掛的名字
應該是 Resize Posted Images for phpbb3
如果因為 Resize Posted Images for phpbb3 而影響了 banner 的大小
有可以修改的方法嗎?
我可以從你的 viewtopic_body.html 裡面直接看出你同時安裝了這兩個外掛.而且也可以直接判斷是因為 "
Easy Resize Posted Images" 這個外掛所影響(因為在其他的頁面都不會影響你的 banner 的尺寸,只在 viewtopic 頁面時, banner 圖片才會縮小.且尺寸大小剛好是你從 "Easy Resize Posted Images" 這個外掛裡面所更改的
640px , so ...... )
以下這個為我的個人分析..
Resize Posted Images for phpbb3 外掛,只會在 viewtopic 頁面裡的文章內容,針對 "附加檔案"的圖片,或使用
[img] 的 bbcode 標籤所貼的圖片(假如有另作
[img] bbcode 修改的話)來做縮圖作用,並不會影響文章內容以外的圖片尺寸.
而 "
Easy Resize Posted Images" 這個外掛,卻會在 viewtopic 頁面時,把頁首 overall_header.html ,以及頁底 overall_footer.html 和其他相關聯的頁面裡所有使用
<img src="****"> html 標籤的圖片(因為 viewtopic_body.html 有連結到這兩個檔案),只要超過你所設定的尺寸,都會被縮小.(畢竟不管是使用 bbcode 標籤,或 html 標籤,頁面轉出來所呈現的都還是 html 原始碼.)
所以,我才會叫你把 "Easy Resize Posted Imags" 給拆掉,
開啟 viewtopic_body.html
尋找
代碼: 選擇全部
<script>
window.onload = resizeimg;
function resizeimg()
{
if (document.getElementsByTagName)
{
for (i=0; i<document.getElementsByTagName('img').length; i++)
{
im = document.getElementsByTagName('img')[i];
if (im.width > 640)
{
im.style.width = '640px';
eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
eval("im.onclick = pop" + String(i) + ";");
if (document.all) im.style.cursor = 'hand';
if (!document.all) im.style.cursor = 'pointer';
im.title = '按此, 觀看完整大小的圖片';
}
}
}
}
</script>
刪除
如果你要把 viewtopic_body 頁面裡面的文章內容所附加的檔案圖片給縮小到 640px 的話.
開啟 overall_header.html
尋找
代碼: 選擇全部
var rmw_max_width = 500; // you can change this number, this is the max width in pixels for posted images
更改為
代碼: 選擇全部
var rmw_max_width = 640; // you can change this number, this is the max width in pixels for posted images
針對使用 [img] 標籤的圖片縮小方法
開啟 styles/風格/template/bbcode.html
尋找
代碼: 選擇全部
<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" /><!-- END img -->
更改為
代碼: 選擇全部
<!-- BEGIN img --><img resizemod="on" onload="rmw_img_loaded(this)" src="{URL}" alt="{L_IMAGE}" /><!-- END img -->
之後進入 ACP 管理員控制台,清除快取.