Skip to content

Commit

Permalink
Finished dev-en-HK doc 5
Browse files Browse the repository at this point in the history
  • Loading branch information
tobychui committed Sep 13, 2019
1 parent 1e47744 commit 3b5a525
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
Binary file added docs/img/devdoc/5/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/devdoc/5/5.psd
Binary file not shown.
Binary file added docs/img/devdoc/5/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/lang/dev-en-HK/5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 3b5a525

Please sign in to comment.