{yahoo:user_id:action:style}

Description

Builds a Yahoo Messenger presence badge: a link with the ymsgr: protocol wrapping a status image that used to show whether the account was online. The first parameter is the Yahoo account name and is required; with an empty name the expansion outputs nothing. The optional action (default sendim) sets the verb after ymsgr: and must be addfriend, call, or sendim, otherwise it falls back to sendim. The optional style (default 2) is an icon size from 0 to 4; anything else falls back to 2. This is a legacy helper. Yahoo Messenger was discontinued in July 2018 and the status-image host opi.yahoo.com no longer resolves, so the badge image will not load; the engine still emits the same markup. It builds the string only, with no network call at render, so it is safe to use but mostly of historical interest. Compare the sibling badges icq and skype, which share this shape.

Parameters

user_id required default (none)

The Yahoo account name to build the badge for. Required. With an empty value the whole expansion outputs nothing. The name is placed into the ymsgr: link and the image URL unescaped, so store only plain account names here.

action optional default sendim

The verb placed after ymsgr: in the link, which the Yahoo Messenger client would have used to start an interaction. Validated against a fixed list; any other value falls back to sendim.

Allowed values addfriend, call, sendim (any other value falls back to sendim)
style optional default 2

Which status-icon size to request from the image host, 0 to 4. Each number maps to a fixed width and height (style 2 is 125x25, style 1 is 64x16, styles 0 and 4 are the 12x12 dot, style 3 is 86x16). Any value outside 0 to 4 falls back to 2.

Allowed values 0, 1, 2, 3, 4 (any other value falls back to 2)

Examples

virtual{yahoo:alice123:addfriend}
ExpectedMy status
My status">ActualMy status
The second parameter is the action placed after ymsgr: in the link. Allowed values are addfriend, call, and sendim. Here addfriend is valid so it appears in the href; an unrecognised action would fall back to sendim.
test[{yahoo:}]
Expected[]
Actual[]
With an empty Yahoo name the expansion returns nothing, so the brackets close on empty. This is the one deterministic regression test here: the populated examples emit an image link whose text content is empty, which cannot be compared as text (see the virtual marker on those).
virtual{yahoo:alice123:bogus:9}
ExpectedMy status
My status">ActualMy status
The command validates both optional parameters. An action that is not addfriend, call, or sendim falls back to sendim, and a style outside 0 to 4 falls back to 2. So bogus and 9 here produce the same output as the bare call.
virtual{yahoo:{yahoo_id..........}}
ExpectedMy status
My status">ActualMy status
In real templates the Yahoo name comes from an item field rather than a literal. Replace yahoo_id with the field that holds the account name. The user name is placed into the URL unescaped, so only store plain account names in that field.
virtual{yahoo:alice123:call:1}
ExpectedMy status
My status">ActualMy status
The third parameter is the icon style 0 to 4, each a different image size. Style 1 is the small 64x16 status image. Here the action call and style 1 are both valid so both appear in the output.
virtual{yahoo:alice123}
ExpectedMy status
My status">ActualMy status
The simplest call. With only a Yahoo name the action defaults to sendim and the style to 2, so the link opens a send-message action and the badge is the 125x25 image. The status image was served by opi.yahoo.com, which no longer resolves (see Description).