# jQuery JSON File Tree Miva Script Connector # # Version 1.00 # # Copyright 2009 Bischoff Claudiu # Miva Script Community ( http://mivascript.org/share/ ) # # 12 March 2009 # # History: # 1.00 - released (12 March 2009) # # Output a list of files for jQuery File Tree # Comments: http://extranet.mivamerchant.com/forums/showthread.php?t=20307 Specify here the location you want ( 'SCRIPT' or 'DATA' ). You must be careful, as you can open access to your databases to everyone. Please, if you are not sure about that, just ask in the Miva Script forums. # You can do whatever you want with this system. Instead using "dir" function, you can retrive data from a database # and show categories... The ones that don't have # The required fields to export are: # - name # - ext (if it's a file) # - icon (if you want to bypass the plugin default icons. You have to put the absolute pasth of your image (from the web root). # Use gif or png files for about 16px / 16px. # The rest of the items are just for example. Let's get the extension of the file It's a file ! It's a folder ! This function is just an example of permission on the Scan. If returned variable is 0, then no scan will be performed. You can modify that function to strip extensions or folders you don't want to show everyone ;-). - "l.ext" is the extension of the file. - "l.dir" id the direcotry - "l.loc" is the location (in our case 'SCRIPT' ----------------------------------------------- Here is an example of filtering files. In this example we will allow only folders and ".jpg" files. ----------------------------------------------