[問題] 模仿暱稱MOD新增欄位在註冊的時候發生問題

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

版主: 版主管理群

主題已鎖定
ragwing
星球普通子民
星球普通子民
文章: 8
註冊時間: 2005-01-23 22:09

[問題] 模仿暱稱MOD新增欄位在註冊的時候發生問題

文章 ragwing »

問題外掛:Change User Nick Name
使用版本:2.0.2
網站位置:http://med.tmu.edu.tw/~TMU921/phpBB2/portal.php
狀況描述:

之前新增了五個欄位...不過不是一口氣貪心新增的,而是新增完一個之後到後台去看到沒問題才繼續新增下去。

不過就在今天想要嘗試新增註冊看看的時候終於出包了...

Parse error: parse error, unexpected ',' in /usr/home/TMU921/public_html/phpBB2/includes/usercp_register.php on line 635

雖然知道是在第635行多了一個" , ",不過找了半天就是不知道多了哪一個去了。

在這裡附上usercp_register.php,請各位先進幫小弟看看m(_ _)m

請按我下載

\r
補充:
曾經安裝:
Topic calendar 1.0.1
EZPortal admin v1.0.5
EZPortal 1.0.6
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8547
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

To ragwing:

該行語法有錯!
以下的修改, 提供您參考:

代碼: 選擇全部

#
#-----[ Find ]-----
#
, '" . str_replace("\'", "''", $housename), '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $nickname) . "' $user_style, 0, 1, ";

#
#-----[ Replace With ]-----
#
, '" . str_replace("\'", "''", $housename) . "', '" . str_replace("\'", "''", $nickname) . "', $user_style, 0, 1, ";
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
ragwing
星球普通子民
星球普通子民
文章: 8
註冊時間: 2005-01-23 22:09

文章 ragwing »

首先感謝心靈捕手大大賜教m(_ _)m,問題解決了

過了這麼久才上來跟捕手前輩感恩 實在有點過意不去\r

不過又跑出來新的問題了... 實在是讓我羞的無地自容 :oops:

還請前輩指點 m(_ _)m

現在出現註冊者的資料進不去資料庫

第651行出現問題 這次連是什麼問題都不知道了...

Could not insert data into users table

DEBUG MODE

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_turename, user_studynumbername, user_housename, user_numbername, user_nickname, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (13, 'test', 1125070054, '098f6bcd4621d373cade4e832627b4f6', 'test@msa.hinet.net', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 8, 'D M d, Y g:i a', 'chinese_traditional_taiwan', '', '', '', '', 2, 0, 1, 1, '')

Line : 651
File : usercp_register.php

再次煩請各位板上的高手幫我看看了....
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8547
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

ragwing 寫:首先感謝心靈捕手大大賜教m(_ _)m,問題解決了

過了這麼久才上來跟捕手前輩感恩 實在有點過意不去\r

不過又跑出來新的問題了... 實在是讓我羞的無地自容 :oops:

還請前輩指點 m(_ _)m

現在出現註冊者的資料進不去資料庫

第651行出現問題 這次連是什麼問題都不知道了...

Could not insert data into users table

DEBUG MODE

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_turename, user_studynumbername, user_housename, user_numbername, user_nickname, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (13, 'test', 1125070054, '098f6bcd4621d373cade4e832627b4f6', 'test@msa.hinet.net', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 8, 'D M d, Y g:i a', 'chinese_traditional_taiwan', '', '', '', '', 2, 0, 1, 1, '')

Line : 651
File : usercp_register.php

再次煩請各位板上的高手幫我看看了....
您這個問題和第一個大同小異!

針對這個錯誤, 以下的修改, 提供您參考:
#
#-----[ Find ]-----
# ps. 約 635 行
, '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $turename) . "', '" . str_replace("\'", "''", $studynumbername) . "', '" . str_replace("\'", "''", $housename), '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $nickname) . "' $user_style, 0, 1, ";

#
#-----[ Replace With ]-----
#
, '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $turename) . "', '" . str_replace("\'", "''", $studynumbername) . "', '" . str_replace("\'", "''", $housename) . "', '" . str_replace("\'", "''", $numbername) . "', '" . str_replace("\'", "''", $nickname) . "' $user_style, 0, 1, ";
ps.
我不保證, 這樣修改後不會有其他問題;
若有其他問題, 則建議您比照除錯,
很可能是您後面增加新值時, 重複了" $user_lang ".
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
主題已鎖定

回到「外掛問題討論」