Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 122

Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
04/03/14 07:50 AM (10 years ago)

How to use HTML Pro plugin?

On how to use the HTML Pro plugin, I have searched through the forum, re-read the documentation ... No luck! I must be daft. And going bonkers! :-) Other folks have successfully used the HTML Pro plugin. But not me. Can someone please help by stating the syntax-correct Start-to-Finish steps? Thank you, -- Niraj
 
Photographist
I hate code!
Profile
Posts: 4
Reg: Oct 15, 2012
Istanbul
3,040
like
04/03/14 08:13 AM (10 years ago)
Hi Niraj, I think this document can help you. https://www.dropbox.com/s/3kq6e0rpsp7p0cd/Using%20the%20HTML%20Pro%20plugin.pdf Regards. Oben
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
04/03/14 09:11 AM (10 years ago)
Hi Niraj, The biggest misunderstanding of the HTML Pro plugin is that it works like the Custom HTML plugin. This is not the case. Instead of entering the html directly in the control panel, it simply points to an html file. I usually use a local html file bundled with my app for this. Here are the quick steps (from memory): 1) Create new HTML file (or have the URL of one on the web) 2) Create New HTML Pro Screen 3) Set the URL in the HTML Pro Screen to point to your html file The part in the html screen that gives you another screens item ID may confuse you. It doesn't do anything in the plugin itself, it's simply used as a "lookup tool". This is because in your html file, you use the Item ID to call another BT screen, similar to if you were linking to web address. For example, your html file may look like this after configuring it for use with html pro: <html> <a href="XXXXXXXXXX">This is a test link</a> </html> (by the way, a common mistake is to use <a href="http://XXXXXXXXXX">This is a test link<a/> don't use the http:// part) The XXXXXXX part is the item ID of the screen in BT that you want the link to go to. So, in the HTML Pro screen, you have that lookup tool, you would simply use the dropdown to find the screen that you want, and it will give you the item ID below it. Copy and paste this item ID into your html file to replace XXXXXXXXXXX Hope that helps. And hope I got it right, since it's from memory, lol. I use it all the time though, one of the most useful plugins out there in my opinion.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/03/14 09:50 AM (10 years ago)
Hi Niraj, I use it. Its is good. I first got to grips with it a month or two ago. I had a heck of a time, because there had been a recent upgrade. The documentation documentation was out of date and it also took me a while before I realised that a later version of the plugin was not backward compatible with an older version. Because of this, everything I tried didn't work as expected. I got some really wierd results until I re-downloaded my project and @Angry Ninja re-assured me it works. https://www.buzztouch.com/forum/thread.php?tid=6D342C726D45E38C57DF3E4&sortColumn=FT.id&sortUpDown=DESC&currentPage=2 btw, "The biggest misunderstanding of the HTML Pro plugin is that it works like the Custom HTML plugin". To be pedantic, actually, it does do what the Custom HTML plugin can do, but its biggest benefit is that it does so much more. One of it's big plus's for me is that on Android, the core html doc plugin is now as useful as a chocolate teapot. The html pro this plugin allows you to reference html docs on Android with a user experience that mimics the previous and more correct v2 html doc way. Cheers, Alan
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/04/14 06:04 AM (10 years ago)
Folks, I gave up. Even with your tips, it just would not work, not even with the latest version of the plugin. Thank you sincerely for helping me. I switched to the URL Scheme method. This is so much easier, way less clumsy. Replace http with your unique app name. In place of webserver.com, use the target Screen's Nickname. Done! :-) For the curious, I had written and posted a How-To document to implement URL Scheme for iOS and will do one for Android soon. "Use links in HTML pages, links in PDF files and customURL screens to open up the specified Screen within a BuzzTouch app. This technique takes advantage of the iOS URL Scheme to register the BuzzTouch app with a custom URL. From any app or within the same app on the device, a tap on the custom URL myApp://myScreenNickname will launch the app into the screen with that nickname." https://www.buzztouch.com/files/howtos/Custom_URL_Scheme_with_Xcode_5.pdf -- Niraj
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/04/14 06:08 AM (10 years ago)
Niraj, if we take a step back, what were you trying to do with html pro?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/04/14 06:15 AM (10 years ago)
In a Custom HTML screen, I have a link that points to another Custom HTML screen. I am not using the HTML Doc plugin, rather I am using the Custom HTML text plugin. Essentially cross-referencing each other via links. A tap on a link within the HTML-A screen will bring up the HTML-B screen. Believe me, I am so much happier with the URL Scheme. No fuss. You should try it. And you can show off to friends that your app has its own URL that can be launched from Safari and other apps! And you can send information to your app! And, and, and ... :-)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/04/14 07:27 AM (10 years ago)
Hi Niraj, I love a happy ending and you sound happy.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/08/14 07:28 AM (9 years ago)
I came across a scenario today where the html pro plugin did not work on an html page I was trying to display from a url. This page has a fair bit of javascript and css in it. But custom url plugin did show it and I wanted to link to a BT screen from html, I used Niraj's guide to create the link. Three things that I wanted to say : 1) It's great!. 2) The link above is for the BT 2.0 and Niraj has been updated the guide for BT 3.0 - the new link is : http://www.buzztouch.com/files/howtos/BuzzTouch%20URL%20Scheme%20with%20Xcode%205.pdf 3) The guide suggests to cut and past a section from it, which is a bit tricky as it is a pdf, so having re-typed it, I thought I would paste it here for people to use - just to save a bit of time. // Handle taps onCustom URL Scheme for this app // Custom URL = myCoolApp://myScreenNickname // Scheme = myCoolApp, it is registered in the BT_Info.plist file // Host = myCoolScreenNickname, is the Nickname of the next screen to be displayed // Replace XXX_ with yourAppName_, such as myCoolApp_ // // Get more info on Custom URL Schemes from this excellent web site //http://www.idev101.com/code/Objective-C/custom_url_schemes.html -(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { XXX_appDelegate *appDelegate = (XXX_appDelegate *) [[UIApplication sharedApplication] delegate]; [BT_debugger showIt:self theMessage:@"Tapped on a custom URL"]; // Check if we have a screen nickname from the URL to process NSString *loadScreenNickname = [url host]; BT_item *screenObjectToLoad = nil; if ( [loadScreenNickname length] > 1) { [BT_debugger showIt:self theMessage:[NSString stringWithFormat: @"Nickname of screento load: %@", loadScreenNickname]]; screenObjectToLoad = [appDelegate.rootApp getScreenDataByNickname:loadScreenNickname]; } else { [BT_debugger showIt:self theMessage:@"ScreenNickname to load is blank"]; return NO; } // Check if the Screen was found within the App's JSON data if( screenObjectToLoad != nil) { NSLog(@"loading screen:%@", screenObjectToLoad.itemId); [self.getViewController handleTapToLoadScreen:screenObjectToLoad theMenuItemData:nil]; } else { [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"URL Scheme error: %@", url]]; } return YES; }
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/08/14 07:33 AM (9 years ago)
Hi Niraj, I noticed that you also mentioned in this thread : "For the curious, I had written and posted a How-To document to implement URL Scheme for iOS and will do one for Android soon." Any news on the Android version please? I could use it! Alan
 

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.