定制 coldtrick/avatar_service 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

coldtrick/avatar_service

Composer 安装命令:

composer require coldtrick/avatar_service

包简介

Provides a service to get an Elgg avatar in a Gravatar like way

README 文档

README

Elgg 3.0 Build Status Scrutinizer Code Quality Latest Stable Version License

Provides a service to get an Elgg avatar in a Gravatar like way

How to use

Base Request

Avatar images may be requested just like a normal image, using an IMG tag. To get an image specific to a user, you must first calculate their email hash.

The most basic image request URL looks like this:

http://www.yoursite.com/avatar_service/HASH

where HASH is replaced with the calculated hash for the specific email address you are requesting. The hash is an md5 of the lowercased version of an emailaddress.

For example, here is the base URL for the info@domain.com emailaddress:

http://www.yoursite.com/avatar_service/dfb0624735f6756ede0693f1c8e94a8c

If you require a file-type extension (some places do) then you may also add an (optional) .jpg extension to that URL:

http://www.yoursite.com/avatar_service/dfb0624735f6756ede0693f1c8e94a8c.jpg

Size

By default, images are presented at 80px by 80px if no size parameter is supplied. You may request a specific image size, which will be dynamically delivered by using the s= or size= parameter and passing a single pixel dimension (since the images are square):

http://www.yoursite.com/avatar_service/dfb0624735f6756ede0693f1c8e94a8c?s=200

You may request images anywhere from 1px up to 2048px, however note that many users have lower resolution images, so requesting larger sizes may result in pixelation/low-quality images.

Default Image

What happens when an email address has no matching user or user avatar? You will get the default user icon of the community.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2015-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固