Remove photo in Album, but not delete in database Remove photo in Album, but not delete in database
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Remove photo in Album, but not delete in database

Started by cgc0202, June 06, 2006, 07:49:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cgc0202

Hi,

Reading a different thread awhile back, I have decided to adopt the decoupling of the "pics foldder" so that the pics were kept separate from (and outside of) the Coppermine gallery itself.  In effect, the usual "Albums", and the subfolders in CPG is not used for photo storage.  This works and one of its advantages is that it is possible  (and much easier) to use the same photos in multiple galleries (this is not the same as multialbums).  [There might be disadvantages and I would be very interested to know.]

There is a catch however.  Some of the  master pics directories have "hundreds or thousands" of photos.  Thus, sometimes I miss "unchecking" some photos taken from a specific  master directory  during the batch upload process into a defined album. 

Deleting the "incorrect photo" in a specific album would also delete the photo (and other derivative photos -- thumbs, minis and intermediate photos) in the master pics directory.  A process that will affect albums in other CPG galleries where the aforementioned photo has been linked. 

To avoid this, what I do right now is to move the  "incorrect photo" to a private album within a gallery that is viewable only by the Admin.

A better solution would  be a "Remove" from Album feature rather than "Delete" from album feature that will not end up deleting the photo (and its derivative photos) in the primary pics directory.  Is this possible with existing features? 

Thanks.

cgc0202

N.B.

I have not found any discussion on this topic in the Documentation (using remove to find the topic) nor found any in the Forum (using various Search keywords).

Paver

Strangely enough, I remember reading a recent post with such code.  I tried probably the same search terms you used to no success, but then I remembered that the "unlink" command is used to delete a file, so I searched for that, sorted by most recent first, and came up with this topic: http://forum.coppermine-gallery.net/index.php?topic=31895.0.  Maybe that will do what you want.

I do understand what you want to do, and I have similar thoughts for my own gallery, although it's not nearly as large as yours.

cgc0202

Quote from: Paver on June 06, 2006, 08:11:31 AM
Strangely enough, I remember reading a recent post with such code.  I tried probably the same search terms you used to no success, but then I remembered that the "unlink" command is used to delete a file, so I searched for that, sorted by most recent first, and came up with this topic: http://forum.coppermine-gallery.net/index.php?topic=31895.0.  Maybe that will do what you want.

I do understand what you want to do, and I have similar thoughts for my own gallery, although it's not nearly as large as yours.

Thanks Paver,

What wooff suggested is a good start but what I have in mind may be more complicated in some sense.  Wooff stated:

Quote from: wooff on May 25, 2006, 09:31:20 PM
Hi,
I change the code to prevent deleting of "original" images files. Now, when you want to delete albums or files. It will delete only: thumbnails, reduce size, comments, (album). The original file will stay untoched.

For the "multigallery", it would be best if  the thumbnails or intermediate sizes remain untouched also.  I will post this comment also in wooff's thread.  Perhaps he can change his script further. 

If wooff's revised script is used, the thumbnails and intermediate sizes are deleted, and this will render albums (in the  multigalleries) that linked the photo that was "deleted" to have "blank thumbnail" link.  Would using the Admin tools and the feature  to "Rebuild thumbnails and resized photos" reverse the presence of  "blank thumbnail" link?  If the answer is affirmative, wooff's script is better than complete deletion of the photos. 

The other consideration in regard "wooff's script revision" is that there are instances when there is a legitimate use when the "full" delete function, i.e., actually deleting all the original and derivative photos to be deleted in the master photos directories.

The ideal situation is for both "remove" and the "delete" features to co-exist as separate but distinct features.

Quote from: Paver on June 06, 2006, 08:11:31 AM
...I remembered that the "unlink" command is used to delete a file, ...

Is there an actual "unlink" command in CPG?

Thanks again Paver.

cgc0202

Paver

A quick reply for now: "unlink" is a PHP command, not a Coppermine one. 

Yes, the admin tools lets you re-create the thumbnails & intermediate images if they are missing.  For example, if you have intermediate images OFF on the config panel, and then decide to use them, you can use the admin tools to create the intermediate images.  Or if you want to change the size of the intermediate or thumbnails, you can delete the current ones and use the admin tools to re-create them at the new size.

cgc0202

Quote from: Paver on June 07, 2006, 07:15:15 AM
Yes, the admin tools lets you re-create the thumbnails & intermediate images if they are missing.  For example, if you have intermediate images OFF on the config panel, and then decide to use them, you can use the admin tools to create the intermediate images.  Or if you want to change the size of the intermediate or thumbnails, you can delete the current ones and use the admin tools to re-create them at the new size.

