Browse code

Version 1.5 initial commit

Benjamin Roth authored on24/06/2024 12:06:17
Showing1 changed files
... ...
@@ -1,36 +1,40 @@
1
-<p align="center"><img src="https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/cme-logo.svg" width="200"></p>
1
+<p align="center"><img src="/assets/markdown/logo.svg" width="200" alt="Contao Member Extension Bundle"></p>
2 2
 <h1 align="center">Contao Member Extension Bundle</h1>
3 3
 <p align="center"><i>Adds a listing of members with detail pages and extends them with an avatar that can be uploaded and deleted</i></p>
4 4
 <p align="center">
5
-    <a href="https://www.oveleon.de"><img src="https://img.shields.io/badge/oveleon-maintained-83aa0e?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8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8sRGICYyfdrgBA8Q2kmfnzQJirghlw+XZANUQ5qFmHY52R9/9lWCXjBpbRPcaubDhtHsRoOuN1reAO/1H/PpzfdaqrggzOLK7YFD6zPMqeL9at0gwWZuKa0i3hkuZf1E6tteqEZnmCRbZVwxPIOn3V83litaogzbrPuhDOIwbyUd8q8SavBOpl0rnxROadFugkFVoOJAx1h4rRJvw9e2b9u3ACrY9ENAZaD/L/E0aiHMbbfQc3v7bFxWAchqptHAAqN3HQrM0JcsXFohzzexWPYk5N+BBgAix5VyvzRZbwAAAAASUVORK5CYII=" alt="Oveleon"></a>
6
-    <a href="https://github.com/oveleon/https://github.com/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/badge/license-MIT-83aa0e?style=flat-square"/></a>
7
-    <a href="https://packagist.org/packages/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/packagist/dt/oveleon/contao-member-extension-bundle?color=0A7BBC&style=flat-square"/></a>
5
+    <a href="https://github.com/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/github/license/oveleon/contao-member-extension-bundle?color=ef9838"/></a>
6
+    <a href="https://www.oveleon.de"><img src="https://img.shields.io/badge/oveleon-maintained-ef9838?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyL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QAAAbFJREFUeNqU08srRFEcB/BromGGaJRHKSIaYfIm7JRSsvHIyuM/wMorNeEfUMqKnbKwU2TBwpSUSWYWFmSBDKWmWcgwcX2Pvrc5HXfuXL/6zD2P3z2Puedouq5rilG40JPxAuUmeX84tGTkwyXsghOWYQmKoFazExzVDXFIgEeazcPV9TCnzGplRiHMl7KgCWYghy9vQAasMEfkTqQarJ9JFWw0YlhJFv2rUv8tdKiDhTib0eiHQyhOsR2xyjlp0BF5MBELdr6WohE++X6raBOz6PwWCfiCOLzDN8sRGICYyfdrgBA8Q2kmfnzQJirghlw+XZANUQ5qFmHY52R9/9lWCXjBpbRPcaubDhtHsRoOuN1reAO/1H/PpzfdaqrggzOLK7YFD6zPMqeL9at0gwWZuKa0i3hkuZf1E6tteqEZnmCRbZVwxPIOn3V83litaogzbrPuhDOIwbyUd8q8SavBOpl0rnxROadFugkFVoOJAx1h4rRJvw9e2b9u3ACrY9ENAZaD/L/E0aiHMbbfQc3v7bFxWAchqptHAAqN3HQrM0JcsXFohzzexWPYk5N+BBgAix5VyvzRZbwAAAAASUVORK5CYII=" alt="Oveleon"></a>
7
+    <a href="https://packagist.org/packages/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/packagist/dt/oveleon/contao-member-extension-bundle?color=59a192"/></a>
8
+    <a href="https://packagist.org/packages/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/packagist/dependency-v/oveleon/contao-member-extension-bundle/php?color=59a192"></a>
9
+<a href="https://github.com/sponsors/oveleon"><img src="https://img.shields.io/github/sponsors/oveleon?label=Sponsor&logo=GitHub&color=%23fe8e86"/></a>
8 10
 </p>
9 11
 <br/>
10 12
 
11 13
 ---
12 14
 
13
-> Working with **Contao 4.13** (PHP ^8.0)
15
+> Working with **Contao 4.13** and **Contao ^5.3** (PHP ^8.1)
14 16
 
15 17
 ---
16 18
 
17 19
 The Member extension bunde adds the possibility to display members and their details in lists using frontend modules.
