Commit | Line | Data |
---|---|---|
e3747bbc | 1 | # WCF 2.1.x - Package Components |
9b1568c9 | 2 | |
a33e31fa AE |
3 | ## package.xml |
4 | ||
5 | ### Short Instructions | |
6 | ||
7 | Instructions can now omit the filename, causing them to use the default filename if defined by the package installation plugin (in short: `PIP`). Unless overridden it will default to the PIP's class name with the first letter being lower-cased, e.g. `EventListenerPackageInstallationPlugin` implies the filename `eventListener.xml`. The file is always assumed to be in the archive's root, files located in subdirectories need to be explicitly stated, just as it worked before. | |
8 | ||
0b828ab7 | 9 | Every PIP can define a custom filename if the default value cannot be properly derived. For example the `ACPMenu`-pip would default to `aCPMenu.xml`, requiring the class to explicitly override the default filename with `acpMenu.xml` for readability. |
a33e31fa AE |
10 | |
11 | ### Example | |
12 | ||
13 | ```xml | |
14 | <instructions type="install"> | |
15 | <!-- assumes `eventListener.xml` --> | |
16 | <instruction type="eventListener" /> | |
17 | <!-- assumes `install.sql` --> | |
18 | <instruction type="sql" /> | |
19 | <!-- assumes `language/*.xml` --> | |
20 | <instruction type="language" /> | |
21 | ||
22 | <!-- exceptions --> | |
23 | ||
24 | <!-- assumes `files.tar` --> | |
25 | <instruction type="file" /> | |
26 | <!-- no default value, requires relative path --> | |
27 | <instruction type="script">acp/install_com.woltlab.wcf_3.0.php</instruction> | |
28 | </instructions> | |
29 | ``` | |
30 | ||
31 | ### Exceptions | |
32 | ||
9003992d | 33 | !!! info "These exceptions represent the built-in PIPs only, 3rd party plugins and apps may define their own exceptions." |
a33e31fa AE |
34 | |
35 | | PIP | Default Value | | |
36 | |-------|-------| | |
37 | | `acpTemplate` | `acptemplates.tar` | | |
38 | | `file` | `files.tar` | | |
39 | | `language` | `language/*.xml` | | |
40 | | `script` | (No default value) | | |
41 | | `sql` | `install.sql` | | |
42 | | `template` | `templates.tar` | | |
43 | ||
9b1568c9 AE |
44 | ## acpMenu.xml |
45 | ||
a33e31fa AE |
46 | ### Renamed Categories |
47 | ||
48 | The following categories have been renamed, menu items need to be adjusted to reflect the new names: | |
49 | ||
50 | | Old Value | New Value | | |
51 | |-------|-------| | |
52 | | `wcf.acp.menu.link.system` | `wcf.acp.menu.link.configuration` | | |
53 | | `wcf.acp.menu.link.display` | `wcf.acp.menu.link.customization` | | |
54 | | `wcf.acp.menu.link.community` | `wcf.acp.menu.link.application` | | |
55 | ||
56 | ### Submenu Items | |
57 | ||
58 | Menu items can now offer additional actions to be accessed from within the menu using an icon-based navigation. This step avoids filling the menu with dozens of `Add …` links, shifting the focus on to actual items. Adding more than one action is not recommended and you should at maximum specify two actions per item. | |
59 | ||
60 | ### Example | |
61 | ||
62 | ```xml | |
63 | <!-- category --> | |
64 | <acpmenuitem name="wcf.acp.menu.link.group"> | |
65 | <parent>wcf.acp.menu.link.user</parent> | |
66 | <showorder>2</showorder> | |
67 | </acpmenuitem> | |
68 | ||
69 | <!-- menu item --> | |
70 | <acpmenuitem name="wcf.acp.menu.link.group.list"> | |
71 | <controller>wcf\acp\page\UserGroupListPage</controller> | |
72 | <parent>wcf.acp.menu.link.group</parent> | |
73 | <permissions>admin.user.canEditGroup,admin.user.canDeleteGroup</permissions> | |
74 | </acpmenuitem> | |
75 | <!-- menu item action --> | |
76 | <acpmenuitem name="wcf.acp.menu.link.group.add"> | |
77 | <controller>wcf\acp\form\UserGroupAddForm</controller> | |
78 | <!-- actions are defined by menu items of menu items --> | |
79 | <parent>wcf.acp.menu.link.group.list</parent> | |
80 | <permissions>admin.user.canAddGroup</permissions> | |
81 | <!-- required FontAwesome icon name used for display --> | |
82 | <icon>fa-plus</icon> | |
83 | </acpmenuitem> | |
84 | ``` | |
85 | ||
86 | ### Common Icon Names | |
87 | ||
88 | You should use the same icon names for the (logically) same task, unifying the meaning of items and making the actions predictable. | |
89 | ||
90 | | Meaning | Icon Name | Result | | |
91 | |-------|-------|-------| | |
92 | | Add or create | `fa-plus` | <i class="fa fa-plus"></i> | | |
93 | | Search | `fa-search` | <i class="fa fa-search"></i> | | |
94 | | Upload | `fa-upload` | <i class="fa fa-upload"></i> | | |
95 | ||
9b1568c9 AE |
96 | ## box.xml |
97 | ||
28a75024 | 98 | The [box](package_pip_box.md) PIP has been added. |
a33e31fa | 99 | |
9b1568c9 AE |
100 | ## cronjob.xml |
101 | ||
9003992d | 102 | !!! warning "Legacy cronjobs are assigned a non-deterministic generic name, the only way to assign them a name is removing them and then adding them again." |
a33e31fa AE |
103 | |
104 | Cronjobs can now be assigned a name using the name attribute as in `<cronjob name="com.woltlab.wcf.refreshPackageUpdates">`, it will be used to identify cronjobs during an update or delete. | |
105 | ||
9b1568c9 AE |
106 | ## eventListener.xml |
107 | ||
9003992d | 108 | !!! warning "Legacy event listeners are assigned a non-deterministic generic name, the only way to assign them a name is removing them and then adding them again." |
a33e31fa AE |
109 | |
110 | Event listeners can now be assigned a name using the name attribute as in `<eventlistener name="sessionPageAccessLog">`, it will be used to identify event listeners during an update or delete. | |
111 | ||
9b1568c9 AE |
112 | ## menu.xml |
113 | ||
28a75024 | 114 | The [menu](package_pip_menu.md) PIP has been added. |
a33e31fa | 115 | |
9b1568c9 AE |
116 | ## menuItem.xml |
117 | ||
28a75024 | 118 | The [menuItem](package_pip_menu-item.md) PIP has been added. |
a33e31fa | 119 | |
9b1568c9 AE |
120 | ## objectType.xml |
121 | ||
a33e31fa AE |
122 | The definition `com.woltlab.wcf.user.dashboardContainer` has been removed, it was previously used to register pages that qualify for dashboard boxes. Since WoltLab Suite 3.0, all pages registered through the `page.xml` are valid containers and therefore there is no need for this definition anymore. |
123 | ||
124 | The definitions `com.woltlab.wcf.page` and `com.woltlab.wcf.user.online.location` have been superseded by the `page.xml`, they're no longer supported. | |
125 | ||
9b1568c9 AE |
126 | ## option.xml |
127 | ||
a33e31fa AE |
128 | The `module.display` category has been renamed into `module.customization`. |
129 | ||
9b1568c9 | 130 | ## page.xml |
a33e31fa | 131 | |
28a75024 | 132 | The [page](package_pip_page.md) PIP has been added. |
a33e31fa AE |
133 | |
134 | ## pageMenu.xml | |
135 | ||
136 | The `pageMenu.xml` has been superseded by the `page.xml` and is no longer available. |