Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Picup App Integration

    the site im working on is datethebasin.com using the mobile template which can only be accessed by a mobile phone via a redirect. using the following tutorial: http://www.parorrey.com/blog/php-dev...upload-images/

    The site loads correctly now however when testing, when the upload function is clicked and the picture is uploaded the app 404's im guessing that's because the configuration info in the script here is wrong. Im guessing it is the callbackURL.

    Code:
    <script type="text/javascript"> 
    var currentParams = {}
     
     
    document.observe('dom:loaded', function(){
     
      $(document.body).addClassName('iphone');
     
    	// We'll check the hash when the page loads in-case it was opened in a new page
    	// due to memory constraints
        Picup.checkHash();	
     
       // Set some starter params	
       currentParams = {
    	'callbackURL' 		: 'http://www.datethebasin.com/index.php?m=account_register',				
    	'referrername' 		: escape('App Name'),
    	'referrerfavicon' 	: escape('http://www.datethebasin.com/favicon.ico'),
    	'purpose'               : escape('Select your photo for the our App.'),
    	'debug' 		: 'false',
    	'returnThumbnailDataURL': 'true',
    	'thumbnailSize'         : '80'
    	  };
     
        Picup.convertFileInput($('photo'), currentParams);
     
    	});
    </script>
    Also I'm using 2 upload buttons right now and I dont believe that will work because the second upload button for the iphone isnt connected to the database as it is not using the same id. However the id for the iphone app to work has to be "id="photo""

    Any ideas how i could just use one button and get this to function correctly?


    Code:
    <dt><label for="field_photo">{lang:"register","select_picture"} <!-- IF settings.require_registration_photo --><i>*</i><!-- ENDIF --></label></dt>
    <dd><input id="field_photo" type="file" name="photo" value="" class="text" /></dd>
    <p></p>
    <p>If on iPhone use button below</p>
    <dt><label for="image">Upload Image:</label></dt>
    <dd><input type="file" name="photo" id="photo"/></dd>
    Attached is the whole page it is suppost to have an extention of .tpl but had to change it to .txt to upload it.
    Whoever can help me get this working right I will be willing to thank you via paypal.
    Attached Files Attached Files
    Last edited by mikeisflux; 08-05-2012 at 01:40 AM.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •