chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
09/05/12 09:34 AM (13 years ago)

create plugin question

I'm waiting until my website goes live before upgrading to a paid Buzztouch account. But in the mean time, I have a question about plugin creation. Is it possible to create a plugin that is an HTML5 page? I'm thinking of something like the "custom HTML" plugin, but would be pre-populated with HTML code. Also, can I ask for an input on the plugin configuration page and use that input as a variable on the HTML page? How hard would this be for someone who is fairly decent at HTML/Javascript/PHP programming, but doesn't know much about iOS/Android/MVC programming?
 
theMonster
Code is Art
Profile
Posts: 435
Reg: Oct 18, 2011
US
8,050
like
09/05/12 10:00 AM (13 years ago)
Higher Level languages like Objective-C and Java are, in there own right, harder then PHP. The biggest challenge of understanding Higher level programming is to understand programing first. If your very good with PHP, then it shouldn't be too hard because that means you already understand the basics of programing. Which is the hardest part. "Thinking like a computer". As for your plugin question, (for iOS), I wouldn't use HTML. I would defiantly do it all in Objective-C due to loading times, flexibility and many other reasons. However it is certainly possible. To do this (for iOS) you'd need to create a UIWebView object, set the frame, load your HTML 5 markup, and add it to the view. This is done like so: UIWebView *html = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 436)]; // I can't remember what the second paramters actual name is. [html loadHTML:@"<h1>Hello World</h1>" withPath:nil]; [self.view addSubview:html];
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/05/12 10:36 AM (13 years ago)
"Also, can I ask for an input on the plugin configuration page and use that input as a variable on the HTML page?" Sure. In a nutshell, you would... Add an input element to the /index.php page. You would name it "json_myVariable" When the user saves the advanced properties of your plugin, "myVariable" would persist in the JSON data. This means the screen data for your plugin could look like... {"itemId:"1111", "itemType":"your plugin Class file name", "navBarTitle":"Nav bar title", "myVariable":"what the user saved"} Next, in your plugin's class file (objective c or java) you would "read" the myVariable value and use it however you needed in the HTML.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
09/05/12 11:05 AM (13 years ago)
great - thanks!
 

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.