Valhalla Legends Forums Archive | Web Development | That's a stupid suggestions, Joe.

AuthorMessageTime
Forged
I am using the same forum this site uses for testing purposes on a portal I am making.  I am trying to display the threads from the news post,posted on my main page.  I have done that, but when I post the news threads it also post all the comments in the news threads as well.  After looking at the mysql tables I can't seem to see how the forum destinquishes between the two.  Any help on how to not post the comments would be appreciated.

my code:
[code]
$scan = mysql_query("SELECT * FROM `smf_messages` WHERE `ID_BOARD`= '2' ORDER BY `posterTime` DESC") or die(mysql_error());

while($row= mysql_fetch_array($scan)){
$user = $row['posterName'];
$time = $row['posterTime'];

$q = date("m/j/y h:i:s A", $time);

$s = mysql_query("SELECT * FROM `smf_members` WHERE `memberName` = '$user'") or die(mysql_error());
$r = mysql_fetch_array($s) or die(mysql_error());

$avy = $r['avatar'];

echo "<table cellpadding=0 cellspacing=0 width=400><tr><td width=100></td><td><b>". $row['subject'];
echo "</b><br /><img src=".$avy." align=left><i>". $row['body'] ."</i><br />";
echo "<font size=-2>".$q. "<br />".$user."</td></tr></table><br />";
}

[/code]

the mysql table:
[img]http://www.securegamers.com/Forged/damnit.jpg[/img]
February 7, 2006, 6:19 AM
PaiD
I would say the Topic ID. Only accept the first title for each number.
February 7, 2006, 3:49 PM
rabbit
[quote author=Savior link=topic=14181.msg145008#msg145008 date=1139327348]
I would say the Topic ID. Only accept the first title for each number.
[/quote]If ID_MSG == ID_TOPIC, it's the thread.  If ID_MSG != ID_TOPIC, ID_MSG is a reply to ID_TOPIC.
February 8, 2006, 1:01 AM
Forged
No, Id_message is the post number, id_topic is the thread number.  So you could have message=100000 and thread=300 and it could still be a new thread.  However, I decided to use phpbb, seems like a better forum anyway.
February 8, 2006, 3:40 AM
JoeTheOdd
[code]if(!substr($SUBJECT), 0, 3) == "Re:")
{
  //nothing
}
else
{
  //topic
}[/code]
February 10, 2006, 10:43 PM
rabbit
[quote author=Joe link=topic=14181.msg145470#msg145470 date=1139611395]
[code]if(!substr($SUBJECT), 0, 3) == "Re:")
{
  //nothing
}
else
{
  //topic
}[/code]
[/quote]What happens if someone changes the title to 'That's a stupid suggestion, Joe.'?
February 10, 2006, 11:42 PM
JoeTheOdd
Why would they do that? It'd break of course, but nobody ever changes it, so eh?
February 11, 2006, 11:02 PM
rabbit
[quote author=Joe link=topic=14181.msg145608#msg145608 date=1139698934]
Why would they do that? I'd break of course, but nobody ever changes it, so eh?
[/quote]I'd like to see you even attempt to break anything.  And that is a gross generalization.  LOT's of people change the reply title.
February 11, 2006, 11:07 PM

Search