1 頁 (共 2 頁)

[外掛] 簡易子分區的問題!!

發表於 : 2005-09-05 15:28
bradpittbb
大致上是成功了..但在有設子分區的版面~~
在"最後發表"的部份~~
卻無法顯示子分區最新的一篇文章~
而是顯示"沒有文章"

有沒有大大可以幫忙一下看怎麼解決這問題!!!謝謝~~


●架設主機作業系統:windows xp home 512 MB RAM
●您的上網方式:hinet ADSL 512/256k 固定ip
●您安裝的程式: php2.0.15 。
●您的 domain(網域名稱) 211.20.74.243
●您的 phpBB2 連結網址:http://211.20.74.243/phpBB2/index.php

發表於 : 2005-09-05 21:18
心靈捕手
To bradpittbb:

印象中, 您安裝此外掛時的版本, 應該是 1.0 而已.
若要有您所謂的效果的話, 則建議您升級該外掛( 1.1) 試試看!
http://phpbb-tw.net/phpbb/viewtopic.php?t=36645

ps.
1. 執行過的 SQL 部份, 可以省略;
2. 由於 ETERNAL 大大, 並沒有特別寫出 1.0 Update 1.1 的方法,
所以您必須自行重新比對每個修改過的檔案.

發表於 : 2005-09-06 17:08
*tytsim*
不是不是!!
1.1都是沒有子版面內文章最新的文章,
只會顯示主版面內最新的文章~

發表於 : 2005-09-06 22:40
ETERNAL
*tytsim* 寫:不是不是!!
1.1都是沒有子版面內文章最新的文章,
只會顯示主版面內最新的文章~
可能是你

代碼: 選擇全部

		if($row['main_sub']==0)
		{
			$row['main_sub']=$row['forum_id'];
		}
以及

代碼: 選擇全部

			$forum_data[] = $row;
			if($forum_main[$row['main_sub']]['post_time'] < $row['post_time'])
			{
				$forum_main[$row['main_sub']]['post_time']=$row['post_time'];
				$forum_main[$row['main_sub']]['post_username']=$row['post_username'];
				$forum_main[$row['main_sub']]['username']=$row['username'];
\n				$forum_main[$row['main_sub']]['user_id']=$row['user_id'];
				$forum_main[$row['main_sub']]['topic_title']=$row['topic_title'];
				$forum_main[$row['main_sub']]['forum_last_post_id']=$row['forum_last_post_id'];
			}
以及

代碼: 選擇全部

	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>';
}
這幾個地方沒改好吧

發表於 : 2005-09-07 18:36
*tytsim*
ETERNAL 寫:
*tytsim* 寫:不是不是!!
1.1都是沒有子版面內文章最新的文章,
只會顯示主版面內最新的文章~
可能是你

代碼: 選擇全部

		if($row['main_sub']==0)
		{
			$row['main_sub']=$row['forum_id'];
		}
以及

代碼: 選擇全部

			$forum_data[] = $row;
			if($forum_main[$row['main_sub']]['post_time'] < $row['post_time'])
			{
				$forum_main[$row['main_sub']]['post_time']=$row['post_time'];
				$forum_main[$row['main_sub']]['post_username']=$row['post_username'];
				$forum_main[$row['main_sub']]['username']=$row['username'];
				$forum_main[$row['main_sub']]['user_id']=$row['user_id'];
				$forum_main[$row['main_sub']]['topic_title']=$row['topic_title'];
				$forum_main[$row['main_sub']]['forum_last_post_id']=$row['forum_last_post_id'];
			}
以及

代碼: 選擇全部

	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>';
}
這幾個地方沒改好吧
我在index.php都找到這些程式碼,
我全加了~

發表於 : 2005-09-07 18:44
bc010843
我也有這問題~~子分區的最新文章或回應沒辦法顯示於首頁

發表於 : 2005-09-07 20:55
心靈捕手
近來, 發現有不少網友反應" 子版的新文章無法出現在首頁上",...

如果說, 您是由原先的 1.0 版升級到 1.1 版的話,
那麼可能要加上一個動作, 才能讓" 子版的新文章出現在首頁上".
PS2:

修改完後,記得到phpbb的後台重新設定子版面
否則功能無法生效
http://bbs.2233.idv.tw/viewtopic.php?p=3694099#3694099

或者, 參考底下的方法, 試試看:

發表於 : 2005-09-07 21:06
bc010843
請教一下心靈捕手

作者的網站我也曾上去尋問過,得到的回答是index.php裡沒$forum_data[$j]['topic_title']

請問我該把上述的語法加入哪一段呢?

ps:您提供的連結 第五篇是我回覆的
http://bbs.2233.idv.tw/viewtopic.php?p=3694099#3694099

請指點一下

謝謝

發表於 : 2005-09-07 21:19
心靈捕手
bc010843 寫:請教一下心靈捕手

作者的網站我也曾上去尋問過,得到的回答是index.php裡沒$forum_data[$j]['topic_title']

請問我該把上述的語法加入哪一段呢?

ps:您提供的連結 第五篇是我回覆的
http://bbs.2233.idv.tw/viewtopic.php?p=3694099#3694099

請指點一下

謝謝
原始的設計中, 最後發表的文章並不會顯示" 標題";
如果最後發表的文章, 您要連標題也一起顯示的話, 那麼必須要自己加以修改才行.

例如, 加裝外掛 last_topic_title_index
很抱歉! 一時間尚未找到該外掛. :oops:

發表於 : 2005-09-07 21:22
bc010843
我有裝最後發表主題顯示於首頁耶~~~

謝謝 :oops:

發表於 : 2005-09-07 21:26
心靈捕手
bc010843 寫:我有裝最後發表主題顯示於首頁耶~~~

謝謝 :oops:
那就好辦啊!

不過, 我得先確認一下, 您安裝的外掛名稱( 版本)
可以的話, 也請提供( 下載的) 參考連結.

發表於 : 2005-09-07 21:31
bc010843
心靈捕手 寫:可以的話, 也請提供( 下載的) 參考連結.
殘念~~~我忘了是什麼版本\r

可以提供我的*php & *tpl檔給您參考嗎?

感恩哦

發表於 : 2005-09-07 21:40
心靈捕手
bc010843 寫:
心靈捕手 寫:可以的話, 也請提供( 下載的) 參考連結.
殘念~~~我忘了是什麼版本\r

可以提供我的*php & *tpl檔給您參考嗎?

感恩哦
請提供您修改後的下列 2 個檔案
1. index.php
2. templates/YOUR_THEME/index_body.tpl

(ps. 將它另存成文字檔後, 再貼出下載路徑即可)

發表於 : 2005-09-07 21:49
bc010843
謝謝心靈捕手 :oops:

路徑在這裡

感恩

發表於 : 2005-09-07 22:06
心靈捕手
bc010843 寫:謝謝心靈捕手 :oops:

路徑在這裡

感恩
您使用的版本, 剛好跟我的一樣!
以下的修改, 提供您參考:

代碼: 選擇全部

#
#-----[ Open ]-----
#
index.php

#
#-----[ Find ]-----
#
$last_post = $last_post_time . '<br />';

#
#-----[ After, Add ]-----
#
$last_post .=  $forum_main[$forum_id]['topic_title'] .'<br />';