[fixed]: problem with resize tool. [fixed]: problem with resize tool.
 

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

[fixed]: problem with resize tool.

Started by allisonv7, February 24, 2004, 10:32:17 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

13th-angel

Hi there, this is my first post here.

Anywho, I am using Coppermine Photo Gallery 1.2.0 - RC2

and my problem is with the resize tool,

I recently uploaded a bunch of folder full of pics to the userpics directory, and then did a batch upload.  After all the files were uploaded I used the Resize picture utility and clicked on "Delete original sized pictures"

Now by this I thought it would delete the bigger versions and replace it with the resized ones, however when I go to check out the pictures, I can get the thumb nail but I can't see the actual resized medium picture.

I checked out the folders and the resizes are in there but it's like it's not redirecting the link to the pictures properly.  

anyway, heres a link to show you the problem

http://www.neo240sx.ca/coppermine/index.php

Im very new to this stuff!  Any help would be appriciated, thanks!

- Chris

Casper

I think the main reason for this is you have put your folders inside the userpics directory.  This is a no-no.  The userpics folder is for the use of coppermine only.  You should create your folders inside the albums folder, not in the albums/userpics.

You need to use coppermine to delete all the pics you put in the userpics folder (by ftp), then re-upload them into new directories.

also

Coppermine only creates intermediate size pics, if the full size is bigger than the intermediate setting.

On the pics I looked at, you have the thumb and the original still there, but no normal, ie, I could browse to;
albums/userpics/gallery/summer_2001/neomeet2k1-6.JPG
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.neo240sx.ca%2Fcoppermine%2Falbums%2Fuserpics%2Fgallery%2Fsummer_2001%2Fneomeet2k1-6.JPG&hash=590420401ddf59141c3ec851fcac22cab3188464)

and
albums/userpics/gallery/summer_2001/thumb_neomeet2k1-6.JPG
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.neo240sx.ca%2Fcoppermine%2Falbums%2Fuserpics%2Fgallery%2Fsummer_2001%2Fthumb_neomeet2k1-6.JPG&hash=d1f4a776146b8e5043860e1e977b6e43bd3b9e6f)

But not
albums/userpics/gallery/summer_2001/normal_neomeet2k1-6.JPG
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.neo240sx.ca%2Fcoppermine%2Falbums%2Fuserpics%2Fgallery%2Fsummer_2001%2Fnormal_neomeet2k1-6.JPG&hash=eca2cc5923e240e2236fbb207e129436eef1d128)
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

13th-angel

is coppermine suppose to make a "normal_" prefix for the actual pictures it uses?

I was going to say that coppermine probably deleted those files by accident when I used the resize picture utility.

Also, when I do a batch add pictures the only directory I have to access my pictures from that I uploaded is the 'userpics' folder which lead me to believe that I had to upload my pics to the userpics directory in the first place.  

So if I upload pics via FTP and want to do a batch add pics then how do I change the directory it accesses to add pictures?

Casper

One thing that needs to be added to the instructions is clear instructions for uploading by ftp, as this often occurs.

You should create new directories in the cpg_directory/albums/ folder, and chmod them to 755 or 777 (whichever works on your server).

You can even just upload the images directly in the folders they are in on your pc, keeping your structure.  Remember to chmod.

Now, when you open batch add, you will see your folders there, as it shows all folders inside the albums folder.

The userpics folder is used by cpg to put the pics uploaded by members, and should not be touched by anyone.  The program takes care of it.


@GauGau, I have just spent some time looking through the current docs, faq and readme, and was unable to find instructions for uploading by ftp.  If they are there, they are not easy to find, and it is no surprise that several users, which includes me when I first started, ftp into the userpics folder.

I think we need to get an ammendment into the instructions in the download package asap.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

13th-angel

ok cool, thanks for your help.

