Reggarding this thread (https://forum.coppermine-gallery.net/index.php/topic,78606.0.html).
After installing 1.6.21 it doesn´t work any more. :-[
If it would be of any help, one of the Admin Tools allows you to remove specific keywords. I assume people add a keyword for contest photos. After the contest, that keyword can be removed from everything with that Admin Tool.
Thanks for your reply, but that is not useful for me
What I need is linked files to appear when clicking on "Edit files" of an album which is empty, but contains files linked there via the keyword of the album
Andrè gave me a solution for 1.5, and it worked great:
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);
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);
But after installing 1.6 it doesn't work any more
I see you reverted to CPG 1.5.48.
You should be able to make the same modification to CPG 1.6.x in editpics.php at about line 753.
Just make the last line of the modification:
$pic_count = cpg_db_num_rows($result);
instead of:
$pic_count = mysql_num_rows($result);
I'm sorry we`re back to 1.5.48 again, as our gallery failed two days ago. It had never happened before, so we are concerned it may have happened due to any problem with the new version
We'll wait until updating to 1.6.x is mandatory, and then we'll try to change this again.
Thank you very much for your reply!
Quote from: nambroque on February 17, 2023, 08:27:52 AM
Thanks for your reply, but that is not useful for me
What I need is linked files to appear when clicking on "Edit files" of an album which is empty, but contains files linked there via the keyword of the album
Andrè gave me a solution for 1.5, and it worked great:
But after installing 1.6 it doesn't work any more
hello,
I am not a programmer, where do I need to copy and paste this code?