Browse code

Change icon for member file vault in backend and add translation

Benjamin Roth authored on07/05/2025 13:18:49
Showing1 changed files
... ...
@@ -22,6 +22,6 @@ $GLOBALS['TL_DCA']['tl_member']['list']['operations']['secureDownloads'] = array
22 22
 (
23 23
   'label'               => &$GLOBALS['TL_LANG']['tl_member']['secureDownloads'],
24 24
   'href'                => 'table='.SecureDownloadsModel::getTable(),
25
-  'icon'                => 'bundles/vonrotenbergmemberfiles/images/sec_files.png',
25
+  'icon'                => 'bundles/vonrotenbergmemberfiles/images/folder-secure.svg',
26 26
 
27 27
 );
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

Update

Benjamin Roth authored on26/07/2023 13:13:48
Showing1 changed files
... ...
@@ -8,6 +8,7 @@
8 8
  * @license commercial
9 9
  */
10 10
 
11
+use vonRotenberg\MemberfilesBundle\Model\SecureDownloadsModel;
11 12
 
12 13
 /**
13 14
  * Config
... ...
@@ -20,46 +21,7 @@ $GLOBALS['TL_DCA']['tl_member']['config']['ctable'][] = 'tl_member_secureDownloa
20 21
 $GLOBALS['TL_DCA']['tl_member']['list']['operations']['secureDownloads'] = array
21 22
 (
22 23
   'label'               => &$GLOBALS['TL_LANG']['tl_member']['secureDownloads'],
23
-  'href'                => 'table='.\eSM_secureDownloads\SecureDownloadsModel::getTable(),
24
-  'icon'                => 'system/modules/eSM_secureDownloads/assets/images/sec_files.png',
25
-  'button_callback'     => array('tl_member_eSM_secureDownloads', 'showDownloads')
24
+  'href'                => 'table='.SecureDownloadsModel::getTable(),
25
+  'icon'                => 'bundles/vonrotenbergmemberfiles/images/sec_files.png',
26 26
 
27 27
 );
28
-
29
-
30
-class tl_member_eSM_secureDownloads extends \Backend
31
-{
32
-  /**
33
-   * Import the back end user object
34
-   */
35
-  public function __construct()
36
-  {
37
-    parent::__construct();
38
-    $this->import('BackendUser', 'User');
39
-  }
40
-
41
-
42
-  /**
43
-   * Generate a "showDownloads" button and return it as string
44
-   *
45
-   * @param array  $row
46
-   * @param string $href
47
-   * @param string $label
48
-   * @param string $title
49
-   * @param string $icon
50
-   *
51
-   * @return string
52
-   */
53
-  public function showDownloads($row, $href, $label, $title, $icon)
54
-  {
55
-    if (!$this->User->isAdmin && !$this->User->hasAccess(1,'sec_dl_access'))
56
-    {
57
-      return '';
58
-    }
59
-
60
-    $href .= '&amp;id='.$row['id'];
61
-
62
-    return '<a href="'.$this->addToUrl($href).'" title="'.specialchars($title).'">'.Image::getHtml($icon, $label).'</a> ';
63
-  }
64
-
65
-}
66 28
\ No newline at end of file
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,65 @@
1
+<?php
2
+
3
+/**
4
+ * SecureDownloads for Contao
5
+ *
6
+ * Copyright (c) 2017 Benjamin Roth
7
+ *
8
+ * @license commercial
9
+ */
10
+
11
+
12
+/**
13
+ * Config
14
+ */
15
+$GLOBALS['TL_DCA']['tl_member']['config']['ctable'][] = 'tl_member_secureDownloads';
16
+
17
+/**
18
+ * Operations
19
+ */
20
+$GLOBALS['TL_DCA']['tl_member']['list']['operations']['secureDownloads'] = array
21
+(
22
+  'label'               => &$GLOBALS['TL_LANG']['tl_member']['secureDownloads'],
23
+  'href'                => 'table='.\eSM_secureDownloads\SecureDownloadsModel::getTable(),
24
+  'icon'                => 'system/modules/eSM_secureDownloads/assets/images/sec_files.png',
25
+  'button_callback'     => array('tl_member_eSM_secureDownloads', 'showDownloads')
26
+
27
+);
28
+
29
+
30
+class tl_member_eSM_secureDownloads extends \Backend
31
+{
32
+  /**
33
+   * Import the back end user object
34
+   */
35
+  public function __construct()
36
+  {
37
+    parent::__construct();
38
+    $this->import('BackendUser', 'User');
39
+  }
40
+
41
+
42
+  /**
43
+   * Generate a "showDownloads" button and return it as string
44
+   *
45
+   * @param array  $row
46
+   * @param string $href
47
+   * @param string $label
48
+   * @param string $title
49
+   * @param string $icon
50
+   *
51
+   * @return string
52
+   */
53
+  public function showDownloads($row, $href, $label, $title, $icon)
54
+  {
55
+    if (!$this->User->isAdmin && !$this->User->hasAccess(1,'sec_dl_access'))
56
+    {
57
+      return '';
58
+    }
59
+
60
+    $href .= '&amp;id='.$row['id'];
61
+
62
+    return '<a href="'.$this->addToUrl($href).'" title="'.specialchars($title).'">'.Image::getHtml($icon, $label).'</a> ';
63
+  }
64
+
65
+}
0 66
\ No newline at end of file