Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 18    Views: 89

pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
12/02/13 08:33 PM (11 years ago)

HTML Pro - Document properties - what document if multiple screens use this plugin?

In the HTML Pro plugin documentation and plugin control panel code, it says "Be sure to also set the "document properties" section below to tell the plugin where your html document is located. This can either be an online URL or a local document bundled with the app." I have several screens (html) that want to use this plugin, as a sort of series of branching screens depending on what buttons are pressed on the screens. So my question is WHICH document do I reference in this field? Or is it the fact that the HTML Pro plugin only can handle one screen linking to another? I'm confused :(
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/02/13 11:06 PM (11 years ago)
Lets say you have a screen called "tuesday". And you bundle an HTML File named 'tuesday.html' within your app to open in that plugin. You would use the 'filename' attribute, 'tuesday.html' in the 'filename' portion of the control panel, and you would physically 'place' the html document into your xcode project, in the BT_Docs directory. Later this year, when you make an addition to that screen, you 'would normally' have to submit another app to the store for approval. But you're a smart cookie; you use Buzztouch. You create a 'new' tuesday.html, and upload it to your webserver somewhere. And then, in your BT Screens 'Tuesday' screen control panel, you would delete the 'filename' attribute, and enter the URL (in the 'load from url' text field) for your updated file. When the user refreshes the app, it will no longer call on the local file, but will cache the new file from online, thus implementing your changes. By default, the code looks to see if a local file is entered, and if entered, is it really there. If it is, it will use it regardless of what you place in the URL field. It has priority merely because the code checks for local file existance before it checks for the URL. Make sense? Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/02/13 11:09 PM (11 years ago)
Oh, and if you 'have several' html files, you'll need to implement one screen per document. So, if you have 10 html files, you will need to create 10 screens, naming them differently, with one document assigned 'per screen'. Cheers! -- Smug Edit: if you're going to do 'hundreds' of screens, I would suggest a script and learn the concept of 'loadScreenObject'. Much faster and easier than creating them one by one.
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/02/13 11:51 PM (11 years ago)
I'm using android/eclipse but in any case not sure what you mean re tuesday.html - what is it for? See, I'm simply trying to have some screens that appear when buttons in other screens are pressed. I don't see how the tuesday.html relates to e.g. 4 screens like scr1, scr2, scr3, scr4 where each question "links" using the html pro plugin to the next one. In the html pro plugin it asks for some document filename but I don't see the connection to my screens. I bought the HTML Pro plugin specifically so I can have these screens "linked" to each other with hyperlinks - like in a quiz. I'm just lost re this filename business. I tried watching Chris' video but there's no audio and it never really shows how this is set up from the beginning and he also just has one html screen and not multiple...
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/02/13 11:52 PM (11 years ago)
...and re your 10 screen example above do I then also need to have 10 HTML Pro screens with one link and one html doc defined in each HTML Pro screen?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/03/13 01:13 AM (11 years ago)
Well, it was supposed to be an example. I guess I didn't explain it well. The "HTMLPro" plugin accepts one document. That document can be provided either inside the app (local) or via URL. You can have one or the other, but you can't have both. This document is specified in the control panel for the HTML Pro plugin. The HTMLPro plugin "document" can have links. many of them. each link can be to another screen. There should be a document with the plugin that explains how that works. If you have 10 documents, you're going to have 10 screens. Each screen will be a plugin of some kind. It doesn't 'have' to be the HTMLPro, but it will have to support the kind of document you plan on displaying. If it's an HTML document you want to display, you can use HTMLPro, or HTMLDoc, or some other plugin that accepts html as a document type. Cheers! -- Smug
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/03/13 01:13 AM (11 years ago)
He a smart cookie!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
12/03/13 02:29 AM (11 years ago)
Hi @pdog I have a different slant, I understand your issue slightly differently. It sounds like you want to have an html page, as if you are creating a menu in html that calls Buzztouch screens created in your Control Panel. The key thing about @Chris1's 'html pro' screen is that it allows you to embed links in an html page. These links call Buzztouch screens previously created in your project, which otherwise is not an easy thing to do. As I understand it, the html pro plugin gives you the url that needs to be embedded in your html. This is almost the reverse of the custom html and html doc plugins, which allow you to link to an html page called from a Buzztouch menu. Cheers, Alan
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/03/13 08:51 PM (11 years ago)
Hey everyone thanks for trying to help... I think the issue is that I did not make myself clear re what I am trying to do. Pls note this is needed for Android at this time. I made a wireframe of what I want: basically an app with a home screen menu, and some text screens. Some of the text screens need to have buttons on them that jump to other text screens when those buttons are pushed. This is all I really need to get going. Maybe I went to far down the road with HTML Pro? I did ask the developer if it could solve my problem and he said yes, so I bought it, but maybe it was premature. All this talk of html documents got me confused, especially when in HTML Pro it asks for one document and I can barely figure out what is a screen vs a document :) Also, I have more than one screen here... I am hoping you could explain what plugins I need and how to set this up via adding an app to my BT control panel, what screens I need and what types they should be, and how to connect the graphical images/buttons to the other screens. Here is my diagram of what I am trying to do: http://entramarketing.com/app-screens-flow.jpg Pls advise this noob member.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/04/13 05:46 PM (11 years ago)
Suggest you use HTML Documents. Make a mini web site outside of BuzzTouch and then import that into your Eclipse project.
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/04/13 07:55 PM (11 years ago)
Ok. How does one create hyperlinks between the html documents? It seems so hard to figure this out but I am hopeful I will get there.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/04/13 10:08 PM (11 years ago)
Create hyperlinks between screens by making one screen per HTML file. The HTML Pro plugin is the means by which one can reference the first BT screen (HTML) to the next BT screen (HTML).
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/04/13 10:23 PM (11 years ago)
Ok but this is where I got stuck in the first place. Pls see my original post. i.e. In the HTML Pro plugin it asks for the document filename, and if I have multiple screens where each one is an HTML file, what filename do I give since it just asks for one? This is what is driving me nuts.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/05/13 12:18 AM (11 years ago)
I've created an image, albeit a little primitive looking. I hope it can help. You create several screens. They can be HTML Pro, or they can be HTML Doc. HTML Pro will allow you to link screens via HTML within your app. HTML Doc will allow you to display screens only. Any links are html/internet links. Not BT. Using the HTML pro requires you do a little planning ahead. You have to name your html file 'something', so we'll name it 'Doc1.html'. *This is the name you will provide to the HTML Pro plugin*. You will create other screens, that will contain other HTML Documents. You then go back to the HTMLPro plugin that you created with Doc1.html Via the "links to buzztouch screens" section of the HTML Pro control panel, discover and record the unique identifiers for the screens you wish to link. You now need to edit Doc1.html, and within the document, link the screens via HTML, per the example provided in the plugin: <a href="84214C9A1AB60BDEAF66030">Link to another HTML Pro Plugin</a> So, in the example I'm showing you, you create 3 HTML Pro screens, and 1 HTML Doc screens. Before you 'finish' you will need the screen identifiers for each screen you'll want to link. You'll need to edit Doc1.html, Doc2.html, and Doc4.html, because they are HTML Pro plugins, and can link between screens. Doc3.html is in an HTMLDoc plugin and cannot perform this function. https://dl.dropboxusercontent.com/u/115208762/plugin_interaction.png I hope this helps. Cheers! -- Smug
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/05/13 09:25 AM (11 years ago)
Ok I will try this. I didn't know that an "HTML Pro" screen could actually contain content. I thought it was a plugin that just offered this linking between other screens but didn't actually show anything to the user. i.e. an enabler type plugin. This is encouraging and I'll give it a try. Thanks Smug.
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/09/13 04:05 PM (11 years ago)
re: "Via the "links to buzztouch screens" section of the HTML Pro control panel, discover and record the unique identifiers for the screens you wish to link. " I see no such section in my HTML Pro control panel. See screenshot here: https://www.dropbox.com/s/00260t5lr2j2wq0/href-link-screenshot.jpg I have a section called "Menu Items"... and no itemid/hex code to grab. I'm on regular BT (not self hosted) and recently bought this plugin html pro so do I need to do something to enable html pro to reveal this code?
 
pdog
buzztouch Evangelist
Profile
Posts: 106
Reg: Nov 20, 2013
Kelowna, BC, Ca...
6,310
like
12/09/13 11:47 PM (11 years ago)
Update: re my above post there actually was a bug and Chris fixed it. I'd like to take credit for finding it :) Here's the link to the related discussion and post by Chris for anyone using HTML Pro (including self-hosted): https://www.buzztouch.com/forum/thread.php?tid=8D627AFE5F940CCEF5524DE&sortColumn=FT.id&sortUpDown=DESC&currentPage=1
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/10/13 01:27 AM (11 years ago)
Awesome hunting and persistence, pdog! :-)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/10/13 05:07 PM (11 years ago)
Nice snooping! Glad it got worked out as well :) Cheers! -- Smug
 

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.