Function __global->edit_leader_board
Definitions
sources/leader_board2.php
- Edit a leader-board.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the leader-board to edit |
| $title | SHORT_TEXT | No | No | required parameter | N/A | N/A | The leader-board title |
| $board_type | ?SHORT_TEXT | No | No | required parameter | holders earners | N/A | The type of leader-board (null: do not change) |
| $member_count | integer | No | No | required parameter | N/A | N/A | The number of top members to use for this leader-board |
| $timeframe | SHORT_TEXT | No | No | required parameter | week month year | N/A | The frequency which to re-calculate the leader-board |
| $rolling | BINARY | No | No | required parameter | N/A | N/A | Whether or not re-calculation should be relative to the creation time of the leader-board |
| $include_staff | BINARY | No | No | required parameter | N/A | N/A | Whether or not to include staff in the leader-board |
| $usergroups | ?array | No | No | required parameter | N/A | N/A | Only allow members in one or more of the defined usergroup IDs to be in the leader-board (null: do not edit existing usergroups) (empty array: no usergroup filtering) |
| $calculate_voting_power | BINARY | No | No | required parameter | N/A | N/A | Whether this leader-board should also calculate voting power and control percentages for leaders to display |
Preview
Code (PHP)
/**
* Edit a leader-board.
*
* @param AUTO_LINK $id The ID of the leader-board to edit
* @param SHORT_TEXT $title The leader-board title
* @param ?SHORT_TEXT $board_type The type of leader-board (null: do not change)
* @set holders earners
* @param integer $member_count The number of top members to use for this leader-board
* @param SHORT_TEXT $timeframe The frequency which to re-calculate the leader-board
* @set week month year
* @param BINARY $rolling Whether or not re-calculation should be relative to the creation time of the leader-board
* @param BINARY $include_staff Whether or not to include staff in the leader-board
* @param ?array $usergroups Only allow members in one or more of the defined usergroup IDs to be in the leader-board (null: do not edit existing usergroups) (empty array: no usergroup filtering)
* @param BINARY $calculate_voting_power Whether this leader-board should also calculate voting power and control percentages for leaders to display
*/
function edit_leader_board(int $id, string $title, ?string $board_type, int $member_count, string $timeframe, int $rolling, int $include_staff, ?array $usergroups, int $calculate_voting_power)
* Edit a leader-board.
*
* @param AUTO_LINK $id The ID of the leader-board to edit
* @param SHORT_TEXT $title The leader-board title
* @param ?SHORT_TEXT $board_type The type of leader-board (null: do not change)
* @set holders earners
* @param integer $member_count The number of top members to use for this leader-board
* @param SHORT_TEXT $timeframe The frequency which to re-calculate the leader-board
* @set week month year
* @param BINARY $rolling Whether or not re-calculation should be relative to the creation time of the leader-board
* @param BINARY $include_staff Whether or not to include staff in the leader-board
* @param ?array $usergroups Only allow members in one or more of the defined usergroup IDs to be in the leader-board (null: do not edit existing usergroups) (empty array: no usergroup filtering)
* @param BINARY $calculate_voting_power Whether this leader-board should also calculate voting power and control percentages for leaders to display
*/
function edit_leader_board(int $id, string $title, ?string $board_type, int $member_count, string $timeframe, int $rolling, int $include_staff, ?array $usergroups, int $calculate_voting_power)

