Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 5    Views: 120

Repam
Aspiring developer
Profile
Posts: 4
Reg: Jan 11, 2013
Waterbury
6,740
04/12/13 10:26 AM (11 years ago)

Expanding the simple menu

I have 100 categories that need to go into the simple menu. The categories will change weekly. Is there a way to make the simple menu open to a url instead of another screen? Or a way to pass a variable to the Custom URL screen. I would prefer not to have to make 100+ screens The url I would be loading would be example.com?category=$var I would want the $var passed from the simple menu. thanks in advance.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/12/13 10:30 AM (11 years ago)
Are you saying you want a menu item to open to a URL? If so, that's totally possible...just pick the Custom URL screen and plugin the URL. You can send it to a script that outputs the required screen data. However, for each menu item, you do need to create a new screen that the item connects to, which would mean 100 Custom URL screens. Off the top of my head, I'm not sure of a way around that. Mark
 
Repam
Aspiring developer
Profile
Posts: 4
Reg: Jan 11, 2013
Waterbury
6,740
like
04/12/13 12:29 PM (11 years ago)
Based on what I"m reading the the app_Delagate.java file, the bt_config.txt can be located on a remote URL and I can use that to generate all of the screens? There is a "dataURL" in the the bt_config.txt but that shows only the original code before any modifications in eclipse. I would like to find the correct syntax for this.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/12/13 07:45 PM (11 years ago)
I'm off island travelling, so apologies for the lack of details, but you can do this with php if you don't mind an 'online' app. Look into 'loadScreenObject' and creating dynamic screens on the fly. Cheers! -- Smug
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/13/13 08:28 AM (11 years ago)
You can use the tips on this post. You don't necessarily need to use a Database and PHP to make it work. Alternatively to a DB-PHP combo, just point to hand-created JSON files that you will update on a weekly basis. http://www.buzztouch.com/forum/thread.php?fid=0AEFF1909A28E9AC27DD126&tid=0AEFF1909A28E9AC27DD126 -- Niraj
 
Repam
Aspiring developer
Profile
Posts: 4
Reg: Jan 11, 2013
Waterbury
6,740
like
04/16/13 09:22 AM (11 years ago)
Creating the JSON data with PHP and Mysql is no problem. What I need is the syntax to load the bt Screens list and the simple menu from a remote JSON FILE. "BT_screens":[ {"itemId":"2D3AAA3BEA352BC6B03014C", "itemType":"BT_screen_htmlDoc", "itemNickname":"MIDDLEBURY", "navBarTitleText":"MIDDLEBURY HOMES", "navBarRightButtonType":"refresh", "dataURL":"http://example.com/cdata.php?city=MIDDLEBURY"}, {"itemId":"FBEFB789A0084A915EB50D1", "itemType":"BT_screen_htmlDoc", "itemNickname":"BETHLEHEM", "navBarTitleText":"BETHLEHEM HOMES", "navBarRightButtonType":"refresh", "dataURL":"http://example.com/cdata.php?city=BETHLEHEM", "forceRefresh":"0", "includeAds":"1"}, And {"itemId":"0A127ECCACE52ECFF5589C3", "itemType":"BT_screen_menuListSimple", "itemNickname":"Towns", "navBarTitleText":"Towns", "includeAds":"1", "childItems":[{"itemId":"DD7398553331BB8BE407F78", "itemType":"BT_menuItem", "loadScreenWithItemId":"E9659D836D0437BDE30E61F","titleText":"Beacon Falls" }, {"itemId":"27BB77C7456FCF066EECB33", "itemType":"BT_menuItem", "loadScreenWithItemId":"FBEFB789A0084A915EB50D1","titleText":"Bethlehem" }, {"itemId":"420EB638A5C06339D50457B", "itemType":"BT_menuItem", "loadScreenWithItemId":"B5723C5C98764E8C4012007","titleText":"Bristol" },
 

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.