Discussion Forums  >  Uncategorized

Replies: 48    Views: 515

Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
05/04/11 12:43 AM (12 years ago)

Upload images - options?

Hi, Is it possible to add a few textfields with the image upload?
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/04/11 06:35 PM (12 years ago)
I really need a textfield when user upload the image with it. How possible to do it?
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/04/11 09:54 PM (12 years ago)
Actually 2 textfields - one title of the image another is a textarea that will descript the image a little bit. Anyone know what I can do?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/04/11 11:47 PM (12 years ago)
You could use a Flickr photo gallery as the feed for the Image Gallery. Then, you could allow users to add to the Gallery using the Email Image option. Flickr accepts images in emails. This approach would allow users to enter descriptions for the images they send to your Flickr gallery. This would get you the text / info but the Image Gallery doens't display it. We are workign on allowing Title / Description info the Gallery but it's not complete.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/04/11 11:50 PM (12 years ago)
I see... the thing is that I need to make the uploaded image along with the description to do some programming and display on client's website. The idea is that user use their iphone to upload images then, their website will display that photo along with a title / description. Flickr may not be the best option. Email may make a bit more sense but I think uploading it without using email is the best way to do it. How possible to create a form and allow image upload in buzztouch or using HTML page?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/05/11 01:38 AM (12 years ago)
HTML's not going to work, none of the mobile phones have html/file upload capability. So... I'm thinking how the user may enter the title and the description. If you have the upload screen working, and you are getting the images OK, it's a matter of gathering this info. from the user. If you look at BT_screen_imageUpload.m you'll see where all the variables are being 'posted' to the upload server. Adding title and description variables here is easy. But, you still don't have a way to gather the info from the user. Are you capable of creating a pop-up or some other kind of view to ask the user for this input? We could do it hear but not for several days. I would do it like this: a) In the showOptions method (BT_screen_imageUpload.m), I would add a button to 'add description' b) This button would load a new screen with title / description boxes, along with 'save' Save button would return to previos screen c) Upload would post these values to server for PHP to save. Let us know if you can work this out or if you need us to figure out a way to get it in an update.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/05/11 01:51 AM (12 years ago)
Interesting. Thanks David. I'll try to do it in Xcode and see if I can make things to work. Can you point me to where I can do the new screen with title / description boxes, along with 'save' Save button would return to previos screen ? Any tutorial I can quickly make it in ObjectiveC? Thanks so much David!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/05/11 09:30 AM (12 years ago)
I don't know of a 'quick' way to do this. And, it would probably take longer to write a tutorial, or describe the process than it would to just make the new screen and the necessary connections to the upload process. Nudge this post in a few days if you don't see a reply - I'll get something worked out and added to the control panel.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/08/11 06:46 PM (12 years ago)
Thanks so much David!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/09/11 02:33 AM (12 years ago)
@ Elsa: Trying to get this included in the upcoming release on Tuesday night. Cross your fingers ;-)
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/09/11 02:37 AM (12 years ago)
Really wish we could treat you a beer, or something!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/09/11 02:39 AM (12 years ago)
Smile. Someday we'll pop some together at a giant BT party or something? All good in Monterey.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/09/11 02:41 AM (12 years ago)
David, I must say, you are one of the nicest person I met on internet :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/09/11 02:44 AM (12 years ago)
It's a bit internet....lots of nice folks...problem is, most are too busy on Facebook! Laughs. g-night.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/10/11 11:03 PM (12 years ago)
David, is it being updated today? :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/11/11 03:26 AM (12 years ago)
@ Elsa: The new download is available and does include a way to add an image title. Title + Description will need to go in the same entry box. I realize you wanted title and description seperate but this isn't consistent with some other plans we have so title is added but no description. Hopefully you can make use of this.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 03:30 AM (12 years ago)
I see. How do I get the text-box? :)
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 04:06 AM (12 years ago)
David, I think I see there is Image Caption in the ImageUploader.m I am guessing that it will have a buttone called Add image caption on the screen. The next question i want to ask is that how do I test this as I can't get the app into my phone yet ? The simulator just shows No photos when I try to upload. Is getting a developer license and upload to my phone - the only way to test the uploading function? Thanks!
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 04:14 AM (12 years ago)
I got it! Just using mobile safari and save some images, it will be in the photo gallery! However, the image caption textbox is covered by the navigator on top (with the back button). Anything I can do the fix it?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/11/11 09:01 AM (12 years ago)
Image caption covered by navigation bar - hmm... Check to make sure the navigation bar is not set to 'transparent' in the Advanced Settings of the Image Gallery? It should allow this but this will help determine the issue. If the navigation bar is 'transparent' the content will be under it. In this case, the text-entry box will be under it.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 05:32 PM (12 years ago)
I changed it to : Hide Navigator bar However, please check the screenshot for Add image caption. It's up too high.. http://imageshack.us/photo/my-images/29/screenshot20110512at125.png/
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/11/11 10:35 PM (12 years ago)
Yea, I see that and we do need to adjust it. But, what I meant was 'unhide' the navigation bar and make it solid and not transparent. See what happens, I bet it works ;-) I'll look into the problem in the picture though, you should be able to hide the navigation bar and status bar without causing a problem.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 11:29 PM (12 years ago)
I tired unhide the navigation bar (Always there). And it covers the textfield, the textfield didn't move as same as the hidden navigation bar. Thanks David :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/11/11 11:34 PM (12 years ago)
I see. OK, what is the name of the app? I'll download it and see what's happening. Gotta be easy ;-)
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 11:35 PM (12 years ago)
Tackoo :)
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 11:49 PM (12 years ago)
It's the 1st screen menu. By the way, how do I get the caption variable from the upload in the mobile-upload.php? Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/11/11 11:49 PM (12 years ago)
OK, I see it, but cannot read it! Funny.. The problem is that you're using an image uploader as the Home Screen for the third tab. This is usually not a good idea. 1) Make a menu with one item - 'Upload Image' - point this menu item to your image uploader. 2) On your Image Uploader screen, visit Advanced Settings and Choose YES, Hide Bottom Tab Bar (this is in the Navigation Bar section) 3) Visit your apps Layout settings and set Tab #3 to use the new menu you created as it's home screen. 4) Launch and refresh your the app When you run the app, tapping Tab #3 should show your menu with one item - 'Upload Image' Tapping this choice shoudl hide the bottom tab bar and show the upload screen.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/11/11 11:51 PM (12 years ago)
In your .PHP upload script.. $imageTitle = $_POST['imageTitle']; Now, the $imageTitle variable holds the title so you can add it to your database.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/11/11 11:53 PM (12 years ago)
Thanks David. I'll rearrange the layout
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/12/11 12:04 AM (12 years ago)
Is it possible to load the upload image screen directly? Making a menu page with only one item will probably upset guy :p
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/12/11 12:19 AM (12 years ago)
David, I made a dirty fix: at the BT_screen_image_caption.m, I changed the following: UIView *box = [[UIView alloc] initWithFrame:CGRectMake(left, 0, 320, 480)]; to UIView *box = [[UIView alloc] initWithFrame:CGRectMake(left, 50, 320, 480)]; Hope you don't mind :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/12/11 12:22 AM (12 years ago)
Hmm... OK. So, if this isn't going to work, and you're sure you want to use a tabbed layout, you can just adjust the frame on the Text Input. BT_Screens > BT_screen_imageCaption.m Around line 74 you'll see this: text_caption = [[UITextView alloc] initWithFrame:CGRectMake(10, 10, 300, 100)]; 10, 10, 300, 100 is Left, Top, Width, Height. You'll also see some other propeties for the text entry box here too, like the background color, corner roundness etc. Just move the text box down about 50 pixles by doing this instead: text_caption = [[UITextView alloc] initWithFrame:CGRectMake(10, 60, 300, 100)]; I only changed the second 10 to 60. Experiement with the 60 and move it as far down as you need.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/12/11 12:24 AM (12 years ago)
We both posted the same thing - funny. Glad you got the way you need, this is the important part.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/12/11 12:25 AM (12 years ago)
I won! :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/12/11 12:27 AM (12 years ago)
LOL. goodnight, after midnight here. Lemme know tomorrow if your .PHP needs help with handling the image uploads.
 
