oveleon/contao-member-extension-bundle
Composer 安装命令:
composer require oveleon/contao-member-extension-bundle
包简介
Member feature extension for Contao.
README 文档
README
Contao Member Extension Bundle
Adds a listing of members with detail pages and extends them with an avatar that can be uploaded and deleted
Working with Contao 4.13 and Contao ^5.3 (PHP ^8.1)
The Member extension bunde adds the possibility to display members and their details in lists using frontend modules. The member options are extended with an avatar that can be changed and uploaded in the member edit module and registration module. Additionally, you can display members with their details in a reader page.
Features
- Compatible with Contao 4.13 (PHP ^8.0)
- Extends members with avatars
- Paginated member lists
- Member detail pages
- Insert tags for member avatars
- Sortable data-tables (funded by @netzarbeiter)
- requires jQuery to work (https://datatables.net/)
Installation
Via composer
composer require oveleon/contao-member-extension-bundle
Via contao-manager
Search for contao member extension bundle and add it to your extensions.
After installing the contao-member-extension-bundle, you need to run a contao install.
Initial setup
This bundle extends contao with the possibiity to extend members with an avatar and displaying members in a list with detail pages.
-
Go into members and set up a default avatar in the newly added settings
-
To display your members, you need to set up a memberlist
- Create the front end module memberlist
- Choose the member groups and the member fields that should be displayed
- Optionally you can set up a redirect page to your memberreader
- Embed the module in a page
-
Displaying the avatar
- Create the front end module Avatar / profile picture
- Optionally you can set an image size
- Embed the module in a page
-
Module to delete an avatar
- Create the front end module Delete Avatar
- Embed the module in a page
- The module only appears if a frontend user is logged in
- You can check the "profile picture option" within registration to enable members to upload a profile picture within registration
-
Member reader page
- Create the front end module memberreader
- Choose the member groups and the member fields that are allowed
Insert tags
Member avatars can be shown using following insert-tags
For more information on Insert tags, please visit the official Contao documentation.
Example
{{avatar::member::current}}
{{avatar::member::current::200x200xproportional}}
{{avatar::member::4}}
{{avatar::member::4::300x300xcrop}}
// Output file url
{{avatar_url::member::current}}
{{avatar_url::member:4}}
The allowed image size parameters are: "width x height x mode"
Size mode (See: Size Array)
- crop
- box
- proportional (Contao 4.13 only)
The standard mode vor avatar insert tags is crop
Avatar insert tags
| 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_memberof inputTypecheckboxand evaluationfeFilterableset to true
Hooks
getMembers
Allows modifying the columns and options for the database query.
// 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
// 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
// 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, visit the Contao Community or the Contao Slack, 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 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, help ensure that we can continue offering free open source software.
Join us in making a difference, and thank you for your support! - Oveleon.
oveleon/contao-member-extension-bundle 适用场景与选型建议
oveleon/contao-member-extension-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.96k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「contao」 「member-extension-bundle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oveleon/contao-member-extension-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oveleon/contao-member-extension-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oveleon/contao-member-extension-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Contao Open Source CMS
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
Implementation of carouFredSel as extension for Contao Open Source CMS
Contao CMS integrity check for some files
Contao 4 bundle for a Facebook login.
统计信息
- 总下载量: 1.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-08