Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terminal42/contao-avatar
Another avatar extension for Contao
https://github.com/terminal42/contao-avatar
Last synced: 23 days ago
JSON representation
Another avatar extension for Contao
- Host: GitHub
- URL: https://github.com/terminal42/contao-avatar
- Owner: terminal42
- Created: 2014-08-11T07:39:47.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2021-09-06T14:47:15.000Z (over 3 years ago)
- Last Synced: 2024-11-15T16:48:32.871Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 397 KB
- Stars: 7
- Watchers: 9
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
avatar Contao extension
=======================Adds the avatar functionality to the Contao for the users and members.
**You must include a jQuery library to use it in the front end!**
Get avatar using insert tags:
```
{{avatar::member_current}} - current member
{{avatar::member_current::100x100}} - current member 100x100{{avatar::member::ID}} - member ID
{{avatar::member::ID::100x100}} - member ID 100x100{{avatar::user::ID}} - user ID
{{avatar::user::ID::100x100}} - user ID 100x100
```Get avatar using PHP code:
```php
// Member avatar (path only)
\Avatar::getMember(\FrontendUser::getInstance()->id);// Member avatar 100x100px (path only)
\Avatar::getMember(\FrontendUser::getInstance()->id, 100, 100);// Member avatar (HTML)
\Avatar::getMemberHtml(\FrontendUser::getInstance()->id);// Member avatar 100x100px (HTML)
\Avatar::getMemberHtml(\FrontendUser::getInstance()->id, 100, 100);// User ID 4 avatar (path only)
\Avatar::getUser(4);// User ID 4 avatar 100x100px (path only)
\Avatar::getUser(4, 100, 100);// User ID 4 avatar (HTML)
\Avatar::getUserHtml(4);// User ID 4 avatar 100x100px (HTML)
\Avatar::getUserHtml(4, 100, 100);
```