Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: MOD : Last album uploaded to auto select  (Read 20321 times)

0 Members and 1 Guest are viewing this topic.

atpeace

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
    • Some Dodgy Website
MOD : Last album uploaded to auto select
« on: December 23, 2005, 11:15:45 am »

Hi,

Added some small code to auto select the last album uploaded to.

In upload.php search for :

Code: [Select]
    $sel_album = isset($_GET['album']) ? $_GET['album'] : 0;
Add below :

Code: [Select]
    //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 :)
« Last Edit: December 23, 2005, 11:29:26 am by GauGau »
Logged

LilAngel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: MOD : Last album uploaded to auto select
« Reply #1 on: January 02, 2006, 03:33:24 pm »

Works like a charm, tested on 1.4.2 :)
Logged

joeboxer

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
    • RealAdventures
Re: MOD : Last album uploaded to auto select
« Reply #2 on: November 03, 2006, 05:21:35 am »

Glad I found this fix.

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

Joe

tmcdos

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: MOD : Last album uploaded to auto select
« Reply #3 on: December 02, 2006, 09:00:15 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: MOD : Last album uploaded to auto select
« Reply #4 on: December 03, 2006, 12:10:27 pm »

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

beber38

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
V1.4.18 Last album uploaded to auto select
« Reply #5 on: April 23, 2008, 02:24:47 pm »

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.
« Last Edit: April 23, 2008, 02:59:00 pm by Hein Traag »
Logged

beber38

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: MOD : Last album uploaded to auto select
« Reply #6 on: May 05, 2008, 02:19:51 pm »

Nobody know how make it ?
Logged

Iced Coffee

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 128
Re: MOD : Last album uploaded to auto select
« Reply #7 on: August 23, 2008, 10:39:48 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: MOD : Last album uploaded to auto select
« Reply #8 on: August 24, 2008, 04:32:09 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.