myaac/plugins/example.json
slawkens c7a6a539a9 Another approach to fix duplicates - priorities
Priority description: (lower number - higher priority)
1-99 Highest priority - overrides everything, even pages from database, use with caption
100 - default for pages in database
101-999 - recommended range for plugins
1000 - default value for plugins if no other specified
1001 - 9999 - no usage currently
10000 - default myaac routes
2024-06-13 21:35:47 +02:00

53 lines
1.2 KiB
JSON

{
"enabled": 0,
"name": "Example Plugin",
"description": "This is just an example of a Plugin for MyAAC.",
"version": "1.0",
"author": "nobody",
"contact": "nobody@example.org",
"require": {
"myaac": "0.9.0",
"myaac_": ">=0.9,<1.0",
"php": "7.4",
"php_": ">7.4,<8.0",
"database": "21",
"php-ext": "curl",
"ext-curl": ">5.0",
"table": "accounts",
"column": "players.online"
},
"install": "plugins/example/install.php",
"uninstall": [
"plugins/example.json",
"plugins/example-directory",
"templates/other-directory"
],
"hooks": {
"Example Hook": {
"type": "BEFORE_PAGE",
"file": "plugins/example/before.php"
}
},
"routes": {
"First Route": {
"pattern": "/YourAwesomePage/{name:string}/{page:int}",
"file": "plugins/your-plugin/your-awesome-page.php",
"method": "GET",
"priority": "130"
},
"Redirect Example": {
"redirect_from": "/redirectExample",
"redirect_to": "account/manage"
}
},
"routes-default-priority": 1000,
"pages-default-priority": 1000,
"settings": "plugins/your-plugin-folder/settings.php",
"autoload": {
"pages": true,
"pagesSubFolders": false,
"commands": true,
"themes": true
}
}