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

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
Zeans
星球公民
星球公民
文章: 36
註冊時間: 2006-04-08 12:07
來自: 紫願心夢       尋找: 海豚灣戀人       狀態: 當米蟲中@@

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

文章 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

感謝大大幫忙
●架設主機作業系統:windows xp sp2
●空間連結: http://hosting.why3s.com.tw/
●PHPBB3 連結網址:http://freets.why3s.cc/phpBB3/index.php
●上網方式:ADSL
●安裝的程式: php + MySql
●phpBB3 版本:phpBB 3.0.0
頭像
SCR
竹貓忠實會員
竹貓忠實會員
文章: 330
註冊時間: 2006-03-11 23:21
來自: 網路的小角落

文章 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'] = '按左鍵於新視窗查看全圖, 滾輪縮放大小'; //縮圖註解.
知難非行易,知易反行難~~
Zeans
星球公民
星球公民
文章: 36
註冊時間: 2006-04-08 12:07
來自: 紫願心夢       尋找: 海豚灣戀人       狀態: 當米蟲中@@

文章 Zeans »

上解仍是出現錯誤
但利用下解將問題解決了~!
謝謝大大

我看了一下資料語系是GBK
而language裡面是UTF-8
可能是這裡出問題了吧?
●架設主機作業系統:windows xp sp2
●空間連結: http://hosting.why3s.com.tw/
●PHPBB3 連結網址:http://freets.why3s.cc/phpBB3/index.php
●上網方式:ADSL
●安裝的程式: php + MySql
●phpBB3 版本:phpBB 3.0.0
主題已鎖定

回到「外掛問題討論」