stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
11/02/15 04:11 PM (8 years ago)

Changing HTML to HTLM Pro

Pretty sure I know the depressing answer to this, but I have an IOS app with many html screens. Turns out Google won't accept these html files, they have to be html pro screens to work without a placeholder icon for html which then has to be clicked I learned this the hard way a few years ago but forgot. So my question is : Is there any way to change these screens to html pro screens without deleting all the html screens and re-entering them as html pro screens. I doubt it but keeping my fingers crossed. Steve
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/02/15 05:00 PM (8 years ago)
Well, that would depend on you. I immediately see two ways this could happen. There may be more. The first suggestion, albiet a dangerous one depending on skill level, is to do a MySQL query to hunt down the existing HTMLDoc plugins for your 'particular' app, and update those records with the HTML Pro information. This would be rather complex, but certainly doable. Just gotta keep all your ducks in a row. Another idea would be to modify an existing BT_config.txt file, search/replace the HTMLDoc info with HTMLPro info, and use Chris' 'app duplicator' script to import your file as a new app. This would be the safest and possibly easiest option. http://www.buzztouch.com/plugins/plugin.php?pid=93D709C2D88A587EEBC4A5C If you're not self hosted, I don't think you have any choice but manually recreate everything. If that is the case, I'd do a hybrid of the BT_config.txt file, and Stobes 'snippet keeper' to help with the redundancy of data entry. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/02/15 05:04 PM (8 years ago)
Smug, I'm not self hosted so I guess I'm out of luck. Thanks anyway. Steve
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/02/15 05:08 PM (8 years ago)
Then definitely look into Stobe's snippet keeper. You've already got most of the values you need. Just search/replace values in your BT_config.txt file, and paste those into a Snippet Keeper module. http://www.buzztouch.com/plugins/plugin.php?pid=57852D3DE0C71B9F1ABF624 I'm not sure there is a limit, but conceivably you could paste the entire HTMLPro collection into one snippet, and be done with it, so after the json edit, the app modification would only take a few minutes. Good Luck! Cheers! -- Smug
 
Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
like
11/02/15 10:09 PM (8 years ago)
Does this mean that I cannot use Custom HTML/Text Plugin in my Android App?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/02/15 11:15 PM (8 years ago)
I've used them before... So I'm not sure exactly why Steve cannot... but he would know why better than I could. But by and large, I've never seen a problem submitting my documents... Cheers! -- Smug
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/03/15 12:16 AM (8 years ago)
>Turns out Google won't accept these html files, they have to be html pro screens to work without a placeholder icon for html which then has to be clicked This is not true. This has nothing to do with Google itself, it is more of a problem introduced by David Book in version 3.0. Namely, in previous versions of BT software, the HTML screen on Android worked just as it should -- you supply the address, it opens it, done. In version 3.0 David introduced a completely unintuitive behaviour for this screen, forcing everyone to read the prompt, click to download the file, then click on it again to open it. To make things worse, it won't read well files with certain types of images so it is not completely useless, but comes pretty close. ... Which is why Smug created a special plugin to serve as the older version, however and to my great surprise, I do not see it now in the market, he must have withdrawn it. A pity! Back to your problem of transferring the screens from iOS to Android in an automatic way. It is possible and Smug already delineated a couple of ways. What I'd do would be to extract the info about screens from the BT_config.txt and put it in a file (it would have to be pure JSON for this to work) and would then read it from a menu as a dataURL (all menus have one such field). Actually, I would create a PHP file that brings back those screens into the menu and that would be the ultimate flexibility. Don't like the HTMLPro -- change one word in the PHP file and have it generate CustomURL screens. Or, some screens can be HTML Pro, while some others can be CustomURL or anything you want them to be, all from the one and the same option in the main menu of the app. Don't like a usual menu -- put the PHP file address into a buttons menu of a kind, and voila! -- you have another kind of experience for the user right off the bat.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/03/15 02:23 AM (8 years ago)
Everything that Smug and Dusko have said is spot on. I had a similar problem recently - in my scenario, I had about 30 screens to reproduce and I thought it was easier to just re-type everything. I have never used and don't own the snippet keeper, so it seemed like the easiest option. I sat down with a big mug of coffee, opened two browser windows, each pointing to my control panel and started cutting and pasting screens. You can speed things up by creating all the new screens in one go and you can copy the json across to make populating the screen values a bit faster but it is a slog. HTML Pro usually does the job for both Android and IOS and I do use it a lot. However, I would check that HTML Pro works with the html screens you are looking to display. I copied loads of screens and then found that it didn't! Sometimes there are things HTML Pro doesn't display that the Custom URL plugin can. I believe it is to do with complex html with javascript pages but I don't know exactly what the problem is. To overcome this, in Android, I use Custom URL and point it to a file built into your project. For example, to reference file thisfile.html in your Android project can use the following syntax for the url location: file:///android_assets/BT_docs/thisfile.html That does not work in IOS though.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/03/15 02:29 AM (8 years ago)
>Sometimes there are things HTML Pro doesn't display that the Custom URL plugin can. Exactly, there are complicated screens that HTML Pro won't display but Custom URL plugin will. Hence the need to be able to switch from one to another through JSON, but without painfully recreating the screen(s) through a BT panel.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/03/15 03:46 AM (8 years ago)
Hi Dusko, on your interesting suggestion on creating json for driving a menu, I get it as far as a menu is concerned, but I didn't follow the step after that (but I would like to). As part of this, would you also need to create multiple new screens of type html pro (or custom url), and in the menu json, edit the item id to reference each replacement screen? Alan
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/03/15 06:28 AM (8 years ago)
>Don't like the HTMLPro -- change one word in the PHP file and have it generate CustomURL screens. If that's the part you are speaking of... most of the fields in JSON definitions of BT plugins are identical and in certain cases you can just swap the name of one plugin for the name of another plugin and it will still work as normal. Compare the JSON for HTML Pro and CustomURL and you will see.
 

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.