1 頁 (共 1 頁)

[問題]商店街shop問題(已解決)

發表於 : 2003-06-10 12:14
Pooh2003
問題外掛:商店街
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=16651
使用版本:phpBB 2.0.4
網站位置:http://toangel.52-u.com/
mod寫:
------[FIND]------
//
// Note! The order used for parsing the message _is_ important, moving things around could break any
// output
//


------[ADD, BEFORE]------
//start of display-items
$gsql = "select * from " . CONFIG_TABLE . " where config_name='viewtopic'";
if ( !($gresult = $db->sql_query($gsql)) )
{
message_die(CRITICAL_ERROR, 'ERROR: Getting Global Variables!');
}
$grow = mysql_fetch_array($gresult);
if ($grow['config_value'] == images)
{
$itempurge = str_replace("?, "", $postrow[$i]['user_items']);
$itemarray = explode('?,$itempurge);
$itemcount = count ($itemarray);
$user_items = "<br>";
for ($xe = 0;$xe < $itemcount;$xe++)
{
if ($itemarray[$xe] != NULL)
{
if (file_exists("shop/images/".$itemarray[$xe].".jpg"))
{
$user_items .= " <img src=\"shop/images/$itemarray[$xe].jpg\" title=\"$itemarray[$xe]\" alt=\"$itemaray[$xe]\">";
}
elseif (file_exists("shop/images/".$itemarray[$xe].".gif"))
{
$user_items .= " <img src=\"shop/images/$itemarray[$xe].gif\" title=\"$itemarray[$xe]\" alt=\"$itemaray[$xe]\">";
}
}
}
}
$usernameurl = append_sid("shop.".$phpEx."?action=inventory&searchname=".$postrow[$i]['username']);

但我改了以後,出現:
Parse error: parse error in /usr/local/psa/home/vhosts/toangel.52-u.com/httpdocs/viewtopic.php on line 1066
錯誤地方是\r
$itempurge = str_replace("?, "", $postrow[$i]['user_items']);

請大家幫忙!!!

發表於 : 2003-06-10 12:49
動機不明
先還原
再裝一遍 (編輯器換一套試試看! 例: ultraedit )

發表於 : 2003-06-10 19:16
Pooh2003
都是不行

發表於 : 2003-06-14 13:06
依夢兒
我本來也有遇到這個問題,後來解決了
問題是出在於商店街的 *.php 中\r
有二個在中文系統下無法識別的西歐語系字元 "ß" 和 "Þ"
由於中文系統無法識別這二個西歐語系字元,會把它們變成亂碼(問號)
所以在執行商店街的過程中,會造成 Parse error 的現象

解決方法:

1. 下載並安裝 EmEditor
http://www.emurasoft.com/ct/emeditor3/index.htm

2. 用 EmEditor 開啟商店街外掛的所有 *.php
開啟後,到左上角檔案 > 重載入在不同內碼表 > 自動檢查
如果這個 php 內含有我上面提到的那二個西歐語系字元的話\r
EmEditor 會自動將這篇 php 的顯示模示切換為西歐語系\r
(看字體就知道差別在哪裡了,在 EmEditor 右下角也會顯示)
如果顯示上沒有任何改變,就表示這篇 php 沒有我上面提到的那二個西歐語系字元
那麼你無須理會它,只要把它關掉就好了

3. 切換為西歐語系後,將這篇 php 內所有的 ß 和 Þ 置換為空白字元(就是按空白鍵啦!!)

4. 置換完畢後,儲存
除了 php 的部份需要這麼作, install.txt 內安裝的步驟也要這樣喲!!
因為 install.txt 內的安裝步驟中,一樣存有那二個西歐語系字元
所以你還是要將它們置換成空白字元
置換完了之後,再重新將它們加入到 viewtopic.php 等檔案中,然後一起上傳

發表於 : 2003-06-15 19:27
StickyKid
= =天啊 好多

發表於 : 2003-06-15 22:45
依夢兒
用EmEditor的搜尋 > 取代功能\r
將那些西歐語系字元自動置換成空白字元就好了
幾秒鐘就搞定了

發表於 : 2003-06-16 05:33
StickyKid
原來有這種功能~"~

發表於 : 2003-06-18 22:29
yll
怪了
裝了10數次
從未遇過這個問題啊...
不解\r
剛又去試了一次\r
還是ok啊

沒用過2.0.4
或許是版本的因素吧...

發表於 : 2003-06-19 03:50
wssxy
我安装第一个文件就显示Running :: alter table phpbb_users add `user_items` TEXT -> FAILED ---> Duplicate column name 'user_items'

我这里$sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid,u.user_items


没有$sql = "SELECT u.username, u.user_level, u.user_id,

怎么办啊

發表於 : 2003-06-21 11:39
Pooh2003
多謝你們~~

發表於 : 2003-06-21 12:09
Pooh2003
但之後它說我
$ususername = $postrow[$i]['username'];
有問題,

[問題]我都照作了卻..........

發表於 : 2003-07-24 22:50
julia
我都照做了,卻還是有問題.....
當我想要看會員的檔案時(按會員的名字後),出現了
Parse error: parse error in /home/jinhui/www/phpBB2/includes/usercp_viewprofile.php on line 262

也就是下面這幾行.....(因為它所指的地方是空白的,所以我想會不會是那附近的程式有問題)
else

{

$email_img = ' ';

$email = ' ';

}

我已經反反覆覆檢查過好多遍,就是找不出原因.....而且此處在裝這個外掛時並沒有修改到........

我的討論區版本是2.0.3版的......
請各位大大救救我吧......

發表於 : 2005-03-31 10:27
DL
改了後名稱會連起=.=