{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. The account name is URL-encoded in the link and the image URL, as skype does; until November 2026 it went in exactly as given, so on an install not updated since pass only a plain account name - never text a visitor could have typed. 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 URL-encoded in the ymsgr: link and the image URL; until November 2026 it went in unescaped, so on an install not updated since 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

test{safe:{yahoo:alice123}}
Expected<a href="ymsgr:sendim?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="My status" /></a>
Actual<a href="ymsgr:sendim?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="My status" /></a>
Only the account name: the link uses the default action sendim and the image the default style 2 (125x25 pixels). The command is wrapped in safe so the page shows the generated markup as text; in a real template you write just the yahoo command. The image host no longer exists, so a real badge shows a broken image.
test{safe:{yahoo:alice123:addfriend}}
Expected<a href="ymsgr:addfriend?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="My status" /></a>
Actual<a href="ymsgr:addfriend?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="My status" /></a>
The second parameter goes after ymsgr: in the link - addfriend, call or sendim. Wrapped in safe to show the markup as text.
test{safe:{yahoo:alice123:call:1}}
Expected<a href="ymsgr:call?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=1" style="border: none; width: 64px; height: 16px;" alt="My status" /></a>
Actual<a href="ymsgr:call?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=1" style="border: none; width: 64px; height: 16px;" alt="My status" /></a>
Style 1 asks for the 64x16 image; the style number is also passed to the image host as t=1. Wrapped in safe to show the markup as text.
virtual{yahoo:{text...........1}}
Expected(the badge for the account name stored in that field of the current item; nothing when the field is empty)
Replace text...........1 with the 16-character id of the field that holds the account name.
test{safe:{yahoo:alice123:bogus:9}}
Expected<a href="ymsgr:sendim?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="My status" /></a>
Actual<a href="ymsgr:sendim?alice123"><img src="http://opi.yahoo.com/online?u=alice123&m=g&t=2" style="border: none; width: 125px; height: 25px;" alt="My status" /></a>
An action other than addfriend, call or sendim becomes sendim, and a style outside 0 to 4 becomes 2 - no error is shown. Wrapped in safe to show the markup as text.
test[{yahoo:}]
Expected[]
Actual[]
With an empty Yahoo name the expansion returns nothing, so the brackets close on empty.