Discussion Forums  >  Uncategorized

Replies: 2    Views: 237

CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
11/20/11 11:34 AM (14 years ago)

BTServer questions.

Hello all and good morning, I have a couple/few things to ask about, but first I gotta say the BT-server looks amazing... finished my set-up last night and the potential seems fantastic... So like with any new toy, I gotta be careful not to break it. Which leads me to my questions. 1: is there an easy way to make a plugin for Custom HTML pages, like the projects from Buzztouch.com? or an easy way to convert projects (that contain mostly custom HTML pages) to BT server? 2: if i wanted to include .php scripts and .js files in an app, where is a safe place to put them in the file structure? 3: Im trying to make a signature capture application, that will be a basic form that looks like a pdf, but you can enter text into the fields(planning to use php) and at the bottom, using the canvas element I will be capturing their signatures. I want to have this information sent to my database that I have set up for it. But i can not figure out how to do this. here is a form example: <form action=/sample.html class=sigPad method=post> <label for=name>Testing, Testing, 1, 2, 1, 2...</label> <input class=name id=name name=name type=text /> <p class=drawItDesc> Draw your signature</p> <ul class=sigNav> <li class=drawIt> <a href=#draw-it>Draw It</a></li> <li class=clearButton> <a href=#clear>Clear</a></li> </ul> <div class=sig sigWrapper> <div class=typed>  </div> <canvas class=pad height=75 width=348></canvas> <input class=output name=output type=hidden /></div> <button type=submit><a href=s2c.bejai.com/sample> I accept the terms of this agreement.<a></button><script>$(document).ready(function () { $('.sigPad').signaturePad() })</script></form> How can I send the data being collected on the form to my database? I read the documention about what im trying to do here: http://thomasjbradley.ca/lab/signature-pad (these are also mostly the files Im trying to include in the project, in order to contain these functions vs. visiting a url in a script) 4: I think once i see how its being sent, i should be able to tell how to recall it, but I dont know since this is hard :) So after having data sent to a database, how would i recall a string? or maybe a png since I could use this script: require_once 'signature-to-image.php'; $img = sigJsonToImage($json); imagepng($img, 'signature.png'); imagedestroy($img); This will return a base64 coded .png per the 'signature-to-image.php' file located on the server... My ultimate plan here was to make this signature thing into a buzztouch plugin... but I cant figure it all out... I am kind of a noob, a smart noob, but still a noob... any help is appreciated.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/20/11 09:57 PM (14 years ago)
Hi in Minny, tough day for the Vikings (tough season!). So, you're asking a number of questions here, the enthusiasm is cool. Tough to address them all in one post? I'll respond shortly for each bullet...see last remark after the simple answers. 1) Plugins are easy to create but you do need to understand how they are put together. We have not created a how to document yet. Basically it's a matter of copying an existing pluign (the entire folder), renaming the folder, adjusting the config.txt data, renmaing the class files for Android / iOS. For sure there lots of details to this but thats the basic idea. The Custom HTML / TEXT plugin is already available so you don't need to copy that one. 2) .PHP scripts do not go in an app. iOS and Andorid do not know what .php is. .PHP scripts are for your backend, on your website. They are used to capture and process backend data. .js files go in the BT_Docs folder in iOS and Android 3) I have no idea how to capture a signature. Posting to your backend script is easy. Google '.php forms' or 'capture form data' using php 4) Retreiving information from a database is not tough once you get the hang of it. If you've never done it, expect a steep learning curve. Goodle 'save form to database' Ultimate Plan: Sounds like an awesome idea for a plugin. I'de be happy to help create it once we get the others made. If you want me to help with this, send some screen shots and some design ideas to info 'at' buzztouch.com - I'll see what I can do.
 
CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
like
11/21/11 12:34 AM (14 years ago)
Yea sorry for the block of questions, im just waist deep in this, alot to figure out with all this stuff. 1) im scared... 2) I should have spoken more clearly, i meant i wanted to include the .js files that my server side .php references. but.js goes in bt_docs... check. 3) i currently have a working model of an app that lets you sign. I am just having issues with saving the form data. or more clearly, I have no idea what happens to the info after you click submit. 4) Im working on this part of it still, but you are correct sir... steep learning curve indeed. Any help converting this into a bt_plugin would be fantastic. Hopefully i get my setup finished, I understand more of whats happening and then id may actually be of some help. Thanks as always, You Sir, are awesome.
 

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.