Extension:Libravatar

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
Libravatar
Release status: experimental
Mediawiki-libravatar.png
Implementation Tag
Description Provides a <libravatar email="foo@example.org"/> tag for MediaWiki which displays the avatar image for a given email address.
Author(s) Christian Weiske (Cweisketalk)
Latest version 0.1.0
MediaWiki 1.19.1+
PHP 5.3
Database changes No
License AGPL
Download mediawiki-libravatar-0.1.0.phar
README
ChangeLog
Parameters
$wgLibravatarSize, $wgLibravatarDefault, $wgLibravatarAlgorithm
Tags
<libravatar/>
Translate the Libravatar extension if it is available at translatewiki.net
Check usage and version matrix.

Libravatar MediaWiki extension[edit]

Provides a <libravatar email="foo@example.org"/> tag for MediaWiki which displays the avatar image for a given email address, using the Libravatar service. It is federated and falls back to Gravatar if no Libravatar is found.

Examples[edit]

Simple avatar:

 <libravatar email="foo@example.org"/>

Avatar with special size:

 <libravatar email="foo@example.org" size="32"/>

Image title:

 <libravatar email="foo@example.org" title="Foo's avatar"/>

Verbose notation:

 <libravatar default="monsterid">foo@example.org</libravtar>

Supported attributes[edit]

email
Email address to show avatar of. Required.
size
Size in pixels (avatars are quadratic)
default
Default icon type when no avatar has been found. Options: 404, mm, identicon, monsterid, wavatar, retro
algorithm
Email hashing algorithm. md5 or sha256
title
Title attribute value for the image tag
style
Style attribute value for the image tag

Global configuration variables[edit]

  • $wgLibravatarSize
  • $wgLibravatarDefault
  • $wgLibravatarAlgorithm

Installation[edit]

Phar[edit]

Copy the mediawiki-libravatar-0.1.0.phar file into your MediaWiki extensions/ directory and add the following to your LocalSettings.php:

 require_once "$IP/extensions/mediawiki-libravatar-0.1.0.phar";

That's it, it works now. All dependencies are included in the .phar file.

If you get a white page, then you're probably running Suhosin.

Normal installation[edit]

  1. Run $ pear install Services_Libravatar-alpha
  2. Copy this extension's Libravatar.php to $mediawiki/extensions/Libravatar/Libravatar.php
 require_once "$IP/extensions/Libravatar/Libravatar.php";
  1. Edit LocalSettings.php:

Dependencies[edit]

Requires the Services_Libravatar package from PEAR.