|
|
|
|
![]() ![]() |
Sep 13 2006, 05:44 AM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 62 Joined: 22-December 05 From: Sandefjord,Norway Member No.: 16,078 |
I am at the moment trying to program my own forum, but i need more then a single category, here is my source:
CODE function cat () { include("functions/functions.php"); echo '<table width="100%" border="0" cellspacing="0"> <tr> <td class="eb_top" colspan="3" style="border-bottom-width: 0; height: 30px; font-size: 12px;"> <b>Forum</b></td> </tr>'; global $catid; $db = new db; $db->connect(); $connect = $db->query("SELECT * FROM eb_forum WHERE catecory = '1'"); # START GET CATEGORYS # $catz = array(); while ( $cat = mysql_fetch_object( $connect ) ) { /*echo " <tr> <td height=\"22\" class=\"eb_menu1\"> <b>{$cat->name}</b></td> <td width=\"10%\" height=\"22\" class=\"eb_menu3\"><div align=\"center\">Topics:</div></td> <td width=\"10%\" height=\"22\" class=\"eb_menu3\"><div align=\"center\">Replies:</div></td> </tr>";*/ $catz[] .= "<tr> <td height=\"22\" class=\"eb_menu1\"> <b>{$cat->name}</b></td> <td width=\"10%\" height=\"22\" class=\"eb_menu3\"><div align=\"center\">Topics:</div></td> <td width=\"10%\" height=\"22\" class=\"eb_menu3\"><div align=\"center\">Replies:</div></td> </tr>"; $catid = $cat->catid; } foreach ( $catz as $c ) { $get = $db->query("SELECT * FROM eb_forum WHERE catid = '$catid' AND catecory = '0'"); while ( $getinfo = mysql_fetch_object( $get ) ) { //$replay_num = sql_get_topics("get_all_topics", "$forum_id"); { $forum_id = $getinfo -> ForumID; // Get Rows $query = "SELECT * FROM `eb_topic` WHERE `ForumID` = '$forum_id'"; $connect = mysql_query($query); $num_topic_rows = mysql_num_rows($connect); // End Get Rows // Get Rows $query2 = "SELECT * FROM `eb_post` WHERE `ForumID` = '$forum_id'"; $connect2 = mysql_query($query2); $num_replay_rows = mysql_num_rows($connect2); // End Get Rows $forum_id = $getinfo -> ForumID; $desc = $getinfo -> desc; $mods = $getinfo -> mods; $name = $getinfo -> name; echo '<tr> <td width="80%" class="forum_footer"> <a href="?showforum=' . $forum_id . '"><b>' . $name . '</b></a><br> ' . $desc . '<br> <b> Forum led by:</b><a href="?group=' . $mods . '"> ' . $mods . '</a></td> <td width="10%" class="forum_footer2"><div align="center"></div> <div align="center">'. $num_topic_rows .'</div></td> <td width="10%" class="forum_footer2"><div align="center"></div> <div align="center">'. $num_replay_rows .'</div></td> </tr>'; } } } } ?> I have tried all possible ways that i can think off still i cannot fix it, someone please help This post has been edited by Saint_Michael: Sep 13 2006, 12:51 PM |
|
|
|
Sep 13 2006, 12:59 PM
Post
#2
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,466 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
Although I can't in terms of what you can add but i will provide you some links to give you some idea's on creating a forum
http://www.pixel2life.com/tutorials/count/...hp_based_forum/ http://www.pixel2life.com/tutorials/count/...ds_and_replies/ this should give you some ideas on where to go next. |
|
|
|
Sep 13 2006, 03:09 PM
Post
#3
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 62 Joined: 22-December 05 From: Sandefjord,Norway Member No.: 16,078 |
Thanks a LOT!This fixed it
|
|
|
|
Sep 13 2006, 04:44 PM
Post
#4
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,466 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
no problem keep us up to date as well. if you need any more php help go here. www.pixel2life.com. that got quite a database of php tuts that can help you out.
|
|
|
|
Jun 16 2008, 03:40 PM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 411 Joined: 9-February 08 Member No.: 57,615 |
Really good topic to follow, I should wait for some replies,
|
|
|
|
Jul 2 2008, 04:24 AM
Post
#6
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 411 Joined: 9-February 08 Member No.: 57,615 |
Anymore replies, still waiting?!
|
|
|
|
Jul 4 2008, 05:23 PM
Post
#7
|
|
|
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,026 Joined: 25-September 05 From: L.A. Member No.: 12,251 |
This topic is two years old and resolved. Why would there be any more replies?
|
|
|
|
![]() ![]() |
Similar Topics