Topic View Issue!

aka ibebak

Paragon
Joined
Aug 7, 2008
Messages
1,181
Reaction score
0
FP$
6
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)

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 "<li><A HREF=\"read.php?Msg=$msg_ID\">$msg_Title</a> posted by <a href=\"mailto:$msg_Email\">$msg_Poster</a> 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 "</ul>";
        }
    }
    
    $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 "</ul>";
    }
?>

<br /><br /><a href="post.php?MBID=<?php echo $_GET['MBID']; ?>">Post new message</a>


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 <a href=\"mailto:$msg_Email\"> $msg_Poster</a> on $msg_DateSubmitted<br />";
    echo "$msg_Message<br /><br />";
    echo "<a href=\"post.php?Parent={$_GET['Msg']}&MBID=$msg_MBID\"> Reply to this post</a>";
?>

Can someone please help me fix this issue?

Thanks
 
There is a 48 hour bump rule. The chances are that as no one has replied yet that no one can help you.
 
Not to be rude or anything but, If your following tutorial's is good and all to learn but, If you are just "copying" them ect.. this really isn't your own software. To be honest I'd work on your project a lot before releasing a demo view to us, Also later on if you plan on releasing the project to a community of people. You may not want to ask information on every little thing.

Because then people will think it's not coded correctly and may not feel safe using software.
 
Its not all tutorial based.
As you see it has changed completely from the first test forum to the current.
 
Yeah but your showing us a "software" that anyone on here could make with a couple tutorials on hand. I suggest only telling us about your project / advertising link wise when you have a basic template to go with it, And maybe even a good design.
 
Back
Top Bottom