Member extension avatar |
Insert tag |
Description |
{{avatar::member::current}} |
Displays the avatar of the logged in member |
{{avatar::member::current::200x300}} |
Displays the avatar of the logged in member with a width of 200 and a height of 300 |
{{avatar::member::current::300x400xbox}} |
Displays the avatar of the logged in member with a width of 300, a height of 400 and the mode: box |
{{avatar::member::123}} |
Displays the avatar of member id 123 |
{{avatar::member::123::200x300}} |
Displays the avatar of member id 123 with a width of 200 and a height of 300 |
{{avatar::member::123::300x400xbox}} |
Displays the avatar of member id 123 with a width of 300, a height of 400 and the mode: box |
---
## Front end modules
### Memberlist
Displays activated members in a list.
### Memberreader
Displays a detail page of a member.
### Avatar / Profile picture
Displays an avatar of a member. If no avatar has been uploaded, the default avatar (or the fallback avatar from the
bundle) will be shown.
### Delete Avatar
A module that can be embedded into a page that adds the possibility to delete the avatar of a member.
---
## Advanced
The member extension provides additional options that can be used with programmatic knowledge.
### Filter
Allows filtering the member list in the frontend if the following conditions are met:
- 'Activate filters' is set to true within the member list module
- there exists fields within `tl_member` of inputType `checkbox` and evaluation `feFilterable` set to true
### Hooks
#### getMembers
Allows modifying the columns and options for the database query.
```php
// src/EventListener/onGetMembersListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberListController;
#[AsHook('getMembers')]
class onGetMembersListener
{
public function __invoke(array &$columns, array &$options, MemberListController &$context): void
{
// Do something...
}
}
```
#### parseMemberReader
Allows modifying the member detail page
```php
// src/EventListener/onParseMemberReaderListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\MemberModel;
use Contao\Model;
use Contao\ModuleModel;
use Contao\Template;
use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberReaderController;
#[AsHook('parseMemberReader')]
class onParseMemberReaderListener
{
public function __invoke(MemberModel|Model &$member, Template &$template, ModuleModel &$model, MemberReaderController &$context): void
{
// Do something...
}
}
```
#### parseMemberTemplate
Allows modifying the member details
```php
// src/EventListener/onParseMemberTemplateListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\FrontendTemplate;
use Contao\MemberModel;
use Contao\Model;
use Contao\ModuleModel;
use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberExtensionController;
#[AsHook('parseMemberTemplate')]
class onParseMemberTemplateListener
{
public function __invoke(MemberModel|Model &$member, array &$fields, FrontendTemplate &$template, ModuleModel &$model, MemberExtensionController &$context): void
{
// Do something...
}
}
```
---
## Support
> We **only provide support** for **bugs, and feature requests**; please only post issues about these two topics.
>
> If you need help implementing Contao Member Extension Bundle or you are just starting out
> with Contao/CSS or HTML, please contact us on our [website](https://www.oveleon.de/kontakt.html#kontaktformular),
> visit the [Contao Community](https://community.contao.org/)
> or the [Contao Slack](https://join.slack.com/t/contao/shared_invite/enQtNjUzMjY4MDU0ODM3LWVjYWMzODVkZjM5NjdlNDRiZjk2OTI3OWVkMmQ1YjA0MTQ3YTljMjFjODkwYTllN2NkMDcxMThiNzMzZjZlOGU),
> you will be able to find more help there.
>
> This will help us to keep the issues related to this plugin and solve them faster.
---
## Sponsoring
If you think this plugin is useful, please consider [sponsoring us](https://github.com/sponsors/oveleon) to help
contribute to our time invested and to further development of this and other open source projects.
Your contributions, whether through `coding`, `testing`, `providing feedback`, or even
a [donation](https://github.com/sponsors/oveleon), help ensure that we can continue offering free open source software.
Join us in making a difference, and thank you for your support! - [Oveleon](https://www.oveleon.de).
[](https://github.com/sponsors/oveleon)