Download the PHP package drago-ex/gravatar without Composer
On this page you can find all versions of the php package drago-ex/gravatar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drago-ex/gravatar
More information about drago-ex/gravatar
Files in drago-ex/gravatar
Package gravatar
Short Description Simple and customizable Gravatar integration for PHP applications, allowing easy Gravatar image generation based on user email with options for size, default image, and rating.
License MIT
Informations about the package gravatar
Drago Gravatar
Simple and customizable Gravatar integration for PHP applications.
Requirements
- PHP >= 8.3
- Nette Framework
- Composer
Installation
Extension Registration
After installation, register the extension in your Nette configuration (neon file):
Optional configuration
You can adjust the size, defaultImage, and rating parameters based on your needs.
Examples
Once the extension is registered, you can use the Gravatar functionality in your presenters and templates.
Overview
Drago Gravatar is a simple, customizable solution for integrating Gravatar images into your PHP application. With this package, you can easily generate and display Gravatar images based on user email addresses, allowing you to customize their size, default image, and rating.
Features
- Generate Gravatar images based on user email.
- Customizable image size (from 1 to 2048 pixels).
- Choose a default image if the user has no Gravatar.
- Set image rating (g, pg, r, x).
- Easy integration into your Nette-based application.
Using Gravatar in Presenters
Add the GravatarAdapter trait to your presenter:
In Template
In your Latte template, simply output the Gravatar image by using the URL provided by the presenter:
Customizing Gravatar
You can customize the Gravatar by changing the size, defaultImage, and rating parameters in the configuration:
size: The size of the Gravatar image in pixels (1 to 2048). Default is 80.
defaultImage: The default image used when the user doesn't have a Gravatar (e.g., mm, identicon, monsterid, wavatar, etc.). Default is mm.
rating: The rating of the Gravatar image (g, pg, r, x). Default is g.
All versions of gravatar with dependencies
nette/di Version ^3.2
nette/utils Version ^4.0
nette/application Version ^3.2