第 1 頁 (共 1 頁)
[問題] 簡易子分區(解決,感謝心靈捕手大和k122417901大)
發表於 : 2005-07-01 16:18
由 幽雲
問題外掛:(簡易子分區1.0)
參考連結:(
http://phpbb-tw.net/phpbb/viewtopic.php ... A%A9%AD%B1)
使用版本:(phpBB 2.0.14)
網站位置:(
http://practk.why3s.us/etohalts/viewforum.php?f=4)
狀況描述:
子分區的最後發表處...
發表會出現主題和發表時間...
不過顯示方法是直的@@"?
請問如何變成橫式???
發表於 : 2005-07-01 16:25
由 Kill
改tpl
把寬度刪掉
發表於 : 2005-07-01 16:26
由 幽雲
k122417901 寫:改tpl
把寬度刪掉
請問是哪個TPL
還有把哪段砍掉(別砍我><~)
發表於 : 2005-07-01 16:38
由 Kill
#
#-----[ OPEN 打開 ]------------------------------------------------
#
\n
代碼: 選擇全部
viewforum_body.tpl
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#
代碼: 選擇全部
<th class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
#
#-----[ SAVE/CLOSE ALL FILES 儲存/關閉所有檔案 ]-------------------
#
# EoM 外掛修正結束
試試看行不行
發表於 : 2005-07-01 16:42
由 幽雲
事變短了沒錯...
不過有辦法做到和普通版面那樣嗎?
主題一行
時間一行
作者一行
感謝您的幫助~
發表於 : 2005-07-01 16:46
由 心靈捕手
幽雲 寫:k122417901 寫:改tpl
把寬度刪掉
請問是哪個TPL
還有把哪段砍掉(別砍我><~)
就我個人的安裝經驗而言,
會出現您所謂 "顯示方法是直的"
可能是和 viewforum.php 裡頭的語法有關,
因為
ETERNAL 大大的設計, 是將該( 最後發表)欄位以表格的方式呈現,
而其中該表格, 又區分為左, 右兩個欄位;
而當您使用的風格, 若是版面寬度已經縮小,
又再加上主題很長的話, 就會造成整個版面會拉得很長.
以下的修改, 提供您參考:
( ps. 這裡的語法, 將使得" 時間" 在最底下;
若要將時間放在其他位置的話, 則請參看後頭回覆的文章)
#
#-----[ Open ]-----
#
#
#-----[ Find ]-----
#
代碼: 選擇全部
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<table width="100%" align="center"><tr><td align="right"><span class="genmed"><a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />'.$last_post_time . '<br />'.'by ';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> </span></td>';
$last_post .= '<td align="right" valign="middle"><img src="' . $images['icon_latest_reply'] . '" border="0" /></td></tr></table>';
}
#
#-----[ Replace With ]-----
#
代碼: 選擇全部
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>' . '<br />';
$last_post .= $last_post_time;
}
發表於 : 2005-07-01 16:54
由 幽雲
恩~
是風格影響的關西....
修改後就可以了~
再次謝謝心靈捕手大大...
也謝謝k122417901大大的幫忙...
發表於 : 2005-07-01 16:59
由 Kill
心靈捕手學長果然厲害
看來我功力還不夠
繼續K書

發表於 : 2005-07-01 17:10
由 心靈捕手
k122417901 寫:心靈捕手學長果然厲害
看來我功力還不夠
繼續K書