Elsa Rosie
I hate code!
Profile
Posts: 44
Reg: Apr 07, 2011
Hong Kong
440
like
05/12/11 12:28 AM (12 years ago)
Thanks so much David. Good night!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/25/11 02:42 AM (12 years ago)
Hi, have image uploader and output of images working from my server but can't get a handle on making Add Image Caption work? thanks for any help!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/25/11 11:53 PM (12 years ago)
Where are you stuck: If you have the image uploading, the the screen showing to enter the caption, I'm thinking your just stuck in figuring out what to do with the text the user entered when it arrives at your upload script? If you're uploading to the buzztouch server you'll be stuck because it doesn't processes any caption entries, only the images.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/26/11 12:17 AM (12 years ago)
Hi David, yes I am stuck in figuring out what to do with the text the user enters in Add Image Caption... I am using my own server with the .php upload and output files..:)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/26/11 12:55 AM (12 years ago)
Cool. So, your image upload script is already pulling the data from the HTTP request (from the phone) and saving the image. In order for it to do this, it needs to pull information that was POSTED to the .php script. POSTED is an internet term. Tangent: Clicking a link in a webpage in your brower, like when you're surfing does a GET requiest. Clicking submit button to login or do some other action after entering information in an HTML form is called a POST request. The phone uses POST to send the image to your .php script. So, to get the data from the POST, the .php script does: if(isset($_POST[deviceLatitude])) $deviceLatitude = $_POST[deviceLatitude]; In english: If the device sent a value for the deviceLatitude then get it and save it to a variable called $deviceLatitude So, you want to get the imageTitile if it's available. if(isset($_POST[imageTitle])) $imageTitle = $_POST[imageTitle]; Now, you can do whatever you need with the title, like save it in a database or whatever. It's likely that you'll want to save the title, along with some other information so you know what title goes with what image. You'll need this when you ouput the images to a gallery, webpage, wherever.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/26/11 01:04 AM (12 years ago)
Thanks David, trying to incorporate this into the sample upload and download .php scripts downloaded from buzztouch...image uploader and gallery working great with your sample .php files just have to figure o how to incorporate this imageTitle code
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/26/11 06:36 PM (12 years ago)
Hi David, so the upload.php will just need this line added to it? if(isset($_POST[imageTitle])) $imageTitle = $_POST[imageTitle]; Still reading and searching google on how to output the image title(caption) to match the image in the gallery...love to make this work and share with other members...thanks again for the knowledge. :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/26/11 11:05 PM (12 years ago)
Yup...the same .php page you're already using. Grab the posted imageTitle from the $_POST array and save it in a database ;-)
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/27/11 01:30 AM (12 years ago)
Hi David, any suggestions on how to create the database? been reading intro to php tutorials but not seeing anything that helps me insert it into the BT sample upload and output .php files...am i trying to make this harder than it is?....no rush i know ur super buzy! :)
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/29/11 04:05 AM (12 years ago)
Hi David, so do I need to create Mysql database to store the captions or can it be stored in the same file the images are stored? Trying to learn from some online tutorials and they all talk about Mysql databases..thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/30/11 12:54 AM (12 years ago)
A database would be idea, a text file would also work. Either way you'll need to get your head around persisting (saving) data on your backend somehwere then being able to query it (select parts of it) based on the image galleries requirements. Nerdy stuff.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/30/11 01:46 AM (12 years ago)
Cool thanks, gonna keep at it and post back when I got something...cheers!
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
like
11/04/11 02:42 PM (12 years ago)
So James, any success with this? Are you using the image uploader or the image emailer + flickr? Thanks.
 
sepala
Aspiring developer
Profile
Posts: 196
Reg: Nov 23, 2011
London
3,060
like
03/21/12 11:13 AM (12 years ago)
Hi Does anyone have anything further to add to this? I would love to display the image title in the image gallery but don't know how to get the data and display it... Any help would be fantastic! Thanks Sepala
 

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.