[問題] 安裝生日外掛後, 會員註冊出現錯誤訊息

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

版主: 版主管理群

jwxinst
竹貓忠實會員
竹貓忠實會員
文章: 945
註冊時間: 2006-03-31 10:07
來自: New York, USA     學業狀況: 當天才...       個人狀況: 臭蛋
聯繫:

文章 jwxinst »

野比小雄 寫:
心靈捕手 寫:To 野比小雄:

我猜想:
您之前貼給我看的檔案, 並非您新風格裡頭的.

建議您:
再貼出 (新風格裡頭的) 來看.
templates/YOUR_THEME/profile_add_body.tpl
不用了...
我已經裝上較舊的版本.......(birthdays 1.5.8)
不過我不知道如何在viewtopic中看到會員我生肖,星座....
這豈不是前功盡廢了嗎 :oops:
只感到可惜, 我有點幫不上忙

不過1.5.8不曉得BUG會怎麼樣
畢竟更新的都會修正, 而解決的可能會更容易
目前狀態圖檔
GoKo Music進度: 10%

問個問題不要緊可是沒有發文格式、問題不夠詳細情況,難道要用猜嗎?
新手必讀
[教學] 基本認識、學習、隨我架設phpBB的新手通 -更新至2.0.22
問問題的技巧
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=44340
MOD安裝教學及轉碼
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=22832
野比小雄
星球公民
星球公民
文章: 129
註冊時間: 2005-02-17 18:08
來自: 107年後的某處
聯繫:

文章 野比小雄 »

jwxinst 寫:
野比小雄 寫:
心靈捕手 寫:To 野比小雄:

我猜想:
您之前貼給我看的檔案, 並非您新風格裡頭的.

建議您:
再貼出 (新風格裡頭的) 來看.
templates/YOUR_THEME/profile_add_body.tpl
不用了...
我已經裝上較舊的版本.......(birthdays 1.5.8)
不過我不知道如何在viewtopic中看到會員我生肖,星座....
這豈不是前功盡廢了嗎 :oops:
只感到可惜, 我有點幫不上忙

不過1.5.8不曉得BUG會怎麼樣
畢竟更新的都會修正, 而解決的可能會更容易
那麼我又裝回2.0.1吧-.-
野比小雄
星球公民
星球公民
文章: 129
註冊時間: 2005-02-17 18:08
來自: 107年後的某處
聯繫:

文章 野比小雄 »

重裝後註冊頁沒有問題....
不過觀看文章卻出現:

代碼: 選擇全部

Parse error: parse error, unexpected ';' in /home/myjulynetd/domains/myjuly.net/public_html/6a/viewtopic.php on line 985
我照著這裡修改後就出現問題.......
作者小修正
代碼:

Addon
引言回覆:

代碼: 選擇全部

代碼:
##############################################################
## MOD Title:          Birthdays by TerraFrost 2.0.x- User's Age ADD-ON
## MOD Author: 3Di < 3d AT phpbb2italia DOT za DOT net > (Marco) http://phpbb2italia.za.net/phpbb2/index.php
## MOD Description:    Adds a field that displays the current age of your users, just in view topic.
## MOD Version:        0.2.0
##
## Installation Level: (Easy)
## Installation Time:  5 Minutes
## Files To Edit:
##      viewtopic.php,
##      language/lang_english/lang_main.php,
##      templates/subSilver/viewtopic_body.tpl
## Included Files:
##      N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
##   2006-01-27 - Version 0.2.0
##      - Added the N/A bit when an user hides his own Birthday in profile
##
##   2006-01-27 - Version 0.1.0
##      - first public release
##      - tested on a fresh 2.0.19
##      - not tested on EM
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#the line is longer...
$sql = "SELECT u.username, u.user_id, u.user_posts
#
#-----[ IN-LINE FIND ]----------------------------------------
#
u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, u.user_birthday
#
#-----[ FIND ]------------------------------------------------
# the line is longer...
      $yim = ( $postrow[$i]['user_yim'] ) ?
#
#-----[ AFTER, ADD ]------------------------------------------
#
      $bday_month_day = floor($postrow[$i]['user_birthday'] / 10000);
      $bday_year = $postrow[$i]['user_birthday'] - 10000*$bday_month_day;
      $fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;
      $age = ( $bday_year ) ? ' ('.(gmdate('Y')-$bday_year-$fudge).')' : '';
      $lang_bd = ( $bday_year ) ? $lang['bd_user'] : $lang['bd_user_none'];
#
#-----[ FIND ]------------------------------------------------
#
      'EDITED_MESSAGE' => $l_edited_by,
#
#-----[ AFTER, ADD ]------------------------------------------
#
      'POSTER_AGE' => $lang_bd . $age,
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
$lang['bd_user'] = 'User\'s Age: ';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['bd_user_none'] = 'User\'s Age: N/A';
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
$lang['View_Birthdays'] = 'Happy Birthday!';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['bd_user'] = 'User\'s Age: ';
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
   <!-- BEGIN postrow -->
   <tr>
#
#-----[ FIND ]------------------------------------------------
# the line is longer...
      <td width="150"
