Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Remove photo in Album, but not delete in database  (Read 10158 times)

0 Members and 1 Guest are viewing this topic.

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Remove photo in Album, but not delete in database
« on: June 06, 2006, 07:49:50 am »

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).
« Last Edit: June 06, 2006, 07:55:36 am by cgc0202 »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Remove photo in Album, but not delete in database
« Reply #1 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.
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Remove photo in Album, but not delete in database
« Reply #2 on: June 07, 2006, 05:28:29 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:

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.

...I remembered that the "unlink" command is used to delete a file, ...

Is there an actual "unlink" command in CPG?

Thanks again Paver.

cgc0202
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Remove photo in Album, but not delete in database
« Reply #3 on: June 07, 2006, 07:15:15 am »

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.
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Remove photo in Album, but not delete in database
« Reply #4 on: June 07, 2006, 07:46:33 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
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Remove photo in Album, but not delete in database
« Reply #5 on: June 07, 2006, 08:10:08 am »

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.)
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Large archives and multigalleries
« Reply #6 on: June 07, 2006, 08:51:54 am »

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
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Remove photo in Album, but not delete in database
« Reply #7 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.
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Remove photo in Album, but not delete in database
« Reply #8 on: June 07, 2006, 11:12:53 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

Logged

brklynjib

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Can someone help me with this problem?
« Reply #9 on: November 02, 2006, 01:38:04 am »

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
Logged

brklynjib

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Remove photo in Album, but not delete in database
« Reply #10 on: November 02, 2006, 01:38:36 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Remove photo in Album, but not delete in database
« Reply #11 on: November 02, 2006, 07:53:01 am »

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.
Logged

brklynjib

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Remove photo in Album, but not delete in database
« Reply #12 on: November 03, 2006, 06:16:16 pm »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.