Hi,
Added some small code to auto select the last album uploaded to.
In upload.php search for :
$sel_album = isset($_GET['album']) ? $_GET['album'] : 0;
Add below :
//if no album is preselected & user is logged in check dB for last picture upload and set dropdown var to found album
if (($sel_album == 0) && USER_ID) {
$result = cpg_db_query("SELECT aid FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = " . USER_ID . " ORDER BY pid DESC LIMIT 1");
if (mysql_num_rows($result)) {
$row = mysql_fetch_array($result);
$sel_album = $row['aid'];
}
mysql_free_result($result);
}
never coded any php before if there is something horrible here plz change / nuke :)
Works like a charm, tested on 1.4.2 :)
Glad I found this fix.
But I'm surprised that this feature/option has not been built into 1.4.
Joe
You can also change $_GET to be $_REQUEST - does not make harm ...
@joeboxer: this mod has been created after cpg1.4.x, so how could it possibly have gone into cpg1.4.x. There's no use ranting about missing features here anyway.
@tmcdos: as suggested on the other thread you started, it does make a difference what var you use. Please do not spread this piece of advice, as it is wrong.
Hello,
I have update my coppermine version from 1.4.14 to 1.4.18.
Before I used this very pratical "add-on" for automatic select album with multiple upload :
http://forum.coppermine-gallery.net/index.php/topic,25456.0.html (http://forum.coppermine-gallery.net/index.php/topic,25456.0.html)
But it's not working with the new version.
An idea ?
** Since this is not a plugin question your post is merged with the thread of the mod you are having a problem with.
Nobody know how make it ?
Why isn't this function in the new version? I think this should be useful, right?
I tried with cpg 1.4.18 but it does not work.
Quote from: Joachim Müller on December 03, 2006, 12:10:27 PM
this mod has been created after cpg1.4.x, so how could it possibly have gone into cpg1.4.x. There's no use ranting about missing features here anyway.
New features do not go into maintenance releases.