Skip to content

Commit 20299cc

Browse files
committed
Update docs
1 parent 231644a commit 20299cc

File tree

6 files changed

+60
-48
lines changed

6 files changed

+60
-48
lines changed

docs/src/el/plugins/all-hooks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ public function prepareIconList(array &$icons): void
517517
518518
## Ρυθμίσεις πόρταλ
519519

520+
### extendBasicConfig
521+
522+
(`&$configVars`)
523+
524+
> adding custom configs in the portal basic settings area
525+
520526
### updateAdminAreas
521527

522528
(`&$areas`)

docs/src/el/plugins/create-new.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ order: 2
8686
```php:line-numbers
8787
<?php
8888
89-
/**
90-
* HelloWorld.php
91-
*
92-
* @package HelloWorld (Light Portal)
93-
* @link https://custom.simplemachines.org/index.php?mod=4244
94-
* @author Nickname <email>
95-
* @copyright 2023 Nickname
96-
* @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later
97-
*
98-
* @category addon
99-
* @version 15.02.24 (date when the source code of the plugin was created or last updated, in the format dd.mm.yy)
100-
*/
101-
10289
namespace Bugo\LightPortal\Addons\HelloWorld;
10390
10491
use Bugo\Compat\{Config, Lang, Utils};
@@ -109,9 +96,20 @@ if (! defined('LP_NAME'))
10996
11097
class HelloWorld extends Plugin
11198
{
112-
// Used properties and methods
113-
// Access to global variables: Utils::$context['user'], Config::$modSettings['variable'], etc.
114-
// Access to language variables: Lang::$txt['lp_hello_world']['variable_name']
99+
// FA icon (for blocks only)
100+
public string $icon = 'fas fa-globe';
101+
102+
// Your plugin's type
103+
public string $type = 'other';
104+
105+
// Optional init method
106+
public function init(): void
107+
{
108+
// Access to global variables: Utils::$context['user'], Config::$modSettings['variable'], etc.
109+
// Access to language variables: Lang::$txt['lp_hello_world']['variable_name']
110+
}
111+
112+
// Custom properties and methods
115113
}
116114
117115
```

docs/src/it/plugins/all-hooks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ public function prepareIconList(array &$icons): void
517517
518518
## Impostazioni Portale
519519

520+
### extendBasicConfig
521+
522+
(`&$configVars`)
523+
524+
> aggiunta di configurazioni personalizzate nell'area delle impostazioni di base del portale
525+
520526
### updateAdminAreas
521527

522528
(`&$areas`)

docs/src/it/plugins/create-new.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ Il file `index.php` può essere copiato da cartelle di altri plugin. Il file `He
8686
```php:line-numbers
8787
<?php
8888
89-
/**
90-
* HelloWorld.php
91-
*
92-
* @package HelloWorld (Light Portal)
93-
* @link https://custom.simplemachines.org/index.php?mod=4244
94-
* @author Nickname <email>
95-
* @copyright 2023 Nickname
96-
* @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later
97-
*
98-
* @category addon
99-
* @version 15.02.24 (date when the source code of the plugin was created or last updated, in the format dd.mm.yy)
100-
*/
101-
10289
namespace Bugo\LightPortal\Addons\HelloWorld;
10390
10491
use Bugo\Compat\{Config, Lang, Utils};
@@ -109,9 +96,20 @@ if (! defined('LP_NAME'))
10996
11097
class HelloWorld extends Plugin
11198
{
112-
// Used properties and methods
113-
// Access to global variables: Utils::$context['user'], Config::$modSettings['variable'], etc.
114-
// Access to language variables: Lang::$txt['lp_hello_world']['variable_name']
99+
// FA icon (for blocks only)
100+
public string $icon = 'fas fa-globe';
101+
102+
// Your plugin's type
103+
public string $type = 'other';
104+
105+
// Optional init method
106+
public function init(): void
107+
{
108+
// Access to global variables: Utils::$context['user'], Config::$modSettings['variable'], etc.
109+
// Access to language variables: Lang::$txt['lp_hello_world']['variable_name']
110+
}
111+
112+
// Custom properties and methods
115113
}
116114
117115
```

docs/src/ru/plugins/all-hooks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ public function prepareIconList(array &$icons): void
517517
518518
## Настройки портала
519519

520+
### extendBasicConfig
521+
522+
(`&$configVars`)
523+
524+
> добавление пользовательских параметров в области основных настроек портала
525+
520526
### updateAdminAreas
521527

522528
(`&$areas`)

docs/src/ru/plugins/create-new.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ order: 2
8686
```php:line-numbers
8787
<?php
8888
89-
/**
90-
* HelloWorld.php
91-
*
92-
* @package HelloWorld (Light Portal)
93-
* @link https://custom.simplemachines.org/index.php?mod=4244
94-
* @author Никнейм <email>
95-
* @copyright 2023 Никнейм
96-
* @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later
97-
*
98-
* @category addon
99-
* @version 15.02.24 (дата создания, а в дальнейшем — обновления кода плагина, в формате дд.мм.гг)
100-
*/
101-
10289
namespace Bugo\LightPortal\Addons\HelloWorld;
10390
10491
use Bugo\Compat\{Config, Lang, Utils};
@@ -109,9 +96,20 @@ if (! defined('LP_NAME'))
10996
11097
class HelloWorld extends Plugin
11198
{
112-
// Используемые свойства и методы
113-
// Доступ к глобальным переменным: Utils::$context['user'], Config::$modSettings['variable'], etc.
114-
// Доступ к языковым переменным: Lang::$txt['lp_hello_world']['variable_name']
99+
// FA icon (for blocks only)
100+
public string $icon = 'fas fa-globe';
101+
102+
// Your plugin's type
103+
public string $type = 'other';
104+
105+
// Optional init method
106+
public function init(): void
107+
{
108+
// Access to global variables: Utils::$context['user'], Config::$modSettings['variable'], etc.
109+
// Access to language variables: Lang::$txt['lp_hello_world']['variable_name']
110+
}
111+
112+
// Custom properties and methods
115113
}
116114
117115
```

0 commit comments

Comments
 (0)