1 頁 (共 1 頁)

[問題]安裝自動縮圖外掛出現亂碼

發表於 : 2007-11-05 22:24
Zeans
參考文章:
http://phpbb-tw.net/phpbb/viewtopic.php?p=205869#205869

問題連結:
http://www.freets.why3s.cc/phpBB2/viewtopic.php?t=1

將滑鼠移到圖片上會出現亂碼~
不管是把bbcode.tpl改成utf-8或是Big5語系都會出現問題

Big5語系:出現亂碼
utf-8語系:幾乎code都會失效以及出現
Parse error: syntax error, unexpected T_VARIABLE in /home/freetswh/public_html/phpBB2/includes/bbcode.php(61) : eval()'d code on line 2

http://www.freets.why3s.cc/phpBB2/templ ... bbcode.tpl
http://www.freets.why3s.cc/phpBB2/includes/bbcode.php

感謝大大幫忙

發表於 : 2007-11-05 23:41
SCR
請把你的 bbcode.tpl 給另存成 utf-8 格式的檔案.(因為我直接套用你的bbcode.tpl檔案,另存成utf-8格式後,是正常顯示"按左鍵於新視窗查看全圖, 滾輪縮放大小"的)

如果上解還是不行的話.試試下解吧.
開啟 includes/bbcode.php
尋找

代碼: 選擇全部

$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
底下增加

代碼: 選擇全部

$bbcode_tpl['img'] = str_replace('{IMG_ALT}', $lang['Img_alt'], $bbcode_tpl['img']);
開啟 風格/bbcode.tpl
尋找

代碼: 選擇全部

<!-- BEGIN img --><img src="{URL}" border="0" onload="if(this.width>screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;this.alt='按左鍵於新視窗查看全圖, 滾輪縮放大小';}" onmouseover="if(this.resized)&nbsp;&nbsp;this.style.cursor='hand';" onclick="if(this.resized) {window.open(this.src);}" onmousewheel="return imgzoom(this);" /><!-- END img -->
改成

代碼: 選擇全部

<!-- BEGIN img --><img src="{URL}" alt="{IMG_ALT}" border="0" onload="if(this.width>screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" onmouseover="if(this.resized)&nbsp;&nbsp;this.style.cursor='hand';" onclick="if(this.resized) {window.open(this.src);}" onmousewheel="return imgzoom(this);" /><!-- END img -->
開啟 語系/lang_main.php
尋找

代碼: 選擇全部

$lang['Code'] = '代碼'; // comes before bbcode code output.
底下增加

代碼: 選擇全部

$lang['Img_alt'] = '按左鍵於新視窗查看全圖, 滾輪縮放大小'; //縮圖註解.

發表於 : 2007-11-06 01:00
Zeans
上解仍是出現錯誤
但利用下解將問題解決了~!
謝謝大大

我看了一下資料語系是GBK
而language裡面是UTF-8
可能是這裡出問題了吧?