Oh and one last question... how do you "reset" coppermine, like wipe it clean, I think a screwed up big time....  :(

Casper

Probably no need to do that.

Using the delete/edit pics facility, delete the albums that you have already put pics in, or delete all the pics within those albums.  You can leave any pics that were uploaded using the cpg upload, if you know which are which.

This should clear your database of all pic info, and remove the thumbs etc from the server.

Now ftp your pics as described before, into the albums/your_new_folders.

Now batch add.  should be done.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

13th-angel

I know thats the process I should have done to delete the pictures however.. I went in and did a recursive delete on all the folders I added in the 'userpics' folder and didn't delete them from the datebase so now I can't remove them from coppermine because it says:

CRITICAL ERROR

Directory 'albums/userpics/MCO 2k3 Winter Solo/' is not writable, pictures can't be deleted

since I cleared out the FTP files without removing them from the DB first..  

Im such an idiot...  :cry:

Casper

Oops.

oh well, I hope you have access to your database tool, such as phpMyAdmin.

You will have to use this to remove all the info from the pictures table.  If any of the pics had comments etc, you will also have to delete these entries.

then you should be able to carry on.

if not, for a clean install, use your ftp to delete the include/install.lock file, and then re-install.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

13th-angel

OK after redoing everything Im back to where I started, here is the issue.

Once I've done a batch add picture to the album I want I assume that it makes a 'normal_' file which is the resized version of the file I uploaded.

When I go to the "resize picture" section, I want to delete the original sized photo and replace it with the sized version that the forums makes (which I assume is the 'normal_' pics)

However what happens is that after it does that on the album I select, I go to view the file by clicking on the thumbnail the new resized version does not appear.

So it seems that it deletes the resized photos and originals OR it's not making those resized picture.

Im pretty sure the feature was made to delete the larger sized original files and keep the resized versions however mind doesn't seem to want to do that... or yet again, Im doing something really stupid...

This time the files are now under "coppermine/albums/upload" (upload is the folder I created. I moved all the files from the "userpics" to this new folder.

13th-angel

BUMP!
Still need help with my previous question!

QuoteOK after redoing everything Im back to where I started, here is the issue.

Once I've done a batch add picture to the album I want I assume that it makes a 'normal_' file which is the resized version of the file I uploaded.

When I go to the "resize picture" section, I want to delete the original sized photo and replace it with the sized version that the forums makes (which I assume is the 'normal_' pics)

However what happens is that after it does that on the album I select, I go to view the file by clicking on the thumbnail the new resized version does not appear.

So it seems that it deletes the resized photos and originals OR it's not making those resized picture.

Im pretty sure the feature was made to delete the larger sized original files and keep the resized versions however mind doesn't seem to want to do that... or yet again, Im doing something really stupid...

This time the files are now under "coppermine/albums/upload" (upload is the folder I created. I moved all the files from the "userpics" to this new folder.

Casper

I just went to your site again, and most thumbs are not showing.  Looking at your source code, I see that they are still in the database as in the 'userpics' folder.

I think you need to clear your database of the 99 pics in the toronto motor show album, and start again.

As to your question about the batch add, when it deletes the original, it renames the smaller one as the original, ie, it takes off the 'normal_'.

This is normal.  Coppermine will put the original pic in the display, if no 'normal_' exists, but it needs the original(or one with that name) to work properly.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

allisonv7

1) I want to remove the full image size files, and I figured out how to do this, but I can't figure our how to remove the javascript link to the full size photo.  I tried a tip from another thread about replacing part of the displayimage.php file but when I do this I get error messages in my gallery.  Any other ideas?

2) I can't get the XP publish to work, when I open the file and click yes to approve a registry change I get an error saying that it's not a registry script and I can only import binary files into my registry.


Help :)


allison.

Casper

1.  If you use the resize pics utility to remove the original (the only way you should do it), the pop-up will not happen anyway, I beleive.

2.  Don't know the cause of this, but as the admin, you should use ftp to put pics up.  Remember to create folders (correctly chmod'd to 755 or 777) in the /albums folder, NOT the /albums/userpics folder.

And for the future, just one question per thread please  :wink:
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

allisonv7

When I use the resize pic utility I lose all the files except for the thumbnails.  Why is this? shouldn't it just delete the original?


allison.

Casper

Have you made any changes to the code?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

OK Allison,

This used to work fine, but I just tried it on my own site and it no longer works correctly.  I suspect that the 'normal_' images replaced the original, so they are there, with the original filename, but coppermine is not seeing them.

Now, what you need to do, is go back to the re-size pics tool, and use the first section, to rebuild the normal pics.  This will get your gallery working properly again, but you will have duplicate files (orig.jpg and normal_orig.jpg)
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

Hi Allison and 13th Angel,

I've merged these threads as they both deal with the same problem.

My apologies for taking a roundabout way of getting to this point  :oops: but I'm sure this used to work.

@GauGau/Tarique, as it has taken me a little while to realise here, when  the re-size utility is used to delete the original, coppermine can no longer display the re-named normal pic.  It is there, but coppermine is still looking for the 'normal_', and giving a little red X.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

FreeMail

Quote from: "allisonv7"When I use the resize pic utility I lose all the files except for the thumbnails.  Why is this? shouldn't it just delete the original?


allison.


happened to me also. :(  i only upload via the web, and i noticed it doesn't happen  not to all files (missing normal size pics.)

Casper

I have a theory, which I need you all to answer a question.

Those who have this happen, what is your setting in config, for
QuoteUse dimension ( width or height or Max aspect for thumbnail )*

Is it set at Height or Width.  I suspect this only happens if you are set to 'Height', and the pic is in landscape, ie it is wider than it is high.
This is due to this code;

if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
    } else {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
    }
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

allisonv7

QuoteNow, what you need to do, is go back to the re-size pics tool, and use the first section, to rebuild the normal pics. This will get your gallery working properly again, but you will have duplicate files (orig.jpg and normal_orig.jpg

I did this and it worked, but when I delete the originals it's still deleting the normal one.  My config is set to 'height' .  Is there any way this can be fixed? I will have both portrait and landscape pics in my gallery.  I don't mind as much the original file staying there, but I would like it so you can't click on the normal and view the original.  Is there a way to just remove the link?

Thanks,

Allison.