Hello
I'd like to know if there is any way to edit the files which are linked to an album through the keyword.
I mean, if you have an album which contains only linked files, and you click on "Edit files", no file will appear in the editpics page.
My gallery: http://fotometeo.ame-web.org/ (http://fotometeo.ame-web.org/)
Thanks in advance!
One way would be edit each file separately via the "Edit file information" button below each picture on its intermediate-sized view (displayimage.php). Alternatively it should be possible to display linked files in editpics.php, but I haven't checked yet the needed effort.
Thank you very much for your reply André
I know that possibility exits, but the problem is that we are using the gallery mainly for running photo contests every three months, so everyone who participates uploads the photos to their own albums and, in case they want any of their photo to participate, they have to write the keyword of the contest album.
So they keep their photos in their own albums, but we have all the photos which participate in the contest album all together.
Then we check if the photos comply the requirements and edit them from the contest album in case there is anything incorrect.
We normally use the way you indicate for doing so, but it would be very much easier if the linked photos would appear when clicking in the "Edit files" button of the album.
Open editpics.php, find
$sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p " .
" INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a " .
" ON a.aid = p.aid " .
" WHERE p.aid = '$album_id' $owner_str" .
" ORDER BY p.pid DESC LIMIT $start, $count";
$result = cpg_db_query($sql);
and replace with
if (count($FORBIDDEN_SET_DATA) > 0) {
$forbidden_set_string = ' AND aid NOT IN (' . implode(', ', $FORBIDDEN_SET_DATA) . ')';
} else {
$forbidden_set_string = '';
}
if (!empty($ALBUM_DATA['keyword'])) {
$keyword = "OR (keywords like '%{$ALBUM_DATA['keyword']}%' $forbidden_set_string )";
} else {
$keyword = '';
}
$sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p " .
" INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a " .
" ON a.aid = p.aid " .
" WHERE p.aid = '$album_id' $owner_str $keyword" .
" ORDER BY p.pid DESC LIMIT $start, $count";
$result = cpg_db_query($sql);
$pic_count = mysql_num_rows($result);
Solved!
Thank you very much :)
Sounds like a good addition (with a config variable as we did for whether or not to use linked files in determining last update of album).. :)
Quote from: gmc on February 18, 2016, 01:14:40 PM
Sounds like a good addition (with a config variable as we did for whether or not to use linked files in determining last update of album).. :)
May you please indicate any thread about that subject?
Thanks
I think that post was designated for me and I already added it to my to-do list :)
Yep... was for Αndré - but nambroque might like the feature - since it sounds like they have albums with only linked files...
CPG has a config option to display the number of linked files in an album... but doesn't by default update the 'last uploaded' date if it was a linked file.
Here is the thread: http://forum.coppermine-gallery.net/index.php/topic,77021.0.html (http://forum.coppermine-gallery.net/index.php/topic,77021.0.html)
To use this (and other 'hidden' options we have added thru the life of CPG 1.5) easily, install Αndré's 'Hidden features' plugin. It provides the config panel, adds the database entries, and language strings needed. These will all be 'normal' options in CPG 1.6.
Here is the plugin thread: http://forum.coppermine-gallery.net/index.php/topic,77314.0.html (http://forum.coppermine-gallery.net/index.php/topic,77314.0.html)
Perhaps another extension to further integrate 'linked files'...
When viewing a category - and displaying meta albums like last uploaded in the thumbnail view - linked files are not included...
Perhaps a single config variable to regard linked files in all these areas (last update date, editpics, meta albums) and logic behind that to include those files...
The ability to link is a great feature - the option to more fully integrate those pics sounds even better...
Example:
http://greggallery.gmcdesign.com/index.php?cat=20 (http://greggallery.gmcdesign.com/index.php?cat=20)
Category has 2 albums - both with linked files added in late 2015... but scrolling down to the 'last additions' meta album shows pics from 2011... (Random ignores them as well - but less obvious...)
That would be great
At the moment linked files do not appear when clicking on 'top rated', 'last uploads', 'most viewed', etc.
So, if you are in a category and all the albums in it are containing only linked files, and you want to see the top rated etc. no file appears
As the initial subject of this post hass already been solved, I have moved the new question about linked files to a new thread (http://forum.coppermine-gallery.net/index.php/topic,78631.0.html)
I re-open this topic because of this matter:
When opening "Edit files" of an album which contains more files than the "number of files to display" you have at the top the option: "See next files", but this doesn't take into account the linked files.
So if you have an album which conteins no files, but with more than 100 linked files (that's the max. number of files to display) there is not the chance of editing more that 100 photos through the "Edit files" function.
I updated my above instructions. There's 1 additional line
$pic_count = mysql_num_rows($result);
below
$result = cpg_db_query($sql);
Thanks André, but I'm sorry I have add that line and nothing changed ::)
On the other hand, in the above instructions you say:
Quote from: Αndré on February 17, 2016, 03:50:52 PM
Open editpics.php, find
$sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p " .
" INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a " .
" ON a.aid = p.aid " .
" WHERE p.aid = '$album_id' $owner_str" .
" ORDER BY p.pid DESC LIMIT $start, $count";
$result = cpg_db_query($sql);
$pic_count = mysql_num_rows($result);
But in the original file of editpics.php the last line you mention does not appear, so I think you should modify that instruction and delete the last line, so it would be:
Quote from: Αndré on February 17, 2016, 03:50:52 PM
Open editpics.php, find
$sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p " .
" INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a " .
" ON a.aid = p.aid " .
" WHERE p.aid = '$album_id' $owner_str" .
" ORDER BY p.pid DESC LIMIT $start, $count";
$result = cpg_db_query($sql);
[/quote]
I updated my instructions. With the last modifications, do the number of files is displayed correctly or doesn't it change at all?
Quote from: Αndré on June 16, 2016, 05:25:37 PM
I updated my instructions. With the last modifications, do the number of files is displayed correctly or doesn't it change at all?
I confirm that the "See next files" option still does not appear.
Unfortunately you haven't answered my question:
Quote from: Αndré on June 16, 2016, 05:25:37 PM
With the last modifications, do the number of files is displayed correctly or doesn't it change at all?
Quote from: Αndré on July 04, 2016, 08:59:08 PM
Unfortunately you haven't answered my question:
The number of files was already displayed correctly when implementing your first instructions.
The problem I was talking about now is that the option of seeing more files does not appear, if the number of files is bigger than the number of files selected to be displayed.
Anyway, it is not so important, so I mark this topic as solved again.
Thanks