您太抬舉我了, 大家互相切磋, 分享成功經驗而已!
--
To 幽雲:
如果您想將" 時間", 放到最上頭, 配合主版面的話,
那麼您可以將上頭取代的地方, 做以下調整即可:
#
#-----[ Open ]-----
#
#
#-----[ Find ]-----
#
代碼: 選擇全部
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<table width="100%" align="center"><tr><td align="right"><span class="genmed"><a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />'.$last_post_time . '<br />'.'by ';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> </span></td>';
$last_post .= '<td align="right" valign="middle"><img src="' . $images['icon_latest_reply'] . '" border="0" /></td></tr></table>';
}
#
#-----[ Replace With ]-----
#
代碼: 選擇全部
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . '<br />';
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
發表於 : 2005-07-01 17:19
由 幽雲
了解\r
不過覺得現在這樣就很好看了~
再次謝謝心靈捕手大大= =+
發表於 : 2005-09-11 22:07
由 心靈捕手
這裡的語法, 將使得" 時間" 在文章標題之下, 發文者之上.
#
#-----[ Open ]-----
#
#
#-----[ Find ]-----
#
代碼: 選擇全部
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<table width="100%" align="center"><tr><td align="right"><span class="genmed"><a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />'.$last_post_time . '<br />'.'by ';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> </span></td>';
$last_post .= '<td align="right" valign="middle"><img src="' . $images['icon_latest_reply'] . '" border="0" /></td></tr></table>';
}
#
#-----[ Replace With ]-----
#
代碼: 選擇全部
if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />';
$last_post .= $last_post_time . '<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
ps.
當您升級到" 簡易子版面 1.2" 時
若覺得顯示在首頁, 最後發表的地方, 很擁擠的話,
則請參考這裡的改法, 修改 index.php 的相關語法, 即可.
不過, 請注意! 如果您要將子版面最後發表的文章顯示在首頁的話,
那麼無論您是採用上述哪種置換的方式, 修改 index.php 時, 都必須用
代碼: 選擇全部
$forum_main[$forum_id]
取代
發表於 : 2005-10-14 21:19
由 心靈捕手
轉貼此文, 乃為了避免上一篇回文
註解部分, 遭受誤解.
http://phpbb-tw.net/phpbb/viewtopic.php?p=214034#214034
當您升級到" 簡易子版面 1.2" 時,
若覺得顯示在首頁, 最後發表的地方, 很擁擠的話,
則請參考這裡的改法, 修改 index.php 的相關語法, 即可.
以下的修改, 提供您參考:
#
#-----[ OPEN ]-----
#
#
#-----[ FIND ]-----
# ps. 修改" 簡易子版面 1.2" 後的原始檔
代碼: 選擇全部
if ( $forum_main[$forum_id]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_main[$forum_id]['post_time'], $board_config['board_timezone']);
$last_post = '<table width="100%" align="center"><tr><td align="right"><span class="genmed"><a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_main[$forum_id]['forum_last_post_id']) . '#' . $forum_main[$forum_id]['forum_last_post_id'] . '"> '.$forum_main[$forum_id]['topic_title'].' </a>'.'<br />'.$last_post_time . '<br />'.'by ';
$last_post .= ( $forum_main[$forum_id]['user_id'] == ANONYMOUS ) ? ( ($forum_main[$forum_id]['post_username'] != '' ) ? $forum_main[$forum_id]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_main[$forum_id]['user_id']) . '">' . $forum_main[$forum_id]['username'] . '</a> </span></td>';
$last_post .= '<td align="right" valign="middle"><img src="' . $images['icon_latest_reply'] . '" border="0" /></td></tr></table>';
}
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
if ( $forum_main[$forum_id]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_main[$forum_id]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_main[$forum_id]['forum_last_post_id']) . '#' . $forum_main[$forum_id]['forum_last_post_id'] . '"> '.$forum_main[$forum_id]['topic_title'].' </a>'.'<br />';
$last_post .= $last_post_time . '<br />';
$last_post .= ( $forum_main[$forum_id]['user_id'] == ANONYMOUS ) ? ( ($forum_main[$forum_id]['post_username'] != '' ) ? $forum_main[$forum_id]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_main[$forum_id]['user_id']) . '">' . $forum_main[$forum_id]['username'] . '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_main[$forum_id]['forum_last_post_id']) . '#' . $forum_main[$forum_id]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
發表於 : 2005-11-05 02:18
由 bc010843
心靈捕手 寫:幽雲 寫:k122417901 寫:改tpl
把寬度刪掉
請問是哪個TPL
還有把哪段砍掉(別砍我><~)
就我個人的安裝經驗而言,
會出現您所謂 "顯示方法是直的"
可能是和 viewforum.php 裡頭的語法有關,
因為
ETERNAL 大大的設計, 是將該( 最後發表)欄位以表格的方式呈現,
而其中該表格, 又區分為左, 右兩個欄位;
而當您使用的風格, 若是版面寬度已經縮小,
又再加上主題很長的話, 就會造成整個版面會拉得很長.
以下的修改, 提供您參考:
( ps. 這裡的語法, 將使得" 時間" 在最底下;
若要將時間放在其他位置的話, 則請參看後頭回覆的文章)
請問心靈捕手兄,只有這種改法沒問題
剩下的二種改完後出現下列錯誤碼\r
Parse error: parse error, unexpected T_ELSE in /home/fountain/public_html/phpbb/viewforum.php on line 613
符上未改的php
--心靈捕手 留言--
原文已刪除!
發表於 : 2005-11-05 07:33
由 心靈捕手
bc010843 寫:心靈捕手 寫:幽雲 寫:
請問是哪個TPL
還有把哪段砍掉(別砍我><~)
就我個人的安裝經驗而言,
會出現您所謂 "顯示方法是直的"
可能是和 viewforum.php 裡頭的語法有關,
因為
ETERNAL 大大的設計, 是將該( 最後發表)欄位以表格的方式呈現,
而其中該表格, 又區分為左, 右兩個欄位;
而當您使用的風格, 若是版面寬度已經縮小,
又再加上主題很長的話, 就會造成整個版面會拉得很長.
以下的修改, 提供您參考:
( ps. 這裡的語法, 將使得" 時間" 在最底下;
若要將時間放在其他位置的話, 則請參看後頭回覆的文章)
請問心靈捕手兄,只有這種改法沒問題
剩下的二種改完後出現下列錯誤碼\r
Parse error: parse error, unexpected T_ELSE in /home/fountain/public_html/phpbb/viewforum.php on line 613
符上未改的php
--心靈捕手 留言--
原文已刪除!
謝謝您的錯誤回報!
最主要問題, 是後面幾篇回文的語法, 結尾處漏了一個
}.
發表於 : 2006-08-29 01:59
由 wccw
對不起 , 錯誤 post 在 此
請版主 代為 delete 此 post , 謝謝