Topic: Last image uploaded patch

Since people are requesting it, i posted it tongue

1. Open index.php with Notepad.
2. Copy and paste the following code where do you want to display the message:

<?php
if ($database = sqlite_open('dataStorage.sqlite')) {
    $selectQuery = sqlite_query($database,"SELECT filename FROM dataStorage LIMIT 1");
        while($printData = sqlite_fetch_array($selectQuery, SQLITE_ASSOC)) {
        print "<br>Last image uploaded is <a href=\"".PATH_SCRIPT.DIR_IM.$printData['filename']."\">".$printData['filename']."</a> ";
        }
    sqlite_close($database);
} else {
    print "Ups! The addon can't print the data.";
} 
?>

3. Now under the line 232 put this:

<?php
if ($database = sqlite_open('dataStorage.sqlite')) {
    sqlite_query($database, "UPDATE dataStorage SET filename = '$name'", SQLITE_ASSOC);
    sqlite_close($database);
} else {
    // Here i do nothing :P
}
?>

4. Download the sqlite database (3kb) and extract it in the Chevereto's path.

Enjoy tongue

Last edited by gonzalarcon (2009-07-16 22:14:21)

Thumbs up

Re: Last image uploaded patch

Can you give any demo what is this

Thumbs up