想請問一下
自動縮圖外掛...
要如何才能調整縮圖大小阿
<script>
window.onload = resizeimg;
function resizeimg()
{
if (document.getElementsByTagName)
{
for (i=0; i<document.getElementsByTagName('img').length; i++)
{
im = document.getElementsByTagName('img');
if (im.width > 600)
{
im.style.width = '600px';
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>
程式碼如上...
我嘗試了改程式碼裡面的數字
以為就可以讓縮圖變大了
可是好像沒什麼用
感謝XD
●主機作業系統:Linux
●免費(或付費)空間連結: serverzoo.com
●您的 phpBB 版本:phpBB 3.0.6
●您的 domain (網域名稱) :mr-drunk.com
●您的 phpBB 連結網址: mr-drunk.com
自動縮圖外掛
版面規則
請注意!您的提問必須遵守發問格式,違者砍文。
請注意!您的提問必須遵守發問格式,違者砍文。
Re: 自動縮圖外掛
建議您補充說明:
1. 外掛連結。
2. 您更新的代碼為何?
1. 外掛連結。
2. 您更新的代碼為何?
-
yehrussell
- 竹貓忠實會員

- 文章: 551
- 註冊時間: 2006-01-03 07:48
Re: 自動縮圖外掛
建議大大,還是最好更新到最新版-->phpBB 3.0.8您的 phpBB 版本:phpBB 3.0.6
比較安全喔
##### 以下為 '基本的發問格式' #####
●主機作業系統:租用主機
●快速架站程式: (請務必註明版本,如果安裝在自己電腦上才填寫)
●您的上網方式:
●您安裝的程式:Apache + php + MySql 或其他
PHP 版本: 8.1.24 + MySQL(i) 5.7.44
●您的 phpBB 版本: phpBB 3.3.15
●您的 domain (網域名稱) :herb-tw.com
●您的 phpBB 連結網址: https://herb-tw.com/phpBB/
●主機作業系統:租用主機
●快速架站程式: (請務必註明版本,如果安裝在自己電腦上才填寫)
●您的上網方式:
●您安裝的程式:Apache + php + MySql 或其他
PHP 版本: 8.1.24 + MySQL(i) 5.7.44
●您的 phpBB 版本: phpBB 3.3.15
●您的 domain (網域名稱) :herb-tw.com
●您的 phpBB 連結網址: https://herb-tw.com/phpBB/
Re: 自動縮圖外掛
外掛連結:viewtopic.php?f=134&t=50324
我想把縮圖改大一點於是我把
<script>
window.onload = resizeimg;
function resizeimg()
{
if (document.getElementsByTagName)
{
for (i=0; i<document.getElementsByTagName('img').length; i++)
{
im = document.getElementsByTagName('img');
if (im.width > 600) <------------------改成800
{
im.style.width = '600px'; <------------------改成800
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>
我想把縮圖改大一點於是我把
<script>
window.onload = resizeimg;
function resizeimg()
{
if (document.getElementsByTagName)
{
for (i=0; i<document.getElementsByTagName('img').length; i++)
{
im = document.getElementsByTagName('img');
if (im.width > 600) <------------------改成800
{
im.style.width = '600px'; <------------------改成800
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>
Re: 自動縮圖外掛
momm 寫:外掛連結:viewtopic.php?f=134&t=50324
我想把縮圖改大一點於是我把
<script>
window.onload = resizeimg;
function resizeimg()
{
if (document.getElementsByTagName)
{
for (i=0; i<document.getElementsByTagName('img').length; i++)
{
im = document.getElementsByTagName('img');
if (im.width > 600) <------------------改成800
{
im.style.width = '600px'; <------------------改成800
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>
隱約知道您的改法,只是不清楚您究竟儲存後的檔案內容。
建議您:
1.確認:是否在修改、存檔後,有清除論壇快取?
2.將您已經修改完的檔案,壓縮後,上傳到這裡。

