Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 98

Kristian_N
Code is Art
Profile
Posts: 91
Reg: Oct 27, 2011
Copenhagen
2,610
05/09/16 05:35 AM (8 years ago)

Populate Menu items from URL

Hi, I'm not really good at JSON and since I want to populate a Menu Items list from a file stored in the cloud, I'd like to know if someone has a working file that I can play around with? I will be using the "Simple Menu" or "Menu With Image" plugin. My data comes from a CSV file so if you can direct me to a tool that can convert it to a JSON file, I'd appreciate that. I have previously used Stobes tool to make a JSON file that worked as a source for a map using "Map Location" plugin, and this works fine but i don't think i can use this for my new - menu - purpose. As always - Thanks guys! Kristian, Copenhagen
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
05/09/16 07:04 AM (8 years ago)
The best csv to json converter I've used: http://shancarter.github.io/mr-data-converter/
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
05/09/16 11:38 AM (8 years ago)
You may want to have a look at my article here: http://duskosavic.com/blog/programming/a-full-circle-from-menu-simple-to-php-to-json-to-menu-simple-again/ It will give you an idea how to proceed.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/09/16 12:27 PM (8 years ago)
I have an example that you can find here: http://www.buzztouch.com/plugins/plugin.php?pid=5DDEAB1E0B50ECC91C30DB8 It is for for the Menu Buttons Plus plugin but would probably work for other menus too with little modification.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/09/16 12:34 PM (8 years ago)
As for CSV to JSON, I have done it with excel macros but it is tricky, I would try this for an easy option: http://csvtojson.com/ Or maybe this? https://github.com/cparker15/csv-to-json?files=1
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/09/16 05:51 PM (8 years ago)
I modified the shan carter script for Buzztouch use; just unzip it and set it up in your BT Control panel. https://www.marianasgps.com/public/sjcon.zip contains a php file (for the server) and an html file (for local use). Works fine, lasts a long time. Cheers! -- Smug
 

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.