f793bf31f23a2ef8596a76df7f74e6210eff1ade
[GitHub/WoltLab/woltlab.github.io.git] / docs / package_pip_user-group-option.md
1 ---
2 title: User Group Option Package Installation Plugin
3 sidebar: sidebar
4 permalink: package_pip_user-group-option.html
5 folder: package/pip
6 parent: package_pip
7 ---
8
9 Registers new user group options (“permissions”).
10 The behaviour of this package installation plugin closely follows the [option](package_pip_option.md) PIP.
11
12 ## Category Components
13
14 The category definition works exactly like the option PIP.
15
16 ## Option Components
17
18 The fields `hidden`, `supporti18n` and `requirei18n` do not apply.
19 The following extra fields are defined:
20
21 ### `<(admin|mod|user)defaultvalue>`
22
23 Defines the `defaultvalue`s for subsets of the groups:
24
25 | Type | Description |
26 | ----- | ---------------------------------------------------------------------------------------------- |
27 | admin | Groups where the `admin.user.accessibleGroups` user group option includes every group. |
28 | mod | Groups where the `mod.general.canUseModeration` is set to `true`. |
29 | user | Groups where the internal group type is neither `UserGroup::EVERYONE` nor `UserGroup::GUESTS`. |
30
31 ### `<usersonly>`
32
33 Makes the option unavailable for groups with the group type `UserGroup::GUESTS`.
34
35 ## Language Items
36
37 All relevant language items have to be put into the `wcf.acp.group` language item category.
38
39 ### Categories
40
41 If you install a category named `user.foo`, you have to provide the language item `wcf.acp.group.option.category.user.foo`, which is used when displaying the options.
42 If you want to provide an optional description of the category, you have to provide the language item `wcf.acp.group.option.category.user.foo.description`.
43 Descriptions are only relevant for categories whose parent has a parent itself, i.e. categories on the third level.
44
45 ### Options
46
47 If you install an option named `user.foo.canBar`, you have to provide the language item `wcf.acp.group.option.user.foo.canBar`, which is used as a label for setting the option value.
48 If you want to provide an optional description of the option, you have to provide the language item `wcf.acp.group.option.user.foo.canBar.description`.