Google Answers Logo
View Question
 
Q: Photo Gallery Image Resize c/o JOSELEON ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Photo Gallery Image Resize c/o JOSELEON
Category: Computers > Programming
Asked by: binarian-ga
List Price: $40.00
Posted: 26 May 2004 14:28 PDT
Expires: 25 Jun 2004 14:28 PDT
Question ID: 352367
I have uploaded you some FTP parameters. I have been working on a
gallery from a freeware gallery. I have incorporated the upload resize
functions into the gallery but am having a problem. everytime i upload
a picture it seems to take the place of the previous picture. i am
stumped by this. In the admin directory you can check out upload.asp >
upload2.asp > upload3.asp to check out where it all goes down. i also
need the same changes made to reupload.asp > reupload2.asp >
reupload3.asp for the edits.

The sort function seems to have become dissassociated while i added the image upload

Clarification of Question by binarian-ga on 26 May 2004 22:43 PDT
test url is binarian.com/photoalbum/

Request for Question Clarification by joseleon-ga on 28 May 2004 04:03 PDT
Hello, binarian:
  Sorry for not reply earlier, I have been sick several days, I'm
going to take a look and I will tell you something in the next days.

Thanks for count on me again.

Regards.

Clarification of Question by binarian-ga on 01 Jun 2004 09:06 PDT
awesome!

Request for Question Clarification by joseleon-ga on 03 Jun 2004 05:49 PDT
Hello, binarian:
  I have been checking the upload function and I think the problem is
in the "update" query you are performing, I mean, there is no "insert"
queries on the upload.asp file, so I think what you are doing
uploading new files is updating a single record, not inserting it in
the database.

Have you written that code? Please, tell me more about it so I can
continue working on it.

Regards.

Clarification of Question by binarian-ga on 07 Jun 2004 06:47 PDT
have u taken a look at it. i had updated that piece of code. the
problem still remains in the sort function. originally, after the
upload, the sort field coudl be set immediately after.

after i added the resize this doesnt seem to work and the sort does
not auto number itself anymore. it always sets itself as 0.

Also the sort should work so that if you have 2 of the same number it
would just put those pics one after another. right now it puts them
both in the same detail image page. set one pic with the same sort
number and check out the view gallery to see what i mean

Clarification of Question by binarian-ga on 09 Jun 2004 10:03 PDT
u there?

Request for Question Clarification by joseleon-ga on 10 Jun 2004 02:31 PDT
Hello, binarian:
As far as I can see, the problem lies in the upload2.asp, I mean:

-upload.asp uploads the image and updates the database with the
information for the new page. This works ok.

-But the sort order for the images is set on upload2.asp, there, you
request the last sort order and add 1 to it, that's ok, the hidden
field is working, but the problem is that the form fields for
upload2.asp are not filled with the image info you have just uploaded.
This form is filled with the first record on the table, checkout this
line:

Recordset1.Source = "SELECT * FROM photos"

-And instead call upload3.asp to "update" the record, you are calling
upload2.asp again to "insert" a new one, but with empty and incorrect
info.

Please, verify that info and tell me if I'm right, because that would
be needed to fix the script:
-Modify upload2.asp to get the last inserted record
-Modify upload2.asp to go to upload3.asp to update the sort order,
instead upload2.asp

Regards.

Clarification of Question by binarian-ga on 10 Jun 2004 08:45 PDT
everything you said sounds right on the money so ahead with those changes.
there is that other important issue im trying to get through after these problems.

when sorting images i want the ability to sort one image or move one
back or forward in the order without having to renumber however many
pix there are. can u think of a convenient way to do this?

For example in edit mode currently if i have 2 images set to order
number "2" they show up in the same entry when you click on their
thumnbnails. this i cant explain well... but just set 2 image to the
same sort number then View Gallery and check out the large version of
these images and you will see exactly what i mean.
I really need a solution to be able to order these pics. Thanks a bunch!
Answer  
Subject: Re: Photo Gallery Image Resize c/o JOSELEON
Answered By: joseleon-ga on 11 Jun 2004 07:53 PDT
Rated:5 out of 5 stars
 
Hello, binarian:
  I have fixed the scripts to work this way:
-upload.asp uploads the image and redirects to upload2.asp with the
appropiate parameters
-upload2.asp selects the image you have just uploaded, fills the
appropiate form fields and updates the image with the last sortorder +
1
-If you click continue you are redirected to upload3.asp, a page where
you can change the sortorder of all the images of that category

Please, tell me if this is the way you want it.

Regards.

Request for Answer Clarification by binarian-ga on 13 Jun 2004 21:55 PDT
it looks good but since you know what u did the reupload pages need
the same modifactions. currently when i tried to reupload i got a

Type mismatch: 'LBound' 

/photoalbum/admin/reupload.asp, line 177 

error. 

Also as i mentioned theres still a problem associated with the sort order.

This is from the last post but please try what i am mentioning so you
can see what needs fixing...
****

For example in edit mode currently if i have 2 images set to order
number "2" they show up in the same entry when you click on their
thumnbnails. this i cant explain well... but just set 2 image to the
same sort number then View Gallery and check out the large version of
these images and you will see exactly what i mean.
I really need a solution to be able to order these pics. Thanks a bunch!

