承接 belniakmedia/craft-gravatar 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

belniakmedia/craft-gravatar

最新稳定版本:1.0.1

Composer 安装命令:

composer require belniakmedia/craft-gravatar

包简介

Adds gravatar support to twig templates (Direct replacement of noxify/craft-gravatar compatible with Craft4).

README 文档

README

Adds gravatar support to CraftCMS twig templates.

This project is a fork of public archive noxify/craft-gravatar, which has been updated to be compatible with Craft4 and was created due to the "public archive" status of the forked repo.

Requirements

This plugin requires PHP8 & Craft CMS 4.0.0 or later.

Installation

Install via the CraftCMS Plugin Store
Or on the command line (from the project root directory):

composer require belniakmedia/craft-gravatar
php craft plugin/install

Configuring Gravatar

The plugins allows you to configure the following settings:

Directly from your CP:

  • Gravatar URL ( default: //gravatar.com/avatar/ )
  • Size ( default: 80 )
  • Rating ( default: mp )
  • Default Avatar ( default: mp )

Via project config file:

See config.php in the plugin root folder for more information.

Detailed instructions what are the allowed values are defined here: https://de.gravatar.com/site/implement/images/

Using Gravatar

Get the Gravatar URL with default settings

{{ craft.gravatar.url( 'hello@example.com' ) }}

Get the Gravatar URL with custom settings

{{ craft.gravatar.url( 'hello@example.com', {'s' : 120, 'd': 'identicon', 'r' : 'x'} ) }}

Get the Gravatar IMG with default settings

{{ craft.gravatar.img( 'hello@example.com' ) }}

Get the Gravatar IMG with custom settings

{{ craft.gravatar.img( 'hello@example.com', {'s' : 120, 'd': 'identicon', 'r' : 'x'} ) }}

Get the Gravatar IMG with custom settings and attributes

{{ craft.gravatar.img( 'hello@example.com', {'s': 120}, {'class' : 'useravatar'} ) }}

Brought to you by Belniak Media

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固