Yeah, that is what I do now.  This additional step will not be needed if the thumbnails and other intermediate photos are not also deleted in the wooff's script.

cgc0202

Paver

In general, it's best to avoid hacks.  They are very useful for specific purposes, but for larger functions and for future upgradability (is that a word?), plugins are the way to go. 

If you are not able to write a plugin yourself, supporters may suggest things here, but there's no guarantee when that will be.  I myself have a few projects I need to address before I can even think of any larger projects like this.

Most of your questions so far have been very similar to projects I have planned in the future, probably because we are both dealing with fairly large photo archives.  (And yes, I have received your private message from the other thread, but have not found enough time yet.  I will of course respond to it on the other thread.)

cgc0202

Thanks Paver,

You are correct, of course.  There are many mods that I am interested with (and are bookmarking for further analysis), but have not integrated them so far, because I am unsure how these various mods would interact -- especially in the more complex "multigallery" that I am leaning on.  As we were discussing also in the other thread, I am unsure whether unexpected interactions of these multiple mods, when added may be affecting the speed of photo presentation in each gallery.  Speed is paramount.

The multigallery feature itself, that I have adapted for now, has been resorted to mainly because some existing features of CPG v1.4x are not practical in very large archives.  On the whole however, for most types of simple galleries that most users use, for example, family galleries, I found the existing CPG to be more than sufficient.

I am glad that you are dealing with issues related with large archives.  Thus, siince you are part of the development team, most likely some of the features that are more relevant to large archives, and "multigalleries" may be addressed in future versions of CPG, such as v1.5. 

Since I have no scripting background, I am expounding these issues mainly to emphasize features that I think may be useful for large archives and multigalleries and bring it to the attention of development teams, like you who may be interested with similar issues.  Many of my initial posts for example were not properly understood because I might not have explained them properly, and also because I have not emphasized that they are more useful for large archives and multigalleries but most likely impractical and cumbersome for smaller photogalleries.

cgc0202

Paver

I think we've gone off-topic of this thread now. 

For support threads, it's useful to stick to the issue at hand so it can be clearly discussed and resolved (in some way).

Discussing peripheral issues is often helpful to give the motivation for a support question, but if these peripheral issues are meant for such things as "Feature Requests", then it might be more useful to post them there.

cgc0202

Quote from: Paver on June 07, 2006, 09:13:54 AM
I think we've gone off-topic of this thread now. 

For support threads, it's useful to stick to the issue at hand so it can be clearly discussed and resolved (in some way).

Discussing peripheral issues is often helpful to give the motivation for a support question, but if these peripheral issues are meant for such things as "Feature Requests", then it might be more useful to post them there.

Sorry Paver,

I might not have written the previous post clearly.  I was just trying relate  how the feature "Remove photo in Album, but not delete in database" is related to other relevant features I have posted in the past. They were not considered but I will not post another another "Feature Request".

cgc0202


brklynjib

Ok, heres my problem. I have a gallery.. with many albums in it.. i add to it weekly.

Problem is when i upload the pictures to the wesbite.. it takes about 5-8 minutes for alll of the pictures to appear on the screen and these are pictures from all of the albums that i already have on the site.

Any idea how to avoid this issue? It takes way to long to load pictures that i dont need, i only want to load pictures that i just recently batch added using bimp lite.

I batch add them, then when i click on uploads on the coppermine page, and click on ok, all of the pictures that are on the site (thousands) are uploaded on the screen, which i dont need or want, i only want the most recent batch uploaded pics to load.

I dont know if by deleting them they will dissapear in the albums, i dont want that. Any idea?

brklynjib@aol.com

thanxm, james

brklynjib

I have a gallery.. with many albus in it.. i add to it weekly.

Problem is when i upload the pictures to the wesbite.. it takes about 5-8 minutes for alll of the pictures to appear on the screen and these are pictures from all of the albums that i already have on the site.

Any idea how to avoid this issue? It takes way to long to load pictures that i dont need, i only want to load pictures that i just recently batch added using bimp lite.

I batch add them, then when i click on uploads on the coppermine page, and click on ok, all of the pictures that are on the site (thousands) are uploaded on the screen, which i dont need or want, i only want the most recent batch uploaded pics to load.

I dont know if by deleting them they will dissapear in the albums, i dont want that. Any idea?

brklynjib@aol.com

thanxm, james

Joachim Müller

There's no support by email, so there's no reason to post your email address. Nobody except spammers will send you emails. You shouldn't try to hijack this thread, but start your own.

brklynjib

ive never been on here before, i figured it would be easier for someone to just email me a remedy if they had one. I guess ill stick to the thread... can anyone help me out? any idea what i can do to fix the issue?

thank you

James