Discussion Forums  >  WebViews and HTML for Mobile

Replies: 15    Views: 169

Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
10/29/12 08:19 AM (13 years ago)

HTML - copying external code into my app

I would love to have this countdown widget in my app using the html plugin. The code has been provided in the website but when I put it into the custom html plugin it doesn’t work as expected. It just provides a widget icon and links to the website, instead of showing the countdown clock. Is there anyone out there who can anyone help me to get this to work? Thanks in advance! (I’m on BT v 2.0, not self hosted, iOS 6.0 and Xcode 4.5.) http://mycountdown.org/fullpage.php?group=Local%20Holiday&countdown=St%20Patricks%20Day&cp3_Hex=FFB200&cp2_Hex=109543&cp1_Hex=ff7300&widget_number=3015&fwdt=150&img=1&lab=1
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
10/29/12 09:06 AM (13 years ago)
Hi @Dervalo, Just looking at the link, there something that stands out right away. The php coding. Buzztouch is not setup to handle php, therefore, a custom link should be used. LA
 
MDG2
Apple Fan
Profile
Posts: 102
Reg: May 08, 2012
Princeton, New ...
5,020
like
10/29/12 09:22 AM (13 years ago)
Just tested in self hosting and I get the following: http://dl.dropbox.com/u/37805198/countDownClock.png MDG
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/29/12 09:35 AM (13 years ago)
I haven't tried this yet, but I don't think the php should get in the way. It's really just linking to a php-generated javascript file that is hosted online. The php wouldn't be residing in the app or on the BT servers.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/29/12 11:52 AM (13 years ago)
I am not sure but the best approach would be to use custom url to handel the page link you desire to include in your app.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
10/29/12 12:05 PM (13 years ago)
The problem is that counter uses FLASH, which of course works GREAT with all Apple products.... LOL. So that will never work unless you load flash on your phone, which you can't. Not as pretty or fun as the one you are trying to use, but here's a jquery one that will work better- http://www.littlewebthings.com/projects/countdown/ put all the code in an html doc and copy the .js files to your BT_Docs location and it should work. you may need to tell xcode not to compile the .js files. Here's a video tutroail that shows a different countdown timer and how to add it to a html page- http://webdesign.tutsplus.com/tutorials/complete-websites/adding-a-jquery-countdown-plugin-to-our-coming-soon-page/
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/29/12 12:07 PM (13 years ago)
Great find and thanks for sharing the links.
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/29/12 02:34 PM (13 years ago)
Thank you all for your responses…much appreciated! @Atrain, of course… Flash!! Saviour of the universe.. if it’s not Apple! I’ll give that new counter a try. I have managed to tell Xcode not to compile the.js file (that was a new one me - I found instructions on stack overflow… so much to learn!!!)… I still have a bit more to do to get it working, but first I’m going to watch the next episode of Homeland ;-)
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/30/12 04:17 AM (13 years ago)
OK, so I’ve been trying to get the countdown clock provided on the web design website to work. I have followed the tutorial, downloaded the files, referenced them in the BT panel, told Xcode not to compile. js file and all I get is a screen with a countdown clock that does not move. Any thoughts? Here’s a couple of screen shots of what I’ve done. https://www.dropbox.com/sh/ykjfe8pws4yqoty/WYoksE-W5Y Thanks
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/30/12 08:04 AM (13 years ago)
I just noticed this and remembered what @LA and @Chris1 said about PHP. Does this mean this counter won’t work unless I am self hosted: "jCounter uses the dateandtime.php file that needs to be on a PHP-supported server, to retrieve an accurate current time to display exact countdowns with timezone support. By default, jCounter assumes the dateandtime.php file is on the same server in the web root directory (where the main index page is usually located), if you placed it somewhere else, just specify the location when calling jCounter with serverDateSource: “http://my-domain.com/path/to/dateandtime.php” If jCounter can’t find the dateandtime.php or if something simply goes wrong, it will use the client-side time as fallback. To avoid this, when first installing/running jCounter, use it with debugLog: true and check your Console Log for errors."
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
10/30/12 08:32 AM (13 years ago)
@Dervalo, Try a special link to it to see if that works and if it does, then you know its the coding. LA
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/30/12 01:10 PM (13 years ago)
@La, How would I do that? Thanks for your help!
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
10/30/12 01:17 PM (13 years ago)
Go to screens and new then select Custom URL under plugin type. LA
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
10/30/12 01:58 PM (13 years ago)
@LA Yes, I got this counter from Keith Woods to work when I use the custom url as you suggested, but when I use the HTML plugin, you can’t see the counter, only the text… http://keith-wood.name/countdown.html What next? I feel we’re getting close….
 
Derval
Aspiring developer
Profile
Posts: 364
Reg: Sep 20, 2012
Milan
17,240
like
11/21/12 02:10 PM (13 years ago)
Hey folks, finally cracked the countdown widget for my app. @Otatech posted an app which had one and with some help from a techie on Odesk I had it improved. It’s not the prettiest of widgets, but hey, it works! Here’s the HTML file and a screen shot of what it looks like in case anyone wants it. I understand that a plugin is in the offing from @mysps… which is good news. https://www.dropbox.com/sh/o4quz1nmdntzxko/1x0BNdL2GP
 
Kahuna
Apple Fan
Profile
Posts: 137
Reg: Nov 18, 2011
Milan
4,670
like
11/28/12 05:16 PM (13 years ago)
Hi @Dervalo, the last link provided is not working
 

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.