Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 63

NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
01/15/14 07:35 PM (11 years ago)

Menu with Image: adding menu items using the Screen Data URL

Just got this great plugin! I would like to load a file that has a list for the menu rows. Similar to the process used for a map locations as mentioned in the Control Panel I would have all the menu row data initially in an XLS spreadsheet Then export as "|" delimited CSV (Event Name | Date) Two row example of row title(Team) and row description(Date): Angels | May 23, 2014 Yankees | June 10, 2014 Hoping I could use a CSVtoJSON converter for the heavy lifting, but I do not see an example of what the final JSON data should look like. Can Susan or someone who has already done this post an example for a 2-3 row menu that I could start from? Thanks Kevin ======================== I saw a post which would then enable them to be sorted alphabetically :)
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/15/14 07:48 PM (11 years ago)
OK- I read the notes again on the Menu with Image plugin page but I am still missing something. 1) Shouldn't the data file be able to contain all of the fields? 2) Should be able to reference Screen Nickname not ScreenID (or very painful ;) ============================================================ The notes for loading the data file show: { "childItems":[ { "itemId":"menu_1", "itemType":"BT_menuItem", "titleText":"This is row 1", "loadScreenWithItemId":"1234" }, { "itemId":"menu_2", "itemType":"BT_menuItem", "titleText":"This is row 2", "loadScreenWithItemId":"5678" }, ] } ============================ The notes show that the Control Panel includes additional info: "childItems":[ { "itemId":"menu_1", "itemType":"BT_menuItem", "titleText":"This is row 1", "loadScreenWithItemId":"1234", "descriptionText":"My description text", "iconName":"magnify.png", "rowAccessoryType":"none" }, { "itemId":"menu_2", "itemType":"BT_menuItem", "titleText":"This is row two", "loadScreenWithItemId":"5678" , "descriptionText":"My description text", "iconName":"magnify.png", "rowAccessoryType":"none" } ] }
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/15/14 08:05 PM (11 years ago)
If you're self hosted, stroll over to Buzztouchmods.com/market and pick up my free 'childItems creator' script. Automatically converts your excel/csv into BT Compliant Json child Item files. easy to use. Cheers! -- Smug and although it's a little dated, the documentation for BT v1.5 still has a LOT of good info in it: http://www.buzztouch.com/docs/v1.5/ http://www.buzztouch.com/docs/v1.5/child_menuListItems.php
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/15/14 08:12 PM (11 years ago)
Not self hosted... Reading sounds perfect! Wish there was a web-based version of the tool that could run against local files.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/15/14 08:14 PM (11 years ago)
Just noticed the links. The second one looks like enough info to be dangerous ;) Thanks!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/15/14 08:21 PM (11 years ago)
Niraj pointed out an easy way to use it locally in this post: http://www.buzztouch.com/forum/thread.php?tid=A27A66998C9514DA91C7924&fid=06DB0BCB08E6666&sortColumn=FT.id&sortUpDown=&currentPage=1 It's all driven by javascript; you shouldn't have a problem with it... Cheers! -- Smug
 
AussieRyan
Aspiring developer
Profile
Posts: 148
Reg: Mar 21, 2012
Margate, QLD Au...
1,480
like
01/15/14 08:47 PM (11 years ago)
If you are not sure about setting up your spreadsheet, there are utilities to convert json to csv (using sample data created from control panel) http://jsfiddle.net/hybrid13i/JXrwM/ http://www.danmandle.com/blog/json-to-csv-conversion-utility/
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/15/14 09:12 PM (11 years ago)
Thanks everybody- All is working! I have a JSON file that works great now thanks to the link from Smug. Next up is using Niraj's suggestion and I am off and running. Well at least walking ;) The cool thing about this is I can preload a bunch of data/menu items now and come back and update the loadScreenWithNickname later :) AussieRyan - Thanks for the link to the tool going the other way. I am sure I will be using it in the future also. - Kevin PS for the other novices out there watch the Upper-Lower case. I was staring at the screen wondering why it wasn't working when I saw I had typed NickName instead of Nickname ;)
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
01/15/14 09:32 PM (11 years ago)
Sweet mama, look at that mustang run! :-) -- Niraj
 

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.