Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 97

Jen
Lost but trying
Profile
Posts: 70
Reg: Mar 14, 2013
Melbourne
2,750
04/28/14 09:47 PM (10 years ago)

custom html /text screen url link issue

Hi, I'm just tying up final strings, and one aspect is driving me nuts. I've scoured the forum, and have found others with the same complaint a while back, but no response posted. I am hoping that a fresh post might help. I use a lot of custom html/text screens in my app, and each screen features several url links. Once viewing the link, the user presses the 'back' button, which then returns to the menu list...not the custom html screen. It is very clumsy looking and takes extra time. I've tried adding in a right button on the nav bar and linking it to the custom screen, and it works, but if the user taps it more than just to get out of the url, then it consistently flashes that custom screen - also clumsy looking. Any ideas? Thanks in advance, Jen
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
04/28/14 11:55 PM (10 years ago)
Jen could you code a back button into the html screens themselves? Or are the URLs you're trying to get 'back' from external to your app? And when you say 'taps it more than just to get out of the URL' are they doing that because they're just impatient (ie it's too slow) or is there some reason they're needing to repeat the tap? Not sure I have an answer for you but I suspect that as my app develops I may have the same issue - I will also be using a bunch of html screens. So I join you in hoping there is someone out there who's solved this. :) Cheers from down the road! Paddy
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
04/29/14 01:34 AM (10 years ago)
It looks like something we'll just have to put up with for now. Certainly I've not found a solution. Like you I searched around for a fix or work around but no luck.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/29/14 02:20 AM (10 years ago)
The problem is that 'back' navigates you back to the previous plug-in. Once you are the world of html screens, that navigation isn't very intuitive. I agree, that it is confusing for the user as they don't know the difference between what is plug-in managed navigation and html url based navigation. I think the answer could be as follows: 1) Remove the navigation bar from your html screen plugin, which removes the Buzztouch back button. You then need to code an html back button into all your html screens. 2) On the html screen that has to get 'back' to the menu, you use the html pro plugin. You use your html back button in your html code, but the URL link on it is for the menu screen. This is a bit messy, but in theory it could work. There will be some styling issues to conquer and if you really want the navbar in html screens, you would need to code that in html too. Can't think of a better way; I'm interested to know if others have tried anything similar.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
04/29/14 02:23 AM (10 years ago)
Yep, I talked to Chris about this about 6 months ago, and the reason is the nav bar back button is used to go back to the previous VIEW... not the previous html page loaded. The plugin sees the view as a page with content, not as a page of html that is linked from one to another, so it sees "back" as going to the previous view that was pushed before the html pro screen. An easy way around this, or suitable work around I should say, is to put a button on each html page except the first one in the upper left corner of your html page, and have it say "previous page" or something similar, and link it to some html back code... like this: <FORM><INPUT Type="button" VALUE="Previous Page" onClick="history.go(-1);return true;"></FORM> I would stay away from the word "back" as to not confuse the user with the existing back button that will be above it in the nav bar, if you plan on keeping the nav bar visible.
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
04/29/14 02:38 AM (10 years ago)
Just a shame it won't work if the user has clicked on an external link but that can't be helped.
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
04/29/14 03:20 AM (10 years ago)
Could you launch all external link URLs framed within a different view controller, and give it it's own 'back' button that is coded to launch the first controller that holds the external URL links? It might mean using say 10 differently named plugins if you have 10 external URLs you're linking to, rather than 10 instances of the same (named) plugin (and therefore a pain in the rear) but it may be a workaround that gets you the desired functionality for your users... .??
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
04/29/14 03:37 AM (10 years ago)
In my case, I'm not a programmer and I don't really know what "URLs framed within a different view controller" means. I can manage if someone says "take this code and paste it into this file" or similar. In any case, my external links are research references and I reckon not too many people will look at them (certainly not after they have to re-enter the html screen every time <g>) and so it's not worth it, for me, to spend lots of time on it. But it seems to be a feature lots of people are missing - going back screen by screen.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/29/14 05:40 PM (10 years ago)
All the "pro" apps have this same problem ... Twitter, Facebook, etc. C'est la vie ... One can mitigate it a wee bit with the Custom URL Scheme technique or by the HTML Pro plugin ... But only for that first tap to an external link. Once the User has left your fortress, then they are at the mercy of the "all the way Back in one fell swoop" button. -- Niraj
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
04/29/14 08:14 PM (10 years ago)
Niraj - is my logic off? As you suggested, using Custom URL or HTML Pro plugins make sense - and I'm think that as long as you gave those plugins some customised nav 'back' controls, it should be possible to use those to get back to the previous screen rather than all the way back to the main menu? (This would require that all external links open up inside an instance of one of those plugins, which would be tedious to set up but should achieve the desired effect, yes?) Back to Jen's question, I think the key is to firstly not have any external links open up outside your app, so make sure they are pulled into one of those plugins Niraj has suggested. @AlanMac I like your idea of removing the nav bar; you could also just remove the back button from it (conditionally, based on the screen id?) so it wouldn't look *too* different for those screens. @Kingelessar, I'm no coder either so I feel your pain! But if you spend some time playing with the plugins Niraj has suggested and find some nav button customising code to slot in (I can help with some of that - just from my own trial and error, as can others here who, unlike me, actually know what they're doing), you'll be amazed at how quickly you'll learn. Cheers Paddy.
 
Jen
Lost but trying
Profile
Posts: 70
Reg: Mar 14, 2013
Melbourne
2,750
like
04/29/14 08:23 PM (10 years ago)
Wow. Thanks for all the response! Rather than messing around with code overly much, I am trying to scoot around the issue by installing the Utilities tab bar plugin, and then do a app-wide deletion of the back button on the nav bar. Only problem - the tab bar plugin isn't appearing. I think it might have something to do with the fact that I am using the advance menu with image with the non-tabbed layout rather than the standard tabbed layout. I've attached the menu as the 'home screen'. Any ideas? There is a chance I am blind. I have posted this as an individual query, but thought I'd let you know what my status is since you were so great to respond. Jen
 

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.