18
-The member options are extended with an avatar that can be changed and uploaded in the member edit module and registration module.
19
-Additionally, you can display members with their details in a reader page.
20
+The member options are extended with an avatar that can be changed and uploaded in the member edit module and
21
+registration module. Additionally, you can display members with their details in a reader page.
20 22
 
21 23
 + [Features](#features)
22 24
 + [Installation](#installation)
23
-   + [Upgrading (v.1.1 to >=v.1.2)](#upgrading-to-version--12)
24
-   + [Composer](#via-composer)
25
-   + [Contao Manager](#via-contao-manager)
25
+    + [Composer](#via-composer)
26
+    + [Contao Manager](#via-contao-manager)
26 27
 + [Initial Setup](#initial-setup)
27 28
 + [Insert tags](#insert-tags)
28
-   + [Avatar insert tags](#avatar-insert-tags)
29
+    + [Avatar insert tags](#avatar-insert-tags)
29 30
 + [Front end modules](#front-end-modules)
30
-   + [Memberlist](#memberlist)
31
-   + [Memberreader](#memberreader)
32
-   + [Avatar / Profile picture](#avatar--profile-picture)
33
-   + [Delete avatar](#delete-avatar)
31
+    + [Memberlist](#memberlist)
32
+    + [Memberreader](#memberreader)
33
+    + [Avatar / Profile picture](#avatar--profile-picture)
34
+    + [Delete avatar](#delete-avatar)
35
++ [Advanced](#advanced)
36
+    + [Filter](#filter)
37
+    + [Hooks](#hooks)
34 38
 + [Support](#support)
35 39
 + [Sponsoring](#sponsoring)
36 40
 
... ...
@@ -41,20 +45,21 @@ Additionally, you can display members with their details in a reader page.
41 45
 - Paginated member lists
42 46
 - Member detail pages
43 47
 - Insert tags for member avatars
48
+- Sortable data-tables (funded by @netzarbeiter)
49
+  - requires jQuery to work (https://datatables.net/)
44 50
 
45 51
 ---
46 52
 
47 53
 ## Installation
48 54
 
49
-#### Upgrading to version >=1.2
50
-> After upgrading from version 1.1 to version >=1.2, make sure to edit your modules (memberlist, memberreader and avatar/profile picture) and set up the new templates.
51
-
52 55
 #### Via composer
56
+
53 57
 ```
54 58
 composer require oveleon/contao-member-extension-bundle
55 59
 ```
56 60
 
57 61
 #### Via contao-manager
62
+
58 63
 ```
59 64
 Search for contao member extension bundle and add it to your extensions.
60 65
 ```
... ...
@@ -64,50 +69,54 @@ After installing the contao-member-extension-bundle, you need to run a **contao
64 69
 ---
65 70
 
66 71
 ## Initial setup
72
+
67 73
 This bundle extends contao with the possibiity to extend members with an avatar and displaying members in a list with
68 74
 detail pages.
69 75
 
70 76
 1. Go into members and set up a default avatar in the newly added settings
71 77
 
72
-    ![Admin View: Member overview](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar.jpg)
73
-    ![Admin View: Member settings](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar_setup.jpg)
78
+   ![Admin View: Member overview](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar.jpg)
79
+   ![Admin View: Member settings](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar_setup.jpg)
74 80
 
75 81
 2. To display your members, you need to set up a memberlist
76
-   1. Create the front end module *memberlist*
77
-   2. Choose the member groups and the member fields that should be displayed
78
-   3. Optionally you can set up a redirect page to your memberreader
79
-   4. Embed the module in a page
82
+    1. Create the front end module *memberlist*
83
+    2. Choose the member groups and the member fields that should be displayed
84
+    3. Optionally you can set up a redirect page to your memberreader
85
+    4. Embed the module in a page
80 86
 
81
-    ![Admin View: Memberlist](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberlist.jpg)
87
+   ![Admin View: Memberlist](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberlist.jpg)
82 88
 
83 89
 3. Displaying the avatar
84
-   1. Create the front end module *Avatar / profile picture*
85
-   2. Optionally you can set an image size
86
-   3. Embed the module in a page
90
+    1. Create the front end module *Avatar / profile picture*
91
+    2. Optionally you can set an image size
92
+    3. Embed the module in a page
87 93
 
88
-    ![Admin View: MemberAvatar](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberavatar.jpg)
94
+   ![Admin View: MemberAvatar](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberavatar.jpg)
89 95
 
90 96
 4. Module to delete an avatar
91
-   1. Create the front end module *Delete Avatar*
92
-   2. Embed the module in a page
93
-   3. The module only appears if a frontend user is logged in
94
-   4. You can check the "profile picture option" within registration to enable members to upload a profile picture within
95
-   registration
97
+    1. Create the front end module *Delete Avatar*
98
+    2. Embed the module in a page
99
+    3. The module only appears if a frontend user is logged in
100
+    4. You can check the "profile picture option" within registration to enable members to upload a profile picture
101
+       within
102
+       registration
96 103
 
97
-    ![Admin View: MemberDeleteAvatar](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberdeleteavatar.jpg)
104
+   ![Admin View: MemberDeleteAvatar](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberdeleteavatar.jpg)
98 105
 
99
-6. Member reader page
100
-   1. Create the front end module *memberreader*
101
-   2. Choose the member groups and the member fields that are allowed
106
+5. Member reader page
107
+    1. Create the front end module *memberreader*
108
+    2. Choose the member groups and the member fields that are allowed
102 109
 
103 110
 ---
104 111
 
105 112
 ## Insert tags
113
+
106 114
 Member avatars can be shown using following *insert-tags*
107 115
 
108 116
 > For more information on *Insert tags*, please visit the official <a href="https://docs.contao.org/manual/en/article-management/insert-tags/" title="Insert tags :: Contao Manual" target="_blank">Contao documentation</a>.
109 117
 
110 118
 **Example**
119
+
111 120
 ```
112 121
 {{avatar::member::current}}
113 122
 {{avatar::member::current::200x200xproportional}}
... ...
@@ -123,9 +132,10 @@ The allowed image size parameters are:
123 132
 "<strong>width</strong> x <strong>height</strong> x <strong>mode</strong>"
124 133
 
125 134
 Size mode (See: [Size Array](https://docs.contao.org/dev/framework/image-processing/image-sizes/#size-array))
135
+
126 136
 - crop
127
-- proportional
128 137
 - box
138
+- proportional _(Contao 4.13 only)_
129 139
 
130 140
 The standard mode vor avatar insert tags is *crop*
131 141
 
... ...
@@ -171,16 +181,16 @@ The standard mode vor avatar insert tags is *crop*
171 181
 
172 182
 ### Memberlist
173 183
 
174
-Displays activated members in a list
184
+Displays activated members in a list.
175 185
 
176 186
 ### Memberreader
177 187
 
178
-Displays a detail page of a member
188
+Displays a detail page of a member.
179 189
 
180 190
 ### Avatar / Profile picture
181 191
 
182
-Displays an avatar of a member. If no avatar has been uploaded, the default avatar (or the fallback avatar from the bundle)
183
-will be shown
192
+Displays an avatar of a member. If no avatar has been uploaded, the default avatar (or the fallback avatar from the
193
+bundle) will be shown.
184 194
 
185 195
 ### Delete Avatar
186 196
 
... ...
@@ -188,12 +198,99 @@ A module that can be embedded into a page that adds the possibility to delete th
188 198
 
189 199
 ---
190 200
 
201
+## Advanced
202
+
203
+The member extension provides additional options that can be used with programmatic knowledge.
204
+
205
+### Filter
206
+
207
+Allows filtering the member list in the frontend if the following conditions are met:
208
+
209
+- 'Activate filters' is set to true within the member list module
210
+- there exists fields within `tl_member` of inputType `checkbox` and evaluation `feFilterable` set to true
211
+
212
+### Hooks
213
+
214
+#### getMembers
215
+
216
+Allows modifying the columns and options for the database query.
217
+
218
+```php
219
+// src/EventListener/onGetMembersListener.php
220
+namespace App\EventListener;
221
+
222
+use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
223
+use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberListController;
224
+
225
+#[AsHook('getMembers')]
226
+class onGetMembersListener
227
+{
228
+    public function __invoke(array &$columns, array &$options, MemberListController &$context): void
229
+    {
230
+        // Do something...
231
+    }
232
+}
233
+```
234
+
235
+#### parseMemberReader
236
+
237
+Allows modifying the member detail page
238
+
239
+```php
240
+// src/EventListener/onParseMemberReaderListener.php
241
+namespace App\EventListener;
242
+
243
+use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
244
+use Contao\MemberModel;
245
+use Contao\Model;
246
+use Contao\ModuleModel;
247
+use Contao\Template;
248
+use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberReaderController;
249
+
250
+#[AsHook('parseMemberReader')]
251
+class onParseMemberReaderListener
252
+{
253
+    public function __invoke(MemberModel|Model &$member, Template &$template, ModuleModel &$model, MemberReaderController &$context): void
254
+    {
255
+        // Do something...
256
+    }
257
+}
258
+```
259
+
260
+#### parseMemberTemplate
261
+
262
+Allows modifying the member details
263
+
264
+```php
265
+// src/EventListener/onParseMemberTemplateListener.php
266
+namespace App\EventListener;
267
+
268
+use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
269
+use Contao\FrontendTemplate;
270
+use Contao\MemberModel;
271
+use Contao\Model;
272
+use Contao\ModuleModel;
273
+use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberExtensionController;
274
+
275
+#[AsHook('parseMemberTemplate')]
276
+class onParseMemberTemplateListener
277
+{
278
+    public function __invoke(MemberModel|Model &$member, array &$fields, FrontendTemplate &$template, ModuleModel &$model, MemberExtensionController &$context): void
279
+    {
280
+        // Do something...
281
+    }
282
+}
283
+```
284
+
285
+---
286
+
191 287
 ## Support
288
+
192 289
 > We **only provide support** for **bugs, and feature requests**; please only post issues about these two topics.
193 290
 >
194
-> If you need help implementing Contao Member Extension Bundle or you are just starting out 
291
+> If you need help implementing Contao Member Extension Bundle or you are just starting out
195 292
 > with Contao/CSS or HTML, please contact us on our [website](https://www.oveleon.de/kontakt.html#kontaktformular),
196
-> visit the [Contao Community](https://community.contao.org/) 
293
+> visit the [Contao Community](https://community.contao.org/)
197 294
 > or the [Contao Slack](https://join.slack.com/t/contao/shared_invite/enQtNjUzMjY4MDU0ODM3LWVjYWMzODVkZjM5NjdlNDRiZjk2OTI3OWVkMmQ1YjA0MTQ3YTljMjFjODkwYTllN2NkMDcxMThiNzMzZjZlOGU),
198 295
 > you will be able to find more help there.
199 296
 >
... ...
@@ -203,6 +300,11 @@ A module that can be embedded into a page that adds the possibility to delete th
203 300
 
204 301
 ## Sponsoring
205 302
 
206
-If you find this plugin useful, please consider [sponsoring us](https://github.com/sponsors/oveleon) 
207
-to help contribute to our time invested and to further development of this and other open source projects. 
208
-Thank you for your support! - [Oveleon](https://www.oveleon.de).
303
+If you think this plugin is useful, please consider [sponsoring us](https://github.com/sponsors/oveleon) to help
304
+contribute to our time invested and to further development of this and other open source projects.
305
+
306
+Your contributions, whether through `coding`, `testing`, `providing feedback`, or even
307
+a [donation](https://github.com/sponsors/oveleon), help ensure that we can continue offering free open source software.
308
+Join us in making a difference, and thank you for your support! - [Oveleon](https://www.oveleon.de).
309
+
310
+[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/oveleon)
Browse code

[Change] Drop contao 4.9 support

Sebastian Zoglowek authored on15/01/2023 16:55:51
Showing1 changed files
... ...
@@ -10,7 +10,7 @@
10 10
 
11 11
 ---
12 12
 
13
-> Working with **Contao 4.9** and up to **Contao 4.13** (PHP ^7.4 and PHP 8)
13
+> Working with **Contao 4.13** (PHP ^8.0)
14 14
 
15 15
 ---
16 16
 
... ...
@@ -20,7 +20,7 @@ Additionally, you can display members with their details in a reader page.
20 20
 
21 21
 + [Features](#features)
22 22
 + [Installation](#installation)
23
-   + [Upgrading](#upgrading-to-version-12)
23
+   + [Upgrading (v.1.1 to >=v.1.2)](#upgrading-to-version--12)
24 24
    + [Composer](#via-composer)
25 25
    + [Contao Manager](#via-contao-manager)
26 26
 + [Initial Setup](#initial-setup)
... ...
@@ -36,7 +36,7 @@ Additionally, you can display members with their details in a reader page.
36 36
 
37 37
 ## Features
38 38
 
39
-- Compatible with Contao 4.9 and higher versions (PHP 8 Support)
39
+- Compatible with Contao 4.13 (PHP ^8.0)
40 40
 - Extends members with avatars
41 41
 - Paginated member lists
42 42
 - Member detail pages
... ...
@@ -46,8 +46,8 @@ Additionally, you can display members with their details in a reader page.
46 46
 
47 47
 ## Installation
48 48
 
49
-#### Upgrading to version 1.2
50
-> After upgrading from version 1.1 to version 1.2, make sure to edit your modules (memberlist, memberreader and avatar/profile picture) and set up the new templates.
49
+#### Upgrading to version >=1.2
50
+> After upgrading from version 1.1 to version >=1.2, make sure to edit your modules (memberlist, memberreader and avatar/profile picture) and set up the new templates.
51 51
 
52 52
 #### Via composer
53 53
 ```
Browse code

[Bugfix] Consider empty imgSize in avatar insert tag

Sebastian Zoglowek authored on15/08/2022 20:18:02
Showing1 changed files
... ...
@@ -72,7 +72,7 @@ detail pages.
72 72
     ![Admin View: Member overview](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar.jpg)
73 73
     ![Admin View: Member settings](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar_setup.jpg)
74 74
 
75
-2. To display your members, you need to setup a memberlist
75
+2. To display your members, you need to set up a memberlist
76 76
    1. Create the front end module *memberlist*
77 77
    2. Choose the member groups and the member fields that should be displayed
78 78
    3. Optionally you can set up a redirect page to your memberreader
Browse code

[Update] Add avatar_url insert tag

Sebastian Zoglowek authored on10/08/2022 11:42:37
Showing1 changed files
... ...
@@ -113,6 +113,10 @@ Member avatars can be shown using following *insert-tags*
113 113
 {{avatar::member::current::200x200xproportional}}
114 114
 {{avatar::member::4}}
115 115
 {{avatar::member::4::300x300xcrop}}
116
+
117
+// Output file url
118
+{{avatar_url::member::current}}
119
+{{avatar_url::member:4}}
116 120
 ```
117 121
 
118 122
 The allowed image size parameters are:
Browse code

Update readme

Sebastian Zoglowek authored on25/05/2022 01:34:21
Showing1 changed files
... ...
@@ -20,7 +20,7 @@ Additionally, you can display members with their details in a reader page.
20 20
 
21 21
 + [Features](#features)
22 22
 + [Installation](#installation)
23
-   + [Upgrading](#upgrading-to-version-1.2)
23
+   + [Upgrading](#upgrading-to-version-12)
24 24
    + [Composer](#via-composer)
25 25
    + [Contao Manager](#via-contao-manager)
26 26
 + [Initial Setup](#initial-setup)
... ...
@@ -33,7 +33,7 @@ Additionally, you can display members with their details in a reader page.
33 33
    + [Delete avatar](#delete-avatar)
34 34
 + [Support](#support)
35 35
 + [Sponsoring](#sponsoring)
36
-+ 
36
+
37 37
 ## Features
38 38
 
39 39
 - Compatible with Contao 4.9 and higher versions (PHP 8 Support)
Browse code

Add readme navigation

Sebastian Zoglowek authored on25/05/2022 01:32:41
Showing1 changed files
... ...
@@ -18,6 +18,22 @@ The Member extension bunde adds the possibility to display members and their det
18 18
 The member options are extended with an avatar that can be changed and uploaded in the member edit module and registration module.
19 19
 Additionally, you can display members with their details in a reader page.
20 20
 
21
++ [Features](#features)
22
++ [Installation](#installation)
23
+   + [Upgrading](#upgrading-to-version-1.2)
24
+   + [Composer](#via-composer)
25
+   + [Contao Manager](#via-contao-manager)
26
++ [Initial Setup](#initial-setup)
27
++ [Insert tags](#insert-tags)
28
+   + [Avatar insert tags](#avatar-insert-tags)
29
++ [Front end modules](#front-end-modules)
30
+   + [Memberlist](#memberlist)
31
+   + [Memberreader](#memberreader)
32
+   + [Avatar / Profile picture](#avatar--profile-picture)
33
+   + [Delete avatar](#delete-avatar)
34
++ [Support](#support)
35
++ [Sponsoring](#sponsoring)
36
++ 
21 37
 ## Features
22 38
 
23 39
 - Compatible with Contao 4.9 and higher versions (PHP 8 Support)
... ...
@@ -86,24 +102,6 @@ detail pages.
86 102
 
87 103
 ---
88 104
 
89
-## Front end modules
90
-
91
-### Memberlist
92
-
93
-Displays activated members in a list
94
-
95
-### Memberreader
96
-Displays a detail page of a member
97
-
98
-### Avatar / Profile picture
99
-Displays an avatar of a member. If no avatar has been uploaded, the default avatar (or the fallback avatar from the bundle)
100
-will be shown
101
-
102
-### Delete Avatar
103
-A module that can be embedded into a page that adds the possibility to delete the avatar of a member.
104
-
105
-
106 105
 ## Insert tags
107 106
 Member avatars can be shown using following *insert-tags*
108 107
 
... ...
@@ -165,6 +163,27 @@ The standard mode vor avatar insert tags is *crop*
165 163
 
166 164
 ---
167 165
 
166
+## Front end modules
167
+
168
+### Memberlist
169
+
170
+Displays activated members in a list
171
+
172
+### Memberreader
173
+
174
+Displays a detail page of a member
175
+
176
+### Avatar / Profile picture
177
+
178
+Displays an avatar of a member. If no avatar has been uploaded, the default avatar (or the fallback avatar from the bundle)
179
+will be shown
180
+
181
+### Delete Avatar
182
+
183
+A module that can be embedded into a page that adds the possibility to delete the avatar of a member.
184
+
185
+---
186
+
168 187
 ## Support
169 188
 > We **only provide support** for **bugs, and feature requests**; please only post issues about these two topics.
170 189
 >
Browse code

Update readme with documentation

Sebastian Zoglowek authored on25/05/2022 01:12:28
Showing1 changed files
... ...
@@ -1,20 +1,185 @@
1
-# Contao Member Extension Bundle
2
-Member Extension for Contao 4 Open Source CMS
3
-
4
-The following functions are added by this bundle:
5
-- Avatar (BE/FE)
6
-    - Fallback / Default Image
7
-- Memberlist
8
-- Memberreader
9
-
10
-### Avatar
11
-For the representation of the avatar, a separate module is provided. To prepare the avatar upload for the frontend, you only have to select the option "Avatar" in the module "Personal data".
12
-
13
-##### Member
14
-![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be.png)
15
-
16
-##### How to configurate the default avatar:
17
-###### Member list
18
-![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-1.png)
19
-###### Member settings
20
-![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-2.png)
1
+<p align="center"><img src="https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/cme-logo.svg" width="200"></p>
2
+<h1 align="center">Contao Member Extension Bundle</h1>
3
+<p align="center"><i>Adds a listing of members with detail pages and extends them with an avatar that can be uploaded and deleted</i></p>
4
+<p align="center">
5
+    <a href="https://www.oveleon.de"><img src="https://img.shields.io/badge/oveleon-maintained-83aa0e?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OS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DwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+P8iBTQAAAbFJREFUeNqU08srRFEcB/BromGGaJRHKSIaYfIm7JRSsvHIyuM/wMorNeEfUMqKnbKwU2TBwpSUSWYWFmSBDKWmWcgwcX2Pvrc5HXfuXL/6zD2P3z2Puedouq5rilG40JPxAuUmeX84tGTkwyXsghOWYQmKoFazExzVDXFIgEeazcPV9TCnzGplRiHMl7KgCWYghy9vQAasMEfkTqQarJ9JFWw0YlhJFv2rUv8tdKiDhTib0eiHQyhOsR2xyjlp0BF5MBELdr6WohE++X6raBOz6PwWCfiCOLzDN8sRGICYyfdrgBA8Q2kmfnzQJirghlw+XZANUQ5qFmHY52R9/9lWCXjBpbRPcaubDhtHsRoOuN1reAO/1H/PpzfdaqrggzOLK7YFD6zPMqeL9at0gwWZuKa0i3hkuZf1E6tteqEZnmCRbZVwxPIOn3V83litaogzbrPuhDOIwbyUd8q8SavBOpl0rnxROadFugkFVoOJAx1h4rRJvw9e2b9u3ACrY9ENAZaD/L/E0aiHMbbfQc3v7bFxWAchqptHAAqN3HQrM0JcsXFohzzexWPYk5N+BBgAix5VyvzRZbwAAAAASUVORK5CYII=" alt="Oveleon"></a>
6
+    <a href="https://github.com/oveleon/https://github.com/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/badge/license-MIT-83aa0e?style=flat-square"/></a>
7
+    <a href="https://packagist.org/packages/oveleon/contao-member-extension-bundle"><img src="https://img.shields.io/packagist/dt/oveleon/contao-member-extension-bundle?color=0A7BBC&style=flat-square"/></a>
8
+</p>
9
+<br/>
10
+
11
+---
12
+
13
+> Working with **Contao 4.9** and up to **Contao 4.13** (PHP ^7.4 and PHP 8)
14
+
15
+---
16
+
17
+The Member extension bunde adds the possibility to display members and their details in lists using frontend modules.
18
+The member options are extended with an avatar that can be changed and uploaded in the member edit module and registration module.
19
+Additionally, you can display members with their details in a reader page.
20
+
21
+## Features
22
+
23
+- Compatible with Contao 4.9 and higher versions (PHP 8 Support)
24
+- Extends members with avatars
25
+- Paginated member lists
26
+- Member detail pages
27
+- Insert tags for member avatars
28
+
29
+---
30
+
31
+## Installation
32
+
33
+#### Upgrading to version 1.2
34
+> After upgrading from version 1.1 to version 1.2, make sure to edit your modules (memberlist, memberreader and avatar/profile picture) and set up the new templates.
35
+
36
+#### Via composer
37
+```
38
+composer require oveleon/contao-member-extension-bundle
39
+```
40
+
41
+#### Via contao-manager
42
+```
43
+Search for contao member extension bundle and add it to your extensions.
44
+```
45
+
46
+After installing the contao-member-extension-bundle, you need to run a **contao install**.
47
+
48
+---
49
+
50
+## Initial setup
51
+This bundle extends contao with the possibiity to extend members with an avatar and displaying members in a list with
52
+detail pages.
53
+
54
+1. Go into members and set up a default avatar in the newly added settings
55
+
56
+    ![Admin View: Member overview](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar.jpg)
57
+    ![Admin View: Member settings](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/default_avatar_setup.jpg)
58
+
59
+2. To display your members, you need to setup a memberlist
60
+   1. Create the front end module *memberlist*
61
+   2. Choose the member groups and the member fields that should be displayed
62
+   3. Optionally you can set up a redirect page to your memberreader
63
+   4. Embed the module in a page
64
+
65
+    ![Admin View: Memberlist](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberlist.jpg)
66
+
67
+3. Displaying the avatar
68
+   1. Create the front end module *Avatar / profile picture*
69
+   2. Optionally you can set an image size
70
+   3. Embed the module in a page
71
+
72
+    ![Admin View: MemberAvatar](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberavatar.jpg)
73
+
74
+4. Module to delete an avatar
75
+   1. Create the front end module *Delete Avatar*
76
+   2. Embed the module in a page
77
+   3. The module only appears if a frontend user is logged in
78
+   4. You can check the "profile picture option" within registration to enable members to upload a profile picture within
79
+   registration
80
+
81
+    ![Admin View: MemberDeleteAvatar](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/module_memberdeleteavatar.jpg)
82
+
83
+6. Member reader page
84
+   1. Create the front end module *memberreader*
85
+   2. Choose the member groups and the member fields that are allowed
86
+
87
+---
88
+
89
+## Front end modules
90
+
91
+### Memberlist
92
+
93
+Displays activated members in a list
94
+
95
+### Memberreader
96
+Displays a detail page of a member
97
+
98
+### Avatar / Profile picture
99
+Displays an avatar of a member. If no avatar has been uploaded, the default avatar (or the fallback avatar from the bundle)
100
+will be shown
101
+
102
+### Delete Avatar
103
+A module that can be embedded into a page that adds the possibility to delete the avatar of a member.
104
+
105
+---
106
+
107
+## Insert tags
108
+Member avatars can be shown using following *insert-tags*
109
+
110
+> For more information on *Insert tags*, please visit the official <a href="https://docs.contao.org/manual/en/article-management/insert-tags/" title="Insert tags :: Contao Manual" target="_blank">Contao documentation</a>.
111
+
112
+**Example**
113
+```
114
+{{avatar::member::current}}
115
+{{avatar::member::current::200x200xproportional}}
116
+{{avatar::member::4}}
117
+{{avatar::member::4::300x300xcrop}}
118
+```
119
+
120
+The allowed image size parameters are:
121
+"<strong>width</strong> x <strong>height</strong> x <strong>mode</strong>"
122
+
123
+Size mode (See: [Size Array](https://docs.contao.org/dev/framework/image-processing/image-sizes/#size-array))
124
+- crop
125
+- proportional
126
+- box
127
+
128
+The standard mode vor avatar insert tags is *crop*
129
+
130
+### Avatar insert tags
131
+
132
+<table>
133
+  <tr>
134
+    <th colspan="2"><strong>Member extension avatar</strong></th>
135
+  </tr>
136
+  <tr>
137
+    <td><strong>Insert tag</strong></td>
138
+    <td><strong>Description</strong></td>
139
+  </tr>
140
+  <tr>
141
+    <td>{{avatar::member::current}}</td>
142
+    <td>Displays the avatar of the logged in member</td>
143
+  </tr>
144
+  <tr>
145
+    <td>{{avatar::member::current::200x300}}</td>
146
+    <td>Displays the avatar of the logged in member with a width of 200 and a height of 300</td>
147
+  </tr>
148
+  <tr>
149
+    <td>{{avatar::member::current::300x400xbox}}</td>
150
+    <td>Displays the avatar of the logged in member with a width of 300, a height of 400 and the mode: box</td>
151
+  </tr>
152
+  <tr>
153
+    <td>{{avatar::member::123}}</td>
154
+    <td>Displays the avatar of member id 123</td>
155
+  </tr>
156
+  <tr>
157
+    <td>{{avatar::member::123::200x300}}</td>
158
+    <td>Displays the avatar of member id 123 with a width of 200 and a height of 300</td>
159
+  </tr>
160
+  <tr>
161
+    <td>{{avatar::member::123::300x400xbox}}</td>
162
+    <td>Displays the avatar of member id 123 with a width of 300, a height of 400 and the mode: box</td>
163
+  </tr>
164
+</table>
165
+
166
+---
167
+
168
+## Support
169
+> We **only provide support** for **bugs, and feature requests**; please only post issues about these two topics.
170
+>
171
+> If you need help implementing Contao Member Extension Bundle or you are just starting out 
172
+> with Contao/CSS or HTML, please contact us on our [website](https://www.oveleon.de/kontakt.html#kontaktformular),
173
+> visit the [Contao Community](https://community.contao.org/) 
174
+> or the [Contao Slack](https://join.slack.com/t/contao/shared_invite/enQtNjUzMjY4MDU0ODM3LWVjYWMzODVkZjM5NjdlNDRiZjk2OTI3OWVkMmQ1YjA0MTQ3YTljMjFjODkwYTllN2NkMDcxMThiNzMzZjZlOGU),
175
+> you will be able to find more help there.
176
+>
177
+> This will help us to keep the issues related to this plugin and solve them faster.
178
+
179
+---
180
+
181
+## Sponsoring
182
+
183
+If you find this plugin useful, please consider [sponsoring us](https://github.com/sponsors/oveleon) 
184
+to help contribute to our time invested and to further development of this and other open source projects. 
185
+Thank you for your support! - [Oveleon](https://www.oveleon.de).
Browse code

- Add module "MemberList" - Add module "MemberReader"

doishub authored on08/12/2020 15:39:30
Showing1 changed files
... ...
@@ -2,9 +2,10 @@
2 2
 Member Extension for Contao 4 Open Source CMS
3 3
 
4 4
 The following functions are added by this bundle:
5
-- Avatar-Upload (BE/FE)
6
-    - Avatar Default-Image
7
-- _More useful member extensions will follow..._
5
+- Avatar (BE/FE)
6
+    - Fallback / Default Image
7
+- Memberlist
8
+- Memberreader
8 9
 
9 10
 ### Avatar
10 11
 For the representation of the avatar, a separate module is provided. To prepare the avatar upload for the frontend, you only have to select the option "Avatar" in the module "Personal data".
... ...
@@ -16,4 +17,4 @@ For the representation of the avatar, a separate module is provided. To prepare
16 17
 ###### Member list
17 18
 ![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-1.png)
18 19
 ###### Member settings
19
-![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-2.png)
20 20
\ No newline at end of file
21
+![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-2.png)
Browse code

Update Readme

doishub authored on12/11/2019 16:11:24
Showing1 changed files
... ...
@@ -1,2 +1,19 @@
1
-# contao-member-extension-bundle
1
+# Contao Member Extension Bundle
2 2
 Member Extension for Contao 4 Open Source CMS
3
+
4
+The following functions are added by this bundle:
5
+- Avatar-Upload (BE/FE)
6
+    - Avatar Default-Image
7
+- _More useful member extensions will follow..._
8
+
9
+### Avatar
10
+For the representation of the avatar, a separate module is provided. To prepare the avatar upload for the frontend, you only have to select the option "Avatar" in the module "Personal data".
11
+
12
+##### Member
13
+![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be.png)
14
+
15
+##### How to configurate the default avatar:
16
+###### Member list
17
+![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-1.png)
18
+###### Member settings
19
+![Admin View: List](https://www.oveleon.de/share/github-assets/contao-member-extension-bundle/mebmer-extension-bundle-be-settings-2.png)
3 20
\ No newline at end of file
Browse code

Initial commit

oveleon authored on08/03/2019 12:50:27 • GitHub committed on08/03/2019 12:50:27
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,2 @@
1
+# contao-member-extension-bundle
2
+Member Extension for Contao 4 Open Source CMS