forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upload => Topic started by: altenae on October 29, 2011, 08:37:20 pm

Title: Details about the uploaded files ??
Post by: altenae on October 29, 2011, 08:37:20 pm
The manual says:

You'll be sent to a screen where you can enter details about the uploaded files. After filling in, submit that form using the "Apply changes" button at the bottom of that form.

I would expect to see only the uploaded files.
However I (and others not admin) see al there files for that Album.

Question is this how it suppose to work ?

Edward
 
Title: Re: Details about the uploaded files ??
Post by: Phill Luckhurst on October 30, 2011, 01:04:08 am
It works exactly as you see it, you will see all the files from the user. Cannot remember why that ay as chosen though.
Title: Re: Details about the uploaded files ??
Post by: altenae on October 30, 2011, 08:40:43 am
Is there a way to see only the uploaded files ?

Edward
Title: Re: Details about the uploaded files ??
Post by: Αndré on November 03, 2011, 04:11:14 pm
Coppermine doesn't store the upload queue, so it's not possible to display only the files you just uploaded as-is.

It should be possible to submit the timestamp of the upload form initialization and just display files with a later timestamp. This might be a good (configurable) addition to the next Coppermine release.


I'm currently short of time, so I cannot create the solution yet. Please reply to this thread so I don't miss this thread.
Title: Re: Details about the uploaded files ??
Post by: Phill Luckhurst on November 03, 2011, 04:48:58 pm
I suppose in a way that depends on whether we stick with the Flash uploader or go another route.
Title: Re: Details about the uploaded files ??
Post by: Αndré on November 17, 2011, 05:04:26 pm
Please apply the following code changes and report if it works as expected.

1. Open upload.php, find
Code: [Select]
set_js_var('max_upl_size', $CONFIG['max_upl_size']);and below, add
Code: [Select]
set_js_var('timestamp', time());

2. Open js/setup_swf_upload.js, find
Code: [Select]
window.location = js_vars.site_url + '/editpics.php?album=' + $("select[name='album']").val();and replace with
Code: [Select]
window.location = js_vars.site_url + '/editpics.php?album=' + $("select[name='album']").val() + '&newer_than=' + js_vars.timestamp;

3. Open editpics.php, find
Code: [Select]
$result = cpg_db_query($sql . $owner_str);and above, add
Code: [Select]
    // Display only the files from the last queue after flash upload
    if ($superCage->get->keyExists('newer_than')) {
        $owner_str .= " AND ctime > '".$superCage->get->getInt('newer_than')."'";
    }

find
Code: [Select]
$next_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . ($start + $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '');
$prev_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . max(0, $start - $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '');
and replace with
Code: [Select]
$newer_than = $superCage->get->keyExists('newer_than') ? "&newer_than=".$superCage->get->getInt('newer_than') : '';

$next_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . ($start + $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '') . $newer_than;
$prev_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . max(0, $start - $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '') . $newer_than;

find
Code: [Select]
$form_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . $start . '&count=' . $count;and replace with
Code: [Select]
$form_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . $start . '&count=' . $count . $newer_than;
find
Code: [Select]
<select onchange="if(this.options[this.selectedIndex].value) window.location.href='{$CPG_PHP_SELF}?album=$album_id$mode&amp;start=$start&amp;count='+this.options[this.selectedIndex].value;"  name="count" class="listbox">and replace with
Code: [Select]
<select onchange="if(this.options[this.selectedIndex].value) window.location.href='{$CPG_PHP_SELF}?album=$album_id$mode&amp;start=$start&amp;count='+this.options[this.selectedIndex].value+'$newer_than'"  name="count" class="listbox">

Imo we should add this feature to the core code if it works as expected (even to the cpg1.5.x branch).
Title: Re: Details about the uploaded files ??
Post by: Αndré on January 31, 2012, 09:22:07 am
Does the mod work as expected?
Title: Re: Details about the uploaded files ??
Post by: Phill Luckhurst on February 01, 2012, 06:40:49 pm
It does for me.
Title: Re: Details about the uploaded files ??
Post by: Αndré on March 08, 2012, 04:39:30 pm
Committed changes in SVN revision 8323 for cpg1.5.x and cpg1.6.x.