Support > cpg1.6 miscellaneous
Editing linked files
nambroque:
Reggarding this thread.
After installing 1.6.21 it doesn´t work any more. :-[
ron4mac:
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.
nambroque:
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
--- Code: --- $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);
--- End code ---
and replace with
--- Code: --- 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);
--- End code ---
--- End quote ---
But after installing 1.6 it doesn't work any more
ron4mac:
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:
--- Code: ---$pic_count = cpg_db_num_rows($result);
--- End code ---
instead of:
--- Code: ---$pic_count = mysql_num_rows($result);
--- End code ---
nambroque:
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!
Navigation
[0] Message Index
[#] Next page
Go to full version