Hi,
I am working on my own forum script.
PlusBB
http://plusbb.wehostyour.info/forums
What I wanted to do is make it so the posts were flat rather than threaded.
Well the tutorials I used ended up bringing me to something I do not want.
I ended up with a Threaded Page view after combining all the tutorials.
Here is the forumid .php script(mbindex.php)
And here is the topic view code(read.php)
Can someone please help me fix this issue?
Thanks
I am working on my own forum script.
PlusBB
http://plusbb.wehostyour.info/forums
What I wanted to do is make it so the posts were flat rather than threaded.
Well the tutorials I used ended up bringing me to something I do not want.
I ended up with a Threaded Page view after combining all the tutorials.
Here is the forumid .php script(mbindex.php)
Code:
<?php
if (!isset($_GET['MBID'])) exit;
mysql_connect(localhost, phpuser, alm65z);
mysql_select_db(phpdb);
function showpost(&$parent) {
extract($parent, EXTR_PREFIX_ALL, msg);
$msg_DateSubmitted = date(jS of F Y, $msg_DateSubmitted);
echo [*][url=read.php?Msg=$msg_ID]$msg_Title[/url] posted by [email=$msg_Email]$msg_Poster[/email] on $msg_DateSubmitted;
$result = mysql_query(SELECT ID, Title, Poster, Email, DateSubmitted FROM mbmsgs WHERE MBID = {$_GET['MBID']} AND Parent = $msg_ID ORDER BY DateSubmitted DESC;);
if (mysql_num_rows($result)) {
echo <ul>;
while ($row = mysql_fetch_assoc($result)) {
showpost($row);
}
echo [/list];
}
}
$result = mysql_query(SELECT ID, Title, Poster, Email, DateSubmitted FROM mbmsgs WHERE MBID = {$_GET['MBID']} AND Parent = 0 ORDER BY DateSubmitted DESC;);
if (!$result) exit;
if (!mysql_num_rows($result)) {
echo This messageboard has no posts.;
} else {
echo <ul>;
while ($row = mysql_fetch_assoc($result)) {
showpost($row);
}
echo [/list];
}
?>
[url=post.php?MBID=<?php echo $_GET['MBID']; ?>]Post new message[/url]
And here is the topic view code(read.php)
Code:
<?php
if (!isset($_GET['Msg'])) exit;
mysql_connect(localhost, phpuser, alm65z);
mysql_select_db(phpdb);
$result = mysql_query(SELECT MBID, Poster, Email, Title, Message, DateSubmitted FROM mbmsgs WHERE ID = {$_GET['Msg']};);
if (!$result) exit;
if (!mysql_num_rows($result)) exit;
extract(mysql_fetch_array($result), EXTR_PREFIX_ALL, 'msg');
$msg_DateSubmitted = date(jS of F Y, $msg_DateSubmitted);
echo Posted by [email=$msg_Email] $msg_Poster[/email] on $msg_DateSubmitted
;
echo $msg_Message
;
echo [url=post.php?Parent={$_GET['Msg']}&MBID=$msg_MBID] Reply to this post[/url];
?>
Can someone please help me fix this issue?
Thanks