Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    Is there an easy way / how would I go about creating something that would allow visitors to my site to see all the latest comments across ALL of the comments in my plogger database, with a link to each comment? I have attempted to edit the feedback php file in the admin section to make it simple for use on a public page but my PHP knowledge is simply not good enough and I was just too swamped down with the code.

    Any help would, as always, be appreciated.

    Tom.
  2.  
    Yeah, okay, I sorted out the problem veyr simply. I realised I could just query the database as it is very easily and pull the latest comments from the comments table. It just needs something like this and can be included in any php page on ones site..

    <blockquote>
    < ?php
    //Options
    $username = "yourusername";
    $password = "yourpassword";
    $dbname = "yourdatabasename";
    $sitebase = "http://www.yourwebsite.com/gallery/index.php?level=picture&id=";

    $server = "localhost";

    //Connect to database
    mysql_connect($server, $username, $password) or die(mysql_error());
    mysql_select_db($dbname) or die(mysql_error());

    //Query comment table.
    $query = "SELECT * FROM plogger_comments ORDER BY date DESC LIMIT 20";
    $result = mysql_query($query) or die(mysql_error());

    //Loop Through Records And Show Various Details
    while($row = mysql_fetch_array($result)){

    //Format Date in desired Format Time
    $unixTime = strtotime($row['date']);

    //Display the results
    echo "<b><a href="".$sitebase.$row['parent_id']."">".date("D d M y, h:i a", $unixTime)."< /a >< /b >< br >";
    echo $row['comment'];
    echo "<br ><b>by ".$row['author']."</b>";
    echo "<br ><br>";
    }
    ?>
    </blockquote>

    Cheers,

    Tom.