Jump to content
xisto Community
Sign in to follow this  
Arne-Christian

Evilboard (forum Software) - Multiple Categorys - Don't Work :( I am creating a forum and i cant fix more then 1 category.

Recommended Posts

I am at the moment trying to program my own forum, but i need more then a single category, here is my source:

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 :)

Notice from saint-michael:
no bumping topics someone will see it and make a post.

Edited by Saint_Michael (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.