Open main menu

Extension:Libravatar

MediaWiki extensions manual
OOjs UI icon advanced.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
$wgLibravatarSize, $wgLibravatarDefault, $wgLibravatarAlgorithm
<libravatar/>
Translate the Libravatar extension if it is available at translatewiki.net
Check usage and version matrix.

Contents

Libravatar MediaWiki extensionEdit

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.

ExamplesEdit

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 attributesEdit

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 variablesEdit

  • $wgLibravatarSize
  • $wgLibravatarDefault
  • $wgLibravatarAlgorithm

InstallationEdit

PharEdit

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 installationEdit

  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:

DependenciesEdit

Requires the Services_Libravatar package from PEAR.