MOD : Last album uploaded to auto select MOD : Last album uploaded to auto select
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

MOD : Last album uploaded to auto select

Started by atpeace, December 23, 2005, 11:15:45 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

atpeace

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 :)

LilAngel


joeboxer

Glad I found this fix.

But I'm surprised that this feature/option has not been built into 1.4.

Joe

tmcdos

You can also change $_GET to be $_REQUEST - does not make harm ...

Joachim Müller

@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.

beber38

#5
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

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.

beber38


Iced Coffee

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.

Joachim Müller

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.