forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Miscellaneous => Topic started by: hobert on September 28, 2009, 05:42:58 pm
-
These small additions to the editpics.php file will automatically have Coppermine check the "Delete file" option of pictures that are missing the original image (using a file_exist statement) when you edit the album files. You can then click "Apply Modifications" to remove the coppermine data and files (including thumbs, normals, comments, etc.) like normal.
In editpics.php, after
$isgalleryicon_selected = ($CURRENT_PIC['galleryicon']) ? 'checked="checked" ':'';
$isgalleryicon_disabled = ($CURRENT_PIC['category'] < FIRST_USER_CAT) ? 'disabled="disabled" ':'';
add,
$checked= (file_exists("albums/".$CURRENT_PIC['filepath'].$CURRENT_PIC['filename'])) ? '' : 'checked';
A little bit later, modify this line:
<td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox" /><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
to
<td width="20%" align="center"><input type="checkbox" name="delete{$CURRENT_PIC['pid']}" id="delete{$CURRENT_PIC['pid']}" value="1" class="checkbox" $checked /><label for="delete{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['del_pic']}</label></td>
(added $checked variable).
-
Great -- this helped me a lot! Thank you!