| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,40 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-declare(strict_types=1); |
|
| 4 |
- |
|
| 5 |
-/* |
|
| 6 |
- * This file is part of Oveleon ContaoMemberExtension Bundle. |
|
| 7 |
- * |
|
| 8 |
- * @package contao-member-extension-bundle |
|
| 9 |
- * @license MIT |
|
| 10 |
- * @author Daniele Sciannimanica <https://github.com/doishub> |
|
| 11 |
- * @author Fabian Ekert <https://github.com/eki89> |
|
| 12 |
- * @author Sebastian Zoglowek <https://github.com/zoglo> |
|
| 13 |
- * @copyright Oveleon <https://www.oveleon.de/> |
|
| 14 |
- */ |
|
| 15 |
- |
|
| 16 |
-use Contao\Config; |
|
| 17 |
-use Contao\CoreBundle\DataContainer\PaletteManipulator; |
|
| 18 |
- |
|
| 19 |
-// Extend the default palette |
|
| 20 |
-PaletteManipulator::create() |
|
| 21 |
- ->addField(['avatar'], 'personal_legend', PaletteManipulator::POSITION_APPEND) |
|
| 22 |
- ->applyToPalette('default', 'tl_member')
|
|
| 23 |
-; |
|
| 24 |
- |
|
| 25 |
-// Add global operations |
|
| 26 |
-$GLOBALS['TL_DCA']['tl_member']['list']['global_operations']['settings'] = [ |
|
| 27 |
- 'label' => &$GLOBALS['TL_LANG']['tl_member']['settings'], |
|
| 28 |
- 'href' => 'do=member_settings', |
|
| 29 |
- 'icon' => 'edit.svg', |
|
| 30 |
- 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 31 |
-]; |
|
| 32 |
- |
|
| 33 |
-// Add fields to tl_user |
|
| 34 |
-$GLOBALS['TL_DCA']['tl_member']['fields']['avatar'] = [ |
|
| 35 |
- 'label' => &$GLOBALS['TL_LANG']['tl_member']['avatar'], |
|
| 36 |
- 'exclude' => true, |
|
| 37 |
- 'inputType' => 'fileTree', |
|
| 38 |
- 'eval' => ['feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'personal', 'fieldType'=>'radio', 'filesOnly'=>true, 'isGallery'=>true, 'extensions'=>Config::get('validImageTypes'), 'tl_class'=>'clr'],
|
|
| 39 |
- 'sql' => "binary(16) NULL" |
|
| 40 |
-]; |
| ... | ... |
@@ -13,21 +13,22 @@ declare(strict_types=1); |
| 13 | 13 |
* @copyright Oveleon <https://www.oveleon.de/> |
| 14 | 14 |
*/ |
| 15 | 15 |
|
| 16 |
+use Contao\Config; |
|
| 17 |
+use Contao\CoreBundle\DataContainer\PaletteManipulator; |
|
| 18 |
+ |
|
| 16 | 19 |
// Extend the default palette |
| 17 |
-Contao\CoreBundle\DataContainer\PaletteManipulator::create() |
|
| 18 |
- ->addField(['avatar'], 'personal_legend', Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND) |
|
| 20 |
+PaletteManipulator::create() |
|
| 21 |
+ ->addField(['avatar'], 'personal_legend', PaletteManipulator::POSITION_APPEND) |
|
| 19 | 22 |
->applyToPalette('default', 'tl_member')
|
| 20 | 23 |
; |
| 21 | 24 |
|
| 22 | 25 |
// Add global operations |
| 23 |
-array_insert($GLOBALS['TL_DCA']['tl_member']['list']['global_operations'], 0, [ |
|
| 24 |
- 'settings' => [ |
|
| 25 |
- 'label' => &$GLOBALS['TL_LANG']['tl_member']['settings'], |
|
| 26 |
- 'href' => 'do=member_settings', |
|
| 27 |
- 'icon' => 'edit.svg', |
|
| 28 |
- 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 29 |
- ] |
|
| 30 |
-]); |
|
| 26 |
+$GLOBALS['TL_DCA']['tl_member']['list']['global_operations']['settings'] = [ |
|
| 27 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_member']['settings'], |
|
| 28 |
+ 'href' => 'do=member_settings', |
|
| 29 |
+ 'icon' => 'edit.svg', |
|
| 30 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 31 |
+]; |
|
| 31 | 32 |
|
| 32 | 33 |
// Add fields to tl_user |
| 33 | 34 |
$GLOBALS['TL_DCA']['tl_member']['fields']['avatar'] = [ |
| ... | ... |
@@ -1,35 +1,39 @@ |
| 1 | 1 |
<?php |
| 2 | 2 |
|
| 3 |
+declare(strict_types=1); |
|
| 4 |
+ |
|
| 3 | 5 |
/* |
| 4 | 6 |
* This file is part of Oveleon ContaoMemberExtension Bundle. |
| 5 | 7 |
* |
| 6 |
- * (c) https://www.oveleon.de/ |
|
| 8 |
+ * @package contao-member-extension-bundle |
|
| 9 |
+ * @license MIT |
|
| 10 |
+ * @author Daniele Sciannimanica <https://github.com/doishub> |
|
| 11 |
+ * @author Fabian Ekert <https://github.com/eki89> |
|
| 12 |
+ * @author Sebastian Zoglowek <https://github.com/zoglo> |
|
| 13 |
+ * @copyright Oveleon <https://www.oveleon.de/> |
|
| 7 | 14 |
*/ |
| 8 | 15 |
|
| 9 | 16 |
// Extend the default palette |
| 10 | 17 |
Contao\CoreBundle\DataContainer\PaletteManipulator::create() |
| 11 |
- ->addField(array('avatar'), 'personal_legend', Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)
|
|
| 18 |
+ ->addField(['avatar'], 'personal_legend', Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND) |
|
| 12 | 19 |
->applyToPalette('default', 'tl_member')
|
| 13 | 20 |
; |
| 14 | 21 |
|
| 15 | 22 |
// Add global operations |
| 16 |
-array_insert($GLOBALS['TL_DCA']['tl_member']['list']['global_operations'], 0, array |
|
| 17 |
-( |
|
| 18 |
- 'settings' => array |
|
| 19 |
- ( |
|
| 20 |
- 'label' => &$GLOBALS['TL_LANG']['tl_member']['settings'], |
|
| 21 |
- 'href' => 'do=member_settings', |
|
| 22 |
- 'icon' => 'edit.svg', |
|
| 23 |
- 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 24 |
- ) |
|
| 25 |
-)); |
|
| 23 |
+array_insert($GLOBALS['TL_DCA']['tl_member']['list']['global_operations'], 0, [ |
|
| 24 |
+ 'settings' => [ |
|
| 25 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_member']['settings'], |
|
| 26 |
+ 'href' => 'do=member_settings', |
|
| 27 |
+ 'icon' => 'edit.svg', |
|
| 28 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 29 |
+ ] |
|
| 30 |
+]); |
|
| 26 | 31 |
|
| 27 | 32 |
// Add fields to tl_user |
| 28 |
-$GLOBALS['TL_DCA']['tl_member']['fields']['avatar'] = array |
|
| 29 |
-( |
|
| 30 |
- 'label' => &$GLOBALS['TL_LANG']['tl_member']['avatar'], |
|
| 31 |
- 'exclude' => true, |
|
| 32 |
- 'inputType' => 'fileTree', |
|
| 33 |
- 'eval' => array('feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'personal', 'fieldType'=>'radio', 'filesOnly'=>true, 'isGallery'=>true, 'extensions'=>Config::get('validImageTypes'), 'tl_class'=>'clr'),
|
|
| 34 |
- 'sql' => "binary(16) NULL" |
|
| 35 |
-); |
|
| 36 | 33 |
\ No newline at end of file |
| 34 |
+$GLOBALS['TL_DCA']['tl_member']['fields']['avatar'] = [ |
|
| 35 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_member']['avatar'], |
|
| 36 |
+ 'exclude' => true, |
|
| 37 |
+ 'inputType' => 'fileTree', |
|
| 38 |
+ 'eval' => ['feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'personal', 'fieldType'=>'radio', 'filesOnly'=>true, 'isGallery'=>true, 'extensions'=>Config::get('validImageTypes'), 'tl_class'=>'clr'],
|
|
| 39 |
+ 'sql' => "binary(16) NULL" |
|
| 40 |
+]; |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,35 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/* |
|
| 4 |
+ * This file is part of Oveleon ContaoMemberExtension Bundle. |
|
| 5 |
+ * |
|
| 6 |
+ * (c) https://www.oveleon.de/ |
|
| 7 |
+ */ |
|
| 8 |
+ |
|
| 9 |
+// Extend the default palette |
|
| 10 |
+Contao\CoreBundle\DataContainer\PaletteManipulator::create() |
|
| 11 |
+ ->addField(array('avatar'), 'personal_legend', Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)
|
|
| 12 |
+ ->applyToPalette('default', 'tl_member')
|
|
| 13 |
+; |
|
| 14 |
+ |
|
| 15 |
+// Add global operations |
|
| 16 |
+array_insert($GLOBALS['TL_DCA']['tl_member']['list']['global_operations'], 0, array |
|
| 17 |
+( |
|
| 18 |
+ 'settings' => array |
|
| 19 |
+ ( |
|
| 20 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_member']['settings'], |
|
| 21 |
+ 'href' => 'do=member_settings', |
|
| 22 |
+ 'icon' => 'edit.svg', |
|
| 23 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 24 |
+ ) |
|
| 25 |
+)); |
|
| 26 |
+ |
|
| 27 |
+// Add fields to tl_user |
|
| 28 |
+$GLOBALS['TL_DCA']['tl_member']['fields']['avatar'] = array |
|
| 29 |
+( |
|
| 30 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_member']['avatar'], |
|
| 31 |
+ 'exclude' => true, |
|
| 32 |
+ 'inputType' => 'fileTree', |
|
| 33 |
+ 'eval' => array('feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'personal', 'fieldType'=>'radio', 'filesOnly'=>true, 'isGallery'=>true, 'extensions'=>Config::get('validImageTypes'), 'tl_class'=>'clr'),
|
|
| 34 |
+ 'sql' => "binary(16) NULL" |
|
| 35 |
+); |
|
| 0 | 36 |
\ No newline at end of file |