Does this new version of gallery (1.4) and gallery remote support the new "add to beginning of album" option that has been around since 1.3.5?
When 1.3.5 came out I set this option for my moblog album, but it did not work unless uploading with the web interface.
Posts: 3473
Moved to GR forum.
Posts: 1479
Good question. We'll look into this, thanks for reporting it. It's now tracked by this task.
Posts: 10
Yes, if add to beginning of album is enabled, gallery remote will add it to the beginning of the specified album. (Tested it on latest CVS, but the add-item hasn't been altered since 1.4)
Posts: 8
I am using fresh Gallery remote on Gallery 1.4 pl2 and altough i checked in ablums properties to add images at the beginning, images uploaded via Gallery remote are positioned at the end of the album.
Any ideas why?
Posts: 1378
I have tested the add images to the beginning and galley remote correctly uploads the photos to the beginning.. Have you tried manually uploading a photo direct via gallery?? If not please do, so you can confirm it is not a problem within the gallery install..
Posts: 8
Of course I tried, uploading directly via gallery ba "add photos" link uploads them correctly at the beginning of album.
Posts: 9
I have the same problem as well
Posts: 11
Same problem here as well :cry:
Posts: 1378
What version of Gallery remote are you all using?? and what version of Gallery?? I cannot reproduce this problem utilising 1.2B14 and 1.4.1 RC2, Gallery adds files directly to the begining
Posts: 93
I just tested this and I get the same thing. Using GR just downloaded and built out of cvs and gallery 1.4pl2
Posts: 8
I have written above versions that I am using. It is Gallery 1.4 pl2 and Gallery Remote 1.1.
Posts: 93
alright, I've tracked down what is causing this,
this isn't technically a gallery remote issue and it is fixed in gallery 1.4.1...
for those who care why, read on:
gallery_remote2.php calls the gallery function addPhoto(), this function is in the gallery/classes/album.php file. at the end of that function, just before the return, in gallery 1.4.1, it has this bit of code:
this is missing in 1.4 and adding it in DOES fix the problem...
joel
Posts: 11
Joel - while this does make sense, and is indeed missing from the addPhoto() function in 1.4-pl2, adding this bit of code before the return causes Gallery Remote to burp with:
Error: Server contacted, but Gallery not found at <insert address here>/gallery/gallery_remote2.php
Any other thoughts?
Posts: 93
are you adding the code in the albums.php file? or gallery_remote2.php file? it should go in the first...
this is what the new addPhoto, in albums.php, should look like with the 3 lines added(taken starting at line 673)
this causes no problems whatsoever for me and adds the picture to the beginning of the album. I can attach my albums.php if you want.
but, due to the way GR adds photos one at a time, if you're adding more than one image, the images end up in reverse order of what you'd probably expect. not sure how to fix this....
but I'd guess everything works properly with 1.4.1??? at least according to ozgreg anyway.
Posts: 1378
Yep works fine under 1.4.1 RC2.. Worth the upgrade maybe? 1.4.1 got an excellent image resizing features...
Posts: 8
Thank you very much.
This works now as it is supposed to for me.
Posts: 1479
Great! Thanks Joel for all the support.
I have opened a task to track your suggestion that GR should upload pictures in reverse order to albums that are set to add to beginning. Do you know how the web upload interface handles that?
Posts: 93
oh boy, I've really really got myself confused :roll: had a message typed saying web interface uploads in reverse order, then tested in another of my galleries, found it uploaded my 2 test pictures in proper order, forgot which gallery I modified with updated code from this thread, typed a message about how the web interface uploads in correct order, then decided to test with more than 2 pictures, and things got ended up in a really strange order. Finally realized that was the Gallery I modified :-? ...
Anyway... seems adding via the web interface also uploads in reverse order on an unmodified 1.4 gallery and my change suggested earlier causes GR to add the same way the web interface does in an unmodified install, but messes up the web interface...
so, if I have this sorted out in my mind, using GR with:
-unmodified gallery 1.4 leads to not uploading at beginning of album
-gallery1.4 modified with above code leads to GR uploading properly, web interface messed up
I'll upgrade one of my installs to 1.4.1 RC3 later and test there. And if it works properly, I don't think any changes will need to be made in GR...
joel
Posts: 93
alright, got 1.4.1 RC3 installed successfully and have tested uploading in there. Uploading with both the web interface and GR adds the files in reverse order of how they are specified when adding to beginning (even though thats not what I'd personally expect). So no need to change anything in GR...
For all those of you who upload(to gallery 1.4) with GR only, you can make the change specified above, however, if you use the webinterface and GR, one or the other won't work, depending on if you change albums.php or not.
But, for eveyone, I'd really recommend upgrading to gallery 1.4.1 when the final is released, as it includes lots of great new features(and GR and gallery webinterface both add photos correctly to the beginning of an album)
Posts: 1378
Hehe which explains why the feature was working fine for me as I was running the testing on 1.4.1 ;) and yes Gallery 1.4.1 is an excellent upgrade.. I love the concept of setting the image max size and I cannot wait until Gallery remote supports this feature!! (Hint Hint)