Extension:Libravatar

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Libravatar

Release status: experimental

Mediawiki-libravatar.png
Implementation Tag
Description Provides a <libravatar email="[email protected]"/> 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 possible

Check usage and version matrix; code metrics

Libravatar MediaWiki extension[edit | edit source]

Provides a <libravatar email="[email protected]"/> 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 | edit source]

Simple avatar:

 <libravatar email="[email protected]"/>

Avatar with special size:

 <libravatar email="[email protected]" size="32"/>

Image title:

 <libravatar email="[email protected]" title="Foo's avatar"/>

Verbose notation:

 <libravatar default="monsterid">[email protected]</libravtar>

Supported attributes[edit | edit source]

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 | edit source]

  • $wgLibravatarSize
  • $wgLibravatarDefault
  • $wgLibravatarAlgorithm

Installation[edit | edit source]

Phar[edit | edit source]

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 | edit source]

  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 | edit source]

Requires the Services_Libravatar package from PEAR.