Discussion Forums  >  Uncategorized

Replies: 19    Views: 273

Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
05/02/11 08:55 PM (14 years ago)

Images Set Up, Don't know how to start.

So I have finished my app except for the images part but I don't know how to even start or set up. I want to have galleries of events that can be uploaded instantly from either a phone or online to the app. 1. Is the best solution uploading them first to my server or use a service like flickr? 2. Also if I want a gallery just for the users to upload would I also use the same solution? 3. When I upload my pictures will they resize automatically or do I have to do it? 4. Is there any video tutorials available anywhere on how to do this?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/02/11 10:49 PM (14 years ago)
No video yet but we hope to get one done. Images are tough because of the back-end complexities. Folders, uploads, directories, ugh! I'm sure you could figure it out but it is a nerdy thing and is best tackled by somebody that understands your server and it's configuration. Have you seeen the sample script in the Image Uploader screen? This is about as much explaining as we can muster and is totally understandable for somebody that has some backend knowledge. If you're unable to understand that I'm not sure what the best advice is aside from contacting the person that manages your site? Videos may help but would never be able to cover your server setup. IN other words, you're going to have to figure out how to put files on your server and I'm not sure a video we make could help you with that? Maybe though. We'll try to get one done.
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/03/11 04:45 AM (14 years ago)
Would flickr be a better solution for me if I am trying to have my pictures uploaded instantly even if I'm not near a computer to upload to my server?
 
TheHoogler
I hate code!
Profile
Posts: 152
Reg: Feb 10, 2011
Anchorage, AK
1,520
like
05/03/11 09:32 AM (14 years ago)
@Abir I've found that Flickr works well. With the help of Phaques, we were able to develop a URL that would lead to my photostream. I'm going to submit it here, minus my ID #s, and we'll see if it works for you? You'll need to get a flickr API key, and stock some photos for testing. Otherwise, easy peasy. This link would take users to your main photostream. You'd have to tweak it to lead to galleries, and I'm not entirely sure how to do that. On Flikr, users can only update by email to the main photostream, so, if you only want to make say, 5 galleries, maybe you could make 5 accounts? (I have hundreds of potential galleries, so I gave up on the idea). Maybe someone with more experience can chime in. I'm really interested to see if this cookiecutter will work for you. Let us know! http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=YOURAPIKEY&user_id=YOURFULLUSERID&per_page=25&format=json
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/03/11 10:04 AM (14 years ago)
Is flickr the only way to do this? I want my users to be able to upload their pictures but not to my server.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/03/11 11:58 AM (14 years ago)
If you want users to be able to upload pictures but NOT to your server, you're also saying you need a service to both HOST the images and allow upload. Flickr's your best bet.
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/03/11 07:54 PM (14 years ago)
So I kinda figured out how to have users upload to my server but haven't tried it. For my other galleries I think I can write the url individually for each picture from my server but is there a size that will make the picture view better on the phone? also is there another quicker way other than do it individually?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/03/11 10:11 PM (14 years ago)
Take some time to figure out how to power your Image Gallery from a dataURL served up by your website. Entering image URL's one-by-one is super painful. It goes like this: a) Create an Image Gallery screen (don't add any images manually in the control panel) b) Create a folder on your site to hold all the images and a .PHP script to output the JSON data for the mobile phone (this data lists all the images) c) enter the dataURL in the Image Gallery to point to your script in your images folder on your site. There are some example scripts in the gallery and image uploader screens.
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/04/11 09:08 AM (14 years ago)
What is the ideal size and resolution for the images I want to have in my gallery?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/04/11 11:29 PM (14 years ago)
iPhone - 320 x 480, iPad 768 x 1024. The images scale / zoom so it does't matter much.
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/08/11 10:12 PM (14 years ago)
Ok so I finally tried to set up my image gallery and this is the error i get Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home1/akisstor/public_html/abirmag/app/photos/beyondthemusic2011/imagegallery.php on line 45 Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home1/akisstor/public_html/abirmag/app/photos/beyondthemusic2011/imagegallery.php on line 45
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/09/11 02:17 AM (14 years ago)
That's strange. Do you have funky characters in the image data? Like ampersands, quotation marks, or other non alpha-numeric data? I can't imagine a file name (image name) or an image URL containing this but how knows? If you post the dataURL to your image feed we can look at it. You could also use this cool tool: http://www.jsonlint.com/ and make sure your JSON data is valid.
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/09/11 10:03 AM (14 years ago)
some of my pictures have names such as img0809-4 would that affect the script? Also just so that I understand correctly. I upload my images on my server and the php script provided in the same folder and the script will do the rest as long as I direct the script to the correct folder in my server? or do I have to add each image individually in the script in order for it to work?
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
05/09/11 10:39 AM (14 years ago)
Dashes are not generally good syntax to use, as it can create conflicts. You should use the _ instead of a -
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/09/11 11:14 AM (14 years ago)
http://abirmag.com/app/photos/beyondthemusic2011/ thats where the images are located and I removed the dashes but continue to get the same error
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
05/09/11 11:25 AM (14 years ago)
Your issue is somewhere in the php script or you haven't changed the access permissions to the folder on your server. Did you run the test script in the folder on your server?
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/09/11 11:34 AM (14 years ago)
I don't believe I ran the test script, where can I locate this so that I can test it?
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
05/09/11 12:07 PM (14 years ago)
On the screen for uploading -Image Uploader there is towards the bottom- Uploading to your own website is not difficult if you have some basic web-programming skills. The idea is that after the custom processing script on your website is done saving the image, it prints a value that is returned to the mobile app. Save this sample PHP image upload / output script as a .PHP file on your server to test your configuration. Download and place it in your destination folder and then type in the url and you should get a upload option and try to upload a sample image.
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/09/11 12:16 PM (14 years ago)
 
Abir Studios
Lost but trying
Profile
Posts: 33
Reg: Apr 20, 2011
SLC, Utah
2,480
like
05/09/11 02:50 PM (14 years ago)
ok so after trying the jsonhint site and still not finding a solution I remember reading about a script error on these forums and it turns out to be the same error I had. I found the solution under the topic Gallery Sample Script Error - easy fix. The sample script provided has a small error which was causing my error message.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.