tobychui 5 роки тому
батько
коміт
3b5a5254f2

BIN
docs/img/devdoc/5/5.png


BIN
docs/img/devdoc/5/5.psd


BIN
docs/img/devdoc/5/6.png


+ 49 - 0
docs/lang/dev-en-HK/5.md

@@ -346,7 +346,56 @@ array (size=4)
 
 
 ## File Extension Default Opener
+File Explorer can be used as the middle-ware to open any files in the ArOZ File System. However, you can only open files from /AOR or /media. In the following section, the method on how to call the API and how to set default opening module will be introduced.
+
+### File Opening API
+File Explorer provide API for opening a new file with given file opening module. To open a file from anyother module, you will need to request the File Explorer File Opening API with the following paramters.
+
+Example with ao_module wrapper
+```
+//Example for opening a file on Desktop named "file.mp4": 
+
+ao_module_openFile("Desktop/files/username/file.mp4","file.mp4");
+
+//You can also define a different name for the opener. Here is an example:
+
+ao_module_openFile("Desktop/files/TC/inithe38090e5b08fe9878ee5b48ee4babae38091546f75686f754d4144202d20546f75686f752026204e69746f72692047657420446f776e2120282b6c797269632920e380904844e38091205b373230705d.mp4","【小野崎人】TouhouMAD - Touhou %26 Nitori Get Down! (+lyric) 【HD】 [720p].mp4");
+```
+
+Example for direct calling to File Explorer API (Not recommended)
+```
+SystemAOB/functions/file_system/index.php?controlLv=2&mode=file&dir={filepath}&filename={filename}
+```
+
+### Adding / Changing default opener WebApp
+Your WebApp can modify the default opener by editing the respetive config file. In most case, the default openers defination should be stored under ```/file_system/default/*.csv```. 
+
+The format inside the default opener definations are as follows.
+```
+module_directory,open_mode,icon_tag,window_width,window_height,allow_resize(0/1),glass_Effect_mode(0/1)
+```
+
+- ```Module directory```	The directory that your put your WebApp into relative to AOR.
+- ```open_mode```	The opening mode of your module. Supports ```default / floatwindow / embedded```
+	- ```default```		Open the file with default application, filename pass by variable "filename"
+	- ```floatwindow```		Open the file with floatWindow if it is under VDI mode. If not, redirect to the application page.
+	- ```embedded```		Open the file with embedded mode if it is under VDI mode.(Make sure you have the embedded.php under the module root folder).
+- ```window_width```	Windows default width in pixel
+- ```window_height``` 	Windows default height in pixel
+- ```allow_resize```	Allow window to be resized. Override in non-VDI mode.
+- ```glass_Effect_mode```	Launch window with no background color. Override in non-VDI mode.
+
+![](img/devdoc/5/5.png)
+
+
+Here is an example from the png file extension default opener defination file.
+```
+Photo,embedded,file image outline,720,480,1,0
+```
 
 ## New Item Menu
 
+![](img/devdoc/5/6.png)
+
+The New Item Menu provide functions for users to create new file inside the file explorer in the current directory that they are browsing. Developers can add any new file to the list by putting a template inside ```file_system/newitem```. All files added will be available to all users.