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+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8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U+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).