• MODX.com

    3,066 downloads

Gravatar

Gravatar is an extra by lossendae, first released on 2011-01-20.

Package Description

Globally recognized avatars - snippet and custom output filter.

Changelog:
2.1: Fixed SSL urls and added support for generating profile links.
2.0: Added SSL support, specific options, and detailed Gravatar class.

Example Snippet Usage:
[[!Gravatar? &email=`youremail@domain.com` &size=`50` &rating=`r` &default=`wavatar`]]
[[!Gravatar? &email=`youremail@domain.com` &profile=`true`]] [[!Gravatar? &email=`youremail@domain.com` &profile=`json` &secure=`1` &extraParams=`{"callback":"alert"}`]]

Example Output Filter Usage
[[+email:Gravatar=`40`]] <!--  (option value is numeric) generates image with size 40 -->
[[+email:Gravatar=`json`]] <!--  (option value is non-numeric) generates image with size 40 -->

Usage/Installation Instructions

-------------------- Snippet: Gravatar Description: Globally recognized avatars -------------------- Version: 2 Author: Oleg Pryadko <oleg@websitezen.com> Since: Jan 16, 2011 License: Public domain (except possibly class file, which is based on http://www.talkphp.com/script-giveaway/1905-gravatar-wrapper-class.html) Changelog  2.1: fixed SSL url, added profile support 2.0: added SSL, class files History: Version 1 Since: May 22th, 2010 Author: lossendae <lossendae@gmail.com> License: Public domain ---------------------------------------------- Usage: ---------------------------------------------- To load Gravatar image URL with a snippet call use: [[!Gravatar? &email=`youremail` &size=`yoursize` &rating=`yourrating` &default=`defaultavatar`]] To load a profile URL with a snippet call use: [[!Gravatar? &profile=`1`]] ---------------------------------------------- The options available are: ---------------------------------------------- &email: the email adress of the user. &size: the size of the returned image (between 0 & 512). &rating: the rating of the image. Most of the time users only have the default one. Can be: g, G, pg, PG, r, R, x, or X &default: The defaut avatar - can be an url or one the following choices: identicon, monster, wavatar, retro, mystery (monsterid and mm also ok) &secure: Whether to use HTTPS or not. Set to `0` or `false` to use HTTP, or set to true to use HTTPS. Otherwise, the snippet will automatically use HTTPS if the page that the snippet is on is accessed under HTTPS. &extraParams: [NEW] JSON array of options to append to the URL. Please see the gravatar docs  at http://en.gravatar.com/site/implement/ for the currently available options. Example: {"s":120,"option":"value"} &profile [NEW]: [NEW] Instead of generating a URL to an image, generates a URL to the profile. See gravatar docs for examples on the different formats. Possible values: 0 or empty (default - link to profile image.) 1 or true (default profile URL/ VCF/ VCard) json (JSON format) xml (XML format) php (PHP format) qr (QR format) ---------------------------------------------- Gravatar is output filter ready for email and  size or filetype parameters. ---------------------------------------------- For example, with Quip you can do it like that: [[!Gravatar? &email=`[[+email]]`]] or with a specified size : [[!Gravatar? &email=`[[+email]]` &size=`40`]] or by using output filter directly on the placeholder: [[+email:Gravatar]] or with a specified size : [[+email:Gravatar=`40`]] [NEW] You can also use a non-numeric output filter value to generate the profile (same as specifying &profile parameter): [[+email:Gravatar=`true`]] or [[+email:Gravatar=`json`]]

Details

Developer(s)
lossendae
Released
2011-01-21
First seen
2011-01-20
License
Public Domain
Supported databases
Minimum MODX Requirement
2.0

Gravatar Releases

Vendor Signature Released on
MODX.com 2.1-pl 2011-01-21 (13 years ago)