Topic: Parser include?

hi,
i have made my own portal system. I use this home made script for the news:

                <?php
    mysql_connect("localhost", "*******", "*********") or die("Kan geen verbinding maken: " . mysql_error());
    mysql_select_db("*********");
    
    // nieuwsophaalscript by frizzymedia
    $query    = 'SELECT * FROM forum_topics WHERE forum_id = 1 ORDER BY id DESC LIMIT 5';
    $gegevens = mysql_query($query)or die(mysql_error());
    if(mysql_num_rows($gegevens) == 0){
        echo'Er zijn nog geen nieuwe berichten';
    }
    else{
        while($data = mysql_fetch_row($gegevens)){
            // nu de 1e post gaan ophalen, ik ben niet zeker of dit werkt
            $query_post    =  'SELECT * FROM forum_posts WHERE topic_id = ' . $data[0] . ' ORDER BY id ASC LIMIT 1';
            $gegevens_post = mysql_query($query_post)or die(mysql_error());
            if(mysql_num_rows($gegevens_post) !== 0){
                $data_post = mysql_fetch_row($gegevens_post);
                echo '<h2>' . $data[2] . '<a href="../forum/viewtopic.php?id=' . $data[0] . '"> Klik hier...</a></h2></p>';
                
                echo '<p>';
                echo $data_post[5];
                echo $data_post[5];
                echo '</p>';
                
                echo '<p class="postmetadata">';
                echo '<span class="left">Geplaatst door: ' . $data[1] . '</span>
                      <span class="right">Laatste reactie door: ' . $data[6]  . '</span><br class="clear" />
                      </p>';
            }
            else{
                echo 'Er is iets fout gegaan'; 
            }
        }
    }
?>

and he get trhe news out a forum of me.. The problem is that i don't see the ubb codes, I don't know how i must include de parser in the file..
Can anyone tell it me or fix me a script for the news?

Sorry for my bad English I'm form Dutch.

Very thanks! Giel

2

Re: Parser include?

If you do a search, somewhere on here is a script that Bingiman and Quaker knocked up for the news index.

Re: Parser include?

I don;t can find it.. can you post the url?

4

Re: Parser include?

Here you go. smile

http://punbb.org/forums/viewtopic.php?id=16296

Re: Parser include?

Moved to modifications

Looking for a certain modification for your forum? Please take a look here before posting.