Extension:Libravatar

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Libravatar

Release status:Extension status experimental

Mediawiki-libravatar.png
ImplementationTemplate:Extension#type Tag
DescriptionTemplate:Extension#description Provides a <libravatar email="foo@example.org"/> tag for MediaWiki which displays the avatar image for a given email address.
Author(s)Template:Extension#username Christian Weiske (Cweisketalk)
Latest versionTemplate:Extension#version 0.1.0
MediaWikiTemplate:Extension#mediawiki 1.19.1+
PHPTemplate:Extension#php 5.3
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license AGPL
Download mediawiki-libravatar-0.1.0.phar
README
ChangeLog
ParametersTemplate:Extension#parameters

$wgLibravatarSize, $wgLibravatarDefault, $wgLibravatarAlgorithm

TagsTemplate:Extension#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.