From version 21.1
To version < 21.2
edited by Thomas Mortagne
on 2014/08/26 13:44
Change comment: Synchronized object properties with their current classes

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +Extension.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +xwiki:XWiki.ThomasMortagne
Tags
... ... @@ -1,0 +1,1 @@
1 +users|image
Content
noavatar.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.AndreeaPopescu
Size
... ... @@ -1,0 +1,1 @@
1 +7.2 KB
Content
EXOExtensionCode.ExtensionClass[0]
Bundled With
... ... @@ -1,0 +1,1 @@
1 +XWiki Enterprise manager
ExtensionCode.ExtensionClass[0]
Description
... ... @@ -1,0 +1,36 @@
1 +Displays the avatar of a user, or a standard image ##noavatar.png## if the user has no avatar. A user's avatar is a url that is defined by editing a user's profile.
2 +
3 +== Usage ==
4 +
5 +{{code language="none"}}
6 +{{useravatar username="<username>" /}}
7 +{{/code}}
8 +
9 +=== Parameters definition ===
10 +
11 +|=Name|=Optional|=Allowed values|=Default value|=Description
12 +|username|no|a string|none|XWiki user of the form "wiki:XWiki.UserName". Note that the ##wiki## part is optional and should be used when using XWiki in multiwiki mode and you wish to reference a user located in another subwiki. {{info}}Starting with XWiki 3.2 it's now possible to pass just the shortname (i.e. username without the "XWiki." space prefix).{{/info}}
13 +|width|yes|an integer|image's natural width|The width of the avatar image
14 +|height|yes|an integer|image's natural width|The width of the avatar image
15 +
16 +== Example ==
17 +
18 +The avatar of some XWiki.JohnDoe user:
19 +
20 +{{code}}
21 +{{useravatar username="XWiki.JohnDoe" width="40" height="40"/}}
22 +{{/code}}
23 +
24 +The avatar of some XWiki.JohnDoe user located in a subwiki named ##somewiki##:
25 +
26 +{{code}}
27 +{{useravatar username="somewiki:XWiki.JohnDoe" width="40" height="40"/}}
28 +{{/code}}
29 +
30 +=== Result ===
31 +
32 +[[image:noavatar.png]]
33 +
34 +== Known Issues ==
35 +
36 +* In XWiki < 4.01 or 4.1-rc-1, there was a bug where referencing users located in subwikis was not working.
Source
... ... @@ -1,0 +1,1 @@
1 +https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-useravatar
Type
... ... @@ -1,0 +1,1 @@
1 +jar
Only Custom Installation instructions
... ... @@ -1,0 +1,1 @@
1 +No
Installable with Extension Manager
... ... @@ -1,0 +1,1 @@
1 +No
Summary
... ... @@ -1,0 +1,1 @@
1 +Displays the avatar of a user, or a standard image noavatar.png if the user has no avatar
License Name
... ... @@ -1,0 +1,1 @@
1 +GNU Lesser General Public License 2.1
Name
... ... @@ -1,0 +1,1 @@
1 +User Avatar Macro
Authors
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.XWikiTeam

null

cogDisplays the avatar of a user, or a standard image noavatar.png if the user has no avatar
TypeJAR
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise, XWiki Enterprise Manager

Description

Displays the avatar of a user, or a standard image noavatar.png if the user has no avatar. A user's avatar is a url that is defined by editing a user's profile.

Usage

{{useravatar username="" /}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
usernamenoa stringnoneXWiki user of the form "wiki:XWiki.UserName". Note that the wiki part is optional and should be used when using XWiki in multiwiki mode and you wish to reference a user located in another subwiki. Starting with XWiki 3.2 it's now possible to pass just the shortname (i.e. username without the "XWiki." space prefix).
widthyesan integerimage's natural widthThe width of the avatar image
heightyesan integerimage's natural widthThe width of the avatar image

Example

The avatar of some XWiki.JohnDoe user:

{{useravatar username="XWiki.JohnDoe" width="40" height="40"/}}

The avatar of some XWiki.JohnDoe user located in a subwiki named somewiki:

{{useravatar username="somewiki:XWiki.JohnDoe" width="40" height="40"/}}

Result

noavatar.png

Known Issues

  • In XWiki < 4.01 or 4.1-rc-1, there was a bug where referencing users located in subwikis was not working.

Get Connected