XP Publisher Wizard creating some weird directory names... XP Publisher Wizard creating some weird directory names...
 

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

XP Publisher Wizard creating some weird directory names...

Started by jeeplaw, October 27, 2003, 11:52:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jeeplaw

Well, after installing the reg file and using the wizard to upload 25 documents, each of those documents got put into its own folder name "wpw-cc, wpw-et,wpw-ee, etc, etc, etc". When I uploaded the pictures, the wizard asked me what directories they should go into..after specifying what directory, it just uploads them into their own folders in the main pics directory..any ideas?

jeeplaw


jasendorf

So THAT'S where those came from.  Yeah, I saw those too but didn't put two and two together.  I don't know why it does it though...
Read the Online DOCs,FAQ, and SEARCH the board BEFORE posting questions for help.

jeeplaw

Hmm..I wouldn't take issue with it, EXCEPT, it puts a folder in the main albums directory for EACH file uploaded. That's a pain if you're doing more than 1. And yes, I know that's what ftp is for, but this seems like a big oversight?

wormie_dk

Its to reduce number of images pr. folder.

I have modified my own xp_publish as follows:
line 756:

    if (USER_ID && !defined('SILLY_SAFE_MODE')) {
        if (USER_IS_ADMIN && ($category != (USER_ID + FIRST_USER_CAT))) {
            $filepath = 'wpw-' . $album;
        } else {
            $filepath = $CONFIG['userpics'] . (USER_ID + FIRST_USER_CAT);
        }
        $dest_dir = $CONFIG['fullpath'] . $filepath;

The thing changed is:  $filepath = 'wpw-' . $album;

Works fine on my host and creates dirs called wpw-albumnumber

jasendorf

Read the Online DOCs,FAQ, and SEARCH the board BEFORE posting questions for help.

jeeplaw

Thanks for the response. But I have a question. After putting this code in and modifying the xp_publish file, does the only thing that change is the name of the folders? I'm more concerned about the sheer number of folders that are put in the main directory. If I upload 10 pictures, I don't want 10 individual folders..I want them put into the categories they belong in. Any ideas?

Quote from: "wormie_dk"Its to reduce number of images pr. folder.

I have modified my own xp_publish as follows:
line 756:

    if (USER_ID && !defined('SILLY_SAFE_MODE')) {
        if (USER_IS_ADMIN && ($category != (USER_ID + FIRST_USER_CAT))) {
            $filepath = 'wpw-' . $album;
        } else {
            $filepath = $CONFIG['userpics'] . (USER_ID + FIRST_USER_CAT);
        }
        $dest_dir = $CONFIG['fullpath'] . $filepath;

The thing changed is:  $filepath = 'wpw-' . $album;

Works fine on my host and creates dirs called wpw-albumnumber

jasendorf

Should cut down the amount of directories immensely...

going from:
$hash = md5(time());
$filepath = 'wpw-' . substr($hash, 0, 2);

to:
$filepath = 'wpw-' . $album;
Should make a huge difference.  But it will also increase the possibliities of overwriting pictures possibly I think.  I'm not really sure what the purpose of that weird random number was all about...
Read the Online DOCs,FAQ, and SEARCH the board BEFORE posting questions for help.

wormie_dk

I don't think so as each album has its own unique number. If you upload photos with equal names coppermine adds ~1 or something to the filename...

mika2k3

Hi,

I've made the change on line 756 (xp_publish.php) but when i publish pictures via xp wizard, it always continues to create a lot of folders !

I've remove the entrie in the registry of my pc and reinstall ... but nothing !

Can someone tell me how to success ??

Thanks,
Michael.

Inigo

Quick question:

The Windows XP Publisher quit working on me when I tried to apply this modification (jasendorf's) in 1.1, to get rid of all the extra folders.  I upgraded to 1.2 to see if that would fix the issue, and it didn't.  I have modified the xp_publish back to its original form, but it still won't work.  I get an error in the publisher:
QuoteThe wizard encountered a problem while copying the files. A number of things can cause this problem.  For example, the Web server might be down, or you might have lost your internet connection.  

To try again, click Back.  If the problem keeps occurring, close this wizard and try again later.
I'm still on the network, so I know that's not the issue.  I ran ethereal on my pc while running the publisher to see if I could sniff the traffic an find my issue that way, but I can't see the error.  Here's the last bit of output from ethereal:

function window.onload() {
        window.external.SetHeaderText('the matasovsky photo album','images, thoughts, and recollections of our life');
        window.external.SetWizardButtons(true,true,false);
}
</script>
</body>
</html>

0

Any thoughts on how to go about troubleshooting this?  I tried looking for the xp_publish.log (after turning on debug mode) but there isn't one.

Anyone?  :?:

jasendorf

This mod works fine for me on both Win and Linux servers...  My guess is that 1) you didn't apply the modification correctly or 2) that there is now a weird registry problem on your client.

You will still get a number of new folders... those folders will be named wpw-(the number of the album you have put the picture in).


You could always change it so that you have the default wpw folder be just "wpw" by taking out the $album in the name of the directory.
Read the Online DOCs,FAQ, and SEARCH the board BEFORE posting questions for help.

wormie_dk

It could have something to do with safemode. Does the original xp_publish create folders with random names? Have you tried the original recently. Is albums chmodded correctly?

chetriya

Hi  I read through all you guys discussed regarding the issue about the too many folders being created. I am running into the same problme. I love this gallery however this one feature of making a folder for each picture is definitely a nuisance. Has anyone actually come up with agood way of creating albums folder with the name specified rather than wp or 1001 .  I know i can upload pic through the ftp but the ftp takes forever to upload especially because of my pic sizes. Also it seems like suchs ahassel to simply have album with the name specified and small file size. Coppermine gallery definietely needs work in making album folder area.
Anyways keep up the great work and may be in future release developers could improve in making the album easier.
thanks guys for any help you can provide. :D

Joachim Müller

as a gallery admin you're meant to always use ftp upload (resize the pics on your pc before uploading them - there's a load of tools available for this purpose); the xp-wizard is meant to be an add-on for "regular" users to make uploading easier, not for admins.

GauGau

ojohn

How can i make a custom size image?

You know at the end before upload it ask if you want to resize the images, But it only has three sizes how can i change one of them or add one or something.

jason

Quote from: "ojohn"How can i make a custom size image?

one suggestion (its how i do it) : use irfanview.  

you can resize as many pics as you want at once and it will save the resized ones in a specified folder (called batch conversion) so your originals are left alone.

once in the new folder (resized pics from irfanview), use the xp_publish tool but do not resize.  this way, you can specify any dimension (while maintaining aspect ratio) and also the exif info can be retained (an option in irfanview when batch converting).  ive struggled to find a way to resize and retain exif but was unable from windows xp publishing wizard.

another note, i notice from a post here that xp_publish was not an admin use intention but rather a standard user ease of use feature.  i must say, even as an admin it makes it real quick to upload and even create a new album right before the upload begins.  also, i have 1289 pics already from only 3 months of uploads and having the pics spread out in many folders seems to make alot of sense.

ok, my $0.02 is all used up here ;).
jason

Joachim Müller

just as a side-note: those who want their exif info to remain intact, although their favorite image maniplution tool on the desktop deletes it are recommended to use the free tool Exifer (postcard-ware), which allows you to back up your exif-info of a folder of pics and restore them after they have been removed or manipulated. Exifer comes for Windows 98/ME/NT/2K/XP (not 95!) in English and German and is, as mentioned, available for free:
www.exifer.friedemann.info

GauGau

jason

Quote from: "gaugau"Exifer (postcard-ware), which allows you to back up your exif-info of a folder of pics and restore them after they have been removed or manipulated.

that doesnt apply too well for xp_publish since the pics are randomized into many different folders, would require more work (so it seems).  while i proclaimed victory with irfanview, it shouldnt matter...point is that something other than windows publishing wizard needs to resize if exif data is to be retained simply.

clearly more than 1 way to skin this cat :wink:.
jason

zpeek

I install the "How can I display the name of the uploader with the picture info?" and its not working and I think the problem is that I'm using Coppermine Windows XP Web Publishing Wizard.  So is there anyway to make it work with the XP Web Publishing.

Link to mod:
http://coppermine.sourceforge.net/oldboard/viewtopic.php?t=1843