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
It works exactly as you see it, you will see all the files from the user. Cannot remember why that ay as chosen though.
Is there a way to see only the uploaded files ?
Edward
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.
I suppose in a way that depends on whether we stick with the Flash uploader or go another route.
Please apply the following code changes and report if it works as expected.
1. Open upload.php, find
set_js_var('max_upl_size', $CONFIG['max_upl_size']);
and below, add
set_js_var('timestamp', time());
2. Open js/setup_swf_upload.js, find
window.location = js_vars.site_url + '/editpics.php?album=' + $("select[name='album']").val();
and replace with
window.location = js_vars.site_url + '/editpics.php?album=' + $("select[name='album']").val() + '&newer_than=' + js_vars.timestamp;
3. Open editpics.php, find
$result = cpg_db_query($sql . $owner_str);
and above, add
// 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
$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
$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
$form_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . $start . '&count=' . $count;
and replace with
$form_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . $start . '&count=' . $count . $newer_than;
find
<select onchange="if(this.options[this.selectedIndex].value) window.location.href='{$CPG_PHP_SELF}?album=$album_id$mode&start=$start&count='+this.options[this.selectedIndex].value;" name="count" class="listbox">
and replace with
<select onchange="if(this.options[this.selectedIndex].value) window.location.href='{$CPG_PHP_SELF}?album=$album_id$mode&start=$start&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).
Does the mod work as expected?
It does for me.
Committed changes in SVN revision 8323 for cpg1.5.x and cpg1.6.x.