#
#-----[ IN-LINE FIND ]------------------------------------------------
#
{postrow.POSTER_JOINED}<br />
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------------
#
{postrow.POSTER_AGE}<br />
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
jwxinst
竹貓忠實會員
竹貓忠實會員
文章: 945
註冊時間: 2006-03-31 10:07
來自: New York, USA     學業狀況: 當天才...       個人狀況: 臭蛋
聯繫:

文章 jwxinst »

建議你
Parse error: parse error, unexpected ';' in /home/myjulynetd/domains/myjuly.net/public_html/6a/viewtopic.php on line 985
那個addon應該不是修正, 反而是強化而已
問題是, 以上的錯誤是因為做了那個強化addon才出現嗎

如果是, 請附上 viewtopic.php檔案
或者自行檢查 985行
檢查 這個生日外掛和你剛做的強化addon, 是不是有地方多了 或者放錯了 ";"
目前狀態圖檔
GoKo Music進度: 10%

問個問題不要緊可是沒有發文格式、問題不夠詳細情況,難道要用猜嗎?
新手必讀
[教學] 基本認識、學習、隨我架設phpBB的新手通 -更新至2.0.22
問問題的技巧
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=44340
MOD安裝教學及轉碼
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=22832
野比小雄
星球公民
星球公民
文章: 129
註冊時間: 2005-02-17 18:08
來自: 107年後的某處
聯繫:

文章 野比小雄 »

http://myjuly.net/viewtopic.rar
第985行是:

代碼: 選擇全部

      $bday_month_day = floor($postrow[$i]['user_birthday'] / 10000);
應該沒有問題....
jwxinst
竹貓忠實會員
竹貓忠實會員
文章: 945
註冊時間: 2006-03-31 10:07
來自: New York, USA     學業狀況: 當天才...       個人狀況: 臭蛋
聯繫:

文章 jwxinst »

問題就出在這裡, 請看看

在該強化ADDON裡頭, 很多外掛作者, 為了簡化和增加外掛的清析度(因為不經常更新), 他們都只會給予某段中的最前部份
而今天你做的修正中, 紅字已經註明了該行是很長的, 而find的只是一陪份

如果以後你看到這樣子, 並且要求你在AFTER ADD, 並不是直接在藍字的下一行加入

反而, 是在整句代碼(通常遇到 ; 就是代表一句的結尾)
#
#-----[ FIND ]------------------------------------------------
# the line is longer...
$yim = ( $postrow[$i]['user_yim'] ) ?
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bday_month_day = floor($postrow[$i]['user_birthday'] / 10000);

如果參考你的修改方法, 你是直接在上面的 ? 當作是結尾, 並且在下一行直接加入
$yim = ( $postrow[$i]['user_yim'] ) ?(下一行加入↓↓)
$bday_month_day = floor($postrow[$i]['user_birthday'] / 10000);
$bday_year = $postrow[$i]['user_birthday'] - 10000*$bday_month_day;
$fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;
$age = ( $bday_year ) ? ' ('.(gmdate('Y')-$bday_year-$fudge).')' : '';
$lang_bd = ( $bday_year ) ? $lang['bd_user'] : $lang['bd_user_none']; '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
為什麼我會看到了, 我是打開的時候, 發現上一行的< a href.......出現在 birthday的註項中


在viewtopic.php中, 完整的句子是

代碼: 選擇全部

		$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
但是太長了, 所以作者直接在 ['user_yim'] ) ?作為該陪份的結尾
可是他註明了, is much longer,
所以你必需要在那一行, 找到 最後一個代碼, 也就是 ;, 在這個的下一行加入新的代碼


所以, 請你按照這裡的修正吧或者怕擔心可以直接點擊這從我這裡下載(幫你修正好)

FIND(全部)

代碼: 選擇全部

		$yim = ( $postrow[$i]['user_yim'] ) ?
      $bday_month_day = floor($postrow[$i]['user_birthday'] / 10000);
      $bday_year = $postrow[$i]['user_birthday'] - 10000*$bday_month_day;
      $fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;
      $age = ( $bday_year ) ? ' ('.(gmdate('Y')-$bday_year-$fudge).')' : '';
      $lang_bd = ( $bday_year ) ? $lang['bd_user'] : $lang['bd_user_none']; '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
Replace With (全部覆蓋)

代碼: 選擇全部

		$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
		$bday_month_day = floor($postrow[$i]['user_birthday'] / 10000); 
      	$bday_year = $postrow[$i]['user_birthday'] - 10000*$bday_month_day; 
      	$fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0; 
      	$age = ( $bday_year ) ? ' ('.(gmdate('Y')-$bday_year-$fudge).')' : ''; 
      	$lang_bd = ( $bday_year ) ? $lang['bd_user'] : $lang['bd_user_none'];
最後建議你是
請將他們的開頭都對齊會比較好

請不要感到抱歉喔, 這種事情我自己也會發生
希望你看了會明白
暫時我想應該只有這個錯誤吧?
目前狀態圖檔
GoKo Music進度: 10%

問個問題不要緊可是沒有發文格式、問題不夠詳細情況,難道要用猜嗎?
新手必讀
[教學] 基本認識、學習、隨我架設phpBB的新手通 -更新至2.0.22
問問題的技巧
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=44340
MOD安裝教學及轉碼
http://www.phpbb-tw.net/phpbb/viewtopic.php?t=22832
主題已鎖定

回到「外掛問題討論」