Browse code

Change copyright comments

Benjamin Roth authored on07/05/2025 10:31:59
Showing1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 <?php
2 2
 
3 3
 /**
4
- * SecureDownloads for Contao
4
+ * Memberfiles for Contao
5 5
  *
6 6
  * Copyright (c) 2017 Benjamin Roth
7 7
  *
Browse code

Fix truncate sql error by changing sec_dl_access flag

Benjamin Roth authored on11/09/2023 10:38:46
Showing1 changed files
... ...
@@ -25,10 +25,12 @@ PaletteManipulator::create()
25 25
  */
26 26
 $GLOBALS['TL_DCA']['tl_user']['fields']['sec_dl_access'] = array
27 27
 (
28
-    'label'                 => &$GLOBALS['TL_LANG']['tl_user']['sec_dl_access'],
28
+    'label'                 => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'],
29 29
     'exclude'               => true,
30 30
     'filter'                => true,
31
+    'options'               => array('edit'),
32
+    'reference'             => &$GLOBALS['TL_LANG']['MSC'],
31 33
     'inputType'             => 'checkbox',
32
-    'sql'                   => "char(1) NOT NULL default ''"
34
+    'sql'                   => "blob NULL"
33 35
 
34 36
 );
Browse code

Update

Benjamin Roth authored on26/07/2023 15:18:55
Showing1 changed files
... ...
@@ -16,8 +16,8 @@ use Contao\CoreBundle\DataContainer\PaletteManipulator;
16 16
 PaletteManipulator::create()
17 17
     ->addLegend('sec_dl_legend','account_legend',PaletteManipulator::POSITION_BEFORE)
18 18
     ->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND)
19
-    ->applyToPalette('extend')
20
-    ->applyToPalette('custom');
19
+    ->applyToPalette('extend','tl_user')
20
+    ->applyToPalette('custom','tl_user');
21 21
 
22 22
 
23 23
 /**
Browse code

Update

Benjamin Roth authored on26/07/2023 13:13:48
Showing1 changed files
... ...
@@ -8,12 +8,16 @@
8 8
  * @license commercial
9 9
  */
10 10
 
11
+use Contao\CoreBundle\DataContainer\PaletteManipulator;
11 12
 
12 13
 /**
13 14
  * Extend a tl_user_group palette
14 15
  */
15
-$GLOBALS['TL_DCA']['tl_user']['palettes']['extend'] = str_replace(array('{account_legend}', '{account_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{account_legend}', $GLOBALS['TL_DCA']['tl_user']['palettes']['extend']);
16
-$GLOBALS['TL_DCA']['tl_user']['palettes']['custom'] = str_replace(array('{account_legend}', '{account_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{account_legend}', $GLOBALS['TL_DCA']['tl_user']['palettes']['custom']);
16
+PaletteManipulator::create()
17
+    ->addLegend('sec_dl_legend','account_legend',PaletteManipulator::POSITION_BEFORE)
18
+    ->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND)
19
+    ->applyToPalette('extend')
20
+    ->applyToPalette('custom');
17 21
 
18 22
 
19 23
 /**
... ...
@@ -27,4 +31,4 @@ $GLOBALS['TL_DCA']['tl_user']['fields']['sec_dl_access'] = array
27 31
     'inputType'             => 'checkbox',
28 32
     'sql'                   => "char(1) NOT NULL default ''"
29 33
 
30
-);
31 34
\ No newline at end of file
35
+);
Browse code

Add dcas

Benjamin Roth authored on17/07/2023 12:21:01
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,30 @@
1
+<?php
2
+
3
+/**
4
+ * SecureDownloads for Contao
5
+ *
6
+ * Copyright (c) 2017 Benjamin Roth
7
+ *
8
+ * @license commercial
9
+ */
10
+
11
+
12
+/**
13
+ * Extend a tl_user_group palette
14
+ */
15
+$GLOBALS['TL_DCA']['tl_user']['palettes']['extend'] = str_replace(array('{account_legend}', '{account_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{account_legend}', $GLOBALS['TL_DCA']['tl_user']['palettes']['extend']);
16
+$GLOBALS['TL_DCA']['tl_user']['palettes']['custom'] = str_replace(array('{account_legend}', '{account_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{account_legend}', $GLOBALS['TL_DCA']['tl_user']['palettes']['custom']);
17
+
18
+
19
+/**
20
+ * Add fields to tl_user_group
21
+ */
22
+$GLOBALS['TL_DCA']['tl_user']['fields']['sec_dl_access'] = array
23
+(
24
+    'label'                 => &$GLOBALS['TL_LANG']['tl_user']['sec_dl_access'],
25
+    'exclude'               => true,
26
+    'filter'                => true,
27
+    'inputType'             => 'checkbox',
28
+    'sql'                   => "char(1) NOT NULL default ''"
29
+
30
+);
0 31
\ No newline at end of file