請問phpwind 板塊顯示問題

Home Home
引用 | 編輯 chris710908
2007-11-21 09:10
樓主
推文 x0
【類型】主程式
【版本】3.01

請教各位先進~

最近要做論壇的home首頁(類似http://08.plus28.com/板塊顯示)

想要動態顯示分類板塊(category)與子板塊(forum)

因為板塊資訊存在phpwind中的pw_forums資料庫中~

我用dw作首頁~程式碼如下~但是他只會重複顯示出第一筆分類的的category與forum

接下來都只有category版塊~~

如:

版務區
->公告版
->新首版
....

軟體區
->

硬體區
->

只有版務區會顯示子板塊~其他都是空的~我不太知道要怎麼寫才能正確?
請高手解惑~謝謝

程式碼
<?php require_once('Connections/index.php'); ?>

<?php
mysql_select_db($database_index, $index);
$query_forum = "SELECT * FROM pw_forums WHERE fup = 0 ORDER BY vieworder ASC";
$forum = mysql_query($query_forum, $index) or die(mysql_error());
$row_forum = mysql_fetch_assoc($forum);
$totalRows_forum = mysql_num_rows($forum);

mysql_select_db($database_index, $index);
$query_subname = "SELECT * FROM pw_forums WHERE fup LIKE '%$row_forum[fid]%' ORDER BY vieworder ASC";
$subname = mysql_query($query_subname, $index) or die(mysql_error());
$row_subname = mysql_fetch_assoc($subname);
$totalRows_subname = mysql_num_rows($subname);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>無標題文件</title>
<style type="text/css">
<!--
.style4 {color: #009966}
-->
</style>
</head>

<body>
<?php do { ?>
<p><?php echo $row_forum['name']; ?></p>
<?php do { ?>-<?php echo $row_subname['name']; ?><br>
<?php } while ($row_subname = mysql_fetch_assoc($subname)); ?>
<?php } while ($row_forum = mysql_fetch_assoc($forum)); ?><p></p>
<p> </p>
</body>
</html>
<?php
mysql_free_result($forum);


mysql_free_result($subname);

?>


獻花 x0
引用 | 編輯 月光
2007-11-22 22:27
1樓
  
我看到的版本是 Discuz! 5.5.0 表情

獻花 x0
引用 | 編輯 chris710908
2007-11-23 08:36
2樓
  
下面是引用月光於2007-11-22 22:27發表的 :
我看到的版本是 Discuz! 5.5.0 表情

不好意思~我的論壇版本是pw3.01

我想做的版塊分類顯示效果視上面那個網址的分類

只是想說做的參考~

論壇程序還是pw的

獻花 x0
引用 | 編輯 月光
2007-11-23 16:56
3樓
  
您可以參考一下 PW 6.0 版官提拱之 home.php 如果是我的話我就懶得從做了直接把官方6.0的home.php 分離到 PW 3.01 上...因為我很懶 表情

獻花 x0
引用 | 編輯 kennepc
2007-12-05 12:49
4樓
  
6.0繁體版的HOME好像有些BUG,像是整站新帖、最新回覆及社區焦點圖片(會出不來)板塊對應導出的數據有問題,還有討論區最新帖的帖子數有時只出現幾帖,有時正常,已向官方反應,目前還沒有解決!
建議你先察看!再升級!

獻花 x0
引用 | 編輯 swlong
2007-12-16 13:56
5樓
  
論壇升級成6.0 用簡體版的6.0轉成繁體即可

獻花 x0