******

other than that its coming along well!

Clarification of Answer by joseleon-ga on 14 Jun 2004 09:08 PDT
Hello, binarian:
  Have been checking where you call the reupload.asp sequence of files
and I cannot find it on the interface, if I call reupload.asp directly
I get a:
---- 
ADODB.Field error '800a0bcd' 

Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.

/photoalbum/admin/reupload.asp, line 279 
----
 Please, could you point me where is the access to the reupload.asp sequence?

Regards.

Request for Answer Clarification by binarian-ga on 15 Jun 2004 17:24 PDT
Go to the photo Admin option which is along the top.
Select a category and then choose "Edit" for the image you want to edit.

it takes you to edit.asp?photoid=theidofthepicture

you will see a link that says Re-Upload this image.

WHen i try to reupload is where i runinto the error.

Also the reordering issue i mentioned really needs to be adressed. its
very important that gets taken care of soon. Thanks!

Clarification of Answer by joseleon-ga on 16 Jun 2004 07:13 PDT
Hello, binarian:
  I have fixed the reupload problems, there were more than I expected:
-The LBound problem was caused because you included two MM_update
hidden fields on your form
-The redirection it was not properly formatted
-The reupload2.asp file wasn't finished

Basically, I thought it was the same task than the upload process and
it has been a lot more work.

In any case, please, explain better what problem you have with sort
order, it would be great if you post how the sort order "is" working
now and how the sort order "should" work. This way is easier for me to
fix it.

Regards.

Request for Answer Clarification by binarian-ga on 16 Jun 2004 07:37 PDT
excellent..

as for the sorting i touched upon it a couple of times but i think i
cna get more specific.

when sorting images i want the ability to sort one image or move one
back or forward in the order without having to renumber however many
pix there are. 
For example in edit mode currently if i have 2 images set to  sort number
number "2" they show up in the same entry when you click on their
thumnbnails. you have to see this for yourself... just set 2 images to the
same sort number from admin then View Gallery and check out the large
version of these images and you will see exactly what i mean.

The problem right now is if someone wants to swap images, every sort
number has to be manually updated and that is so messy.

I really need a solution to be able to order these pics conveniently.
Ideally, it would be best if instead of text fields for the sort
number as it is now, if the sort number for each image were in drop
down so the user could select where to order the image to and each
time it would auto submit onChange and the sort order was updated.
Currently it is buggy. Hope this helps! IF you think of a better or
more efficientl way feel free.

Request for Answer Clarification by binarian-ga on 16 Jun 2004 07:39 PDT
oh and once this has been wrapped up i will be tipping you! ^-^

Request for Answer Clarification by binarian-ga on 16 Jun 2004 07:43 PDT
as a note.. i dont know when this happened but the category admin and
the photo upload admin is no longer password protected. you can just
go to those pages without loggin in.

Clarification of Answer by joseleon-ga on 16 Jun 2004 07:45 PDT
Hello, binarian:
 Yes, I have removed the password protection from the pages I have
modified, I didn't have that password, don't worry, once everything is
finished, I will protect them again.

I'm going to check the best way to make sorting usable... ;-)

Regards.

Request for Answer Clarification by binarian-ga on 16 Jun 2004 09:00 PDT
in case u need it for other pages.. its just admin/admin

Clarification of Answer by joseleon-ga on 17 Jun 2004 09:44 PDT
Hello, binarian:
  I have finished the sortorder changes, I have added arrows to allow
easily reorganize photos in a category, please, check it out.

Regards.

Request for Answer Clarification by binarian-ga on 17 Jun 2004 12:23 PDT
well.. that is just cool! can you tell me what you did
programmatically? i would love to know for my own knowledge! if you
can implement this on the categories reorder area as well i would be
most obliged. payment + tip sent ^-^

Request for Answer Clarification by binarian-ga on 17 Jun 2004 12:49 PDT
just notice another thing >.<
on upload3.asp it gives the user the ability to resort right after
they upload but the changes you made arent implemented in this area.
thanks1

Request for Answer Clarification by binarian-ga on 18 Jun 2004 13:15 PDT
I overlooked something. can u add a mechanism so an image can be moved
ahead a large number of places? lets say you have an image in order
number 2 and u wanted to move it to order number 200. Thats 199
clicks! thank you!

Clarification of Answer by joseleon-ga on 21 Jun 2004 12:07 PDT
Hello, binarian:
  What I did to allow you reorder photos in a category is the following:
  
  -Read photos in their current sort order and store the IDs on an array
  
  -Take sorting parameters (photo id and direction (up/down))
  
  -Modify the array according the new order
  
  -Update all records to reflect the new order
  
  I suggest you to try to do it yourself with categories, it would be
very educative for you, if you need me, just open a new question.
  
  Regarding allow you to move an image a lot of positions, I suggest
you to use a combo to allow the user move an image to an specific
position.
  
  And regarding upload3.asp, you just have to copy sortorder.asp to
upload3.asp, are the same file.
  
Regards.
binarian-ga rated this answer:5 out of 5 stars and gave an additional tip of: $15.00
As usual, This Researcher Rocks!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy