Skip to end of metadata
Go to start of metadata

Overview

The my-favourite-users macro is used to list people marked as favourite for a specific user.

A widget, styled using CSS, showing favourite users.

The default output will table of favourite users showing their profile pictures, name and a (star) link

which can be clicked to remove them from the favourites.

 

The macro can be used in Widgets, Theme Builder layouts and within content such as wiki pages and blog posts.

Usage

{my-favourite-users}

Macro Parameters

Parameter

Required

Default

Notes

Bubbles Version

default

(error)

@creator

The username of the person whose favourites people are to be displayed:

  • username - the user's username
  • @self - the currently logged in user (does not output anything for anonymous users)
  • @creator - the user who created the current page or blog (as applicable depending on where the macro is being displayed)
  • @owner - the user who created the space where the current page or blog is located.

1.0

showImg

(error)

true

Show profile pictures for the listed users:

  • true - show pictures
  • false - do not show pictures

1.0

output

(error)

table

The output format for the list:

  • table - tabular format, ideal for use in widgets
  • list - unordered list, ideal for use in Theme Builder menus

1.0

count

(error)

no restriction

Limit the number of users listed to a specific number, eg: count=5

1.0

size

(error)

source image size

The width and height of the profile pictures. Confluence automatically scales all profile pictures to 48x48 pixels, however you can further reduce the image size using this parameter. For best results, use multiples of the default size, eg. 12, 24, 96.

1.0

none

(error)

 

The text to display if there is no favourite users

1.0

Examples

 Show favourites for the creator of the current page

When you don't specify a user, the macro will default to @creator which represents the person who created the current page or blog (as applicable depending on where the macro is used).

{my-favourite-users}

or...

{my-favourite-users:@creator}

This is particularly useful when you are using the macro on a personal home page or in sidebars.

 Show favourites for a specific user

Specify the user name as the default parameter, eg. to show Joe's favourite users:

{my-favourite-users:joe}
 Show favourites for the logged in user

Specify the user as @self, for example:

{my-favourite-users:@self}

This is particularly useful when creating a central portal for all users (rather than individual portals) because it allows the portal to reflect the settings of the currently logged in user.

 Changing profile picture size

To change the picture size, use the size parameter. For example, to set the profile pictures to 24x24 pixels, use:

{my-favourite-users:@self|size=24}
 Hiding the profile pictures

You can hide the profile pictures using the showImg parameter, for example:

{my-favourite-users:@self|showImg=false}
 Outputting users in a list

To output users in a list, use the following syntax:

{my-favourite-users:output=list}

Which will result in something like this:

Hints and Tips

If you are using Theme Builder 3.0, you can embed a list of favourite users in to menus using syntax like the following:

{menubar}
 {menu}People
  {wikimenu}{my-favourite-users:@self|output=list}{wikimenu}
  {menuseparator}
  {compound-menuitem:people|caption=People Directory...}
 {menu}
{menubar}

See Also

1 Comment

  1. Unknown User (thrice)

    Hi,
    would you post the css style of this plz: http://www.adaptavist.com/download/attachments/12157095/my-favourite-users.png?

    iam interested in the way you did it.

    thanks

    thrice