1 頁 (共 1 頁)

[問題]發表人的連結

發表於 : 2004-08-31 17:47
angela
發表人的連結如何拿掉,是不是這\phpBB2\viewforum.php檔的這三行,如果是的話,請問要如何修改,才能剩下「發表人」的名字,而沒有連結?
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );

$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
請各位先進指導一下,謝謝!

發表於 : 2004-08-31 18:00
吉兒
把第一行跟第三行comment out(在前面加//)應該就好了
$topic_author = '';
//$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );

//$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

發表於 : 2004-08-31 18:16
angela
這方法我試過了,可是結果是,第一列的發表人是正常的(如:angela),第二列的發表人是重複一次(angelaangela)第三列的發表人是重複二次(angelaangelaangela),以此類推,不知道為什麼呢?我沒有改原始的程式碼,只有用//註解起來。

感謝吉兒的回應!

發表於 : 2004-08-31 19:39
~倉木麻衣~
感覺上你應該是只有加上//的註解而已..
底下關鍵的一行卻忘了加上
$topic_author = '';

發表於 : 2004-09-01 14:03
angela
你的意思是不是,把$topic_author = '';加在另外一行,可是整個欄位卻變成空白的。
//$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );

//$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
$topic_author = '';

發表於 : 2004-09-01 14:49
~倉木麻衣~
(ro06)
麻煩你把吉兒的程式碼看清楚 (ro01)
加到最後一行去..當然會變成空白丫(ro01) (ro01) (ro01) (ro01)

發表於 : 2004-09-01 15:03
angela
我看到了,要加在第一行的地方,謝謝大家的幫忙!感恩慈悲!