LJ::item_link

LJ::item_link — Returns URL to view an individual journal item.

Use

LJ::item_link(u, itemid, anum);

Arguments

  • u. A hashref of a row from the user table, sometimes called a "user object". Although only initially a row from the user table, gets a lot of tacked onto it from various other LJ API functions.

  • itemid. Itemid of entry to link to.

  • anum. If present, $u is assumed to be on a cluster and itemid is assumed to not be a $ditemid already, and the $itemid will be turned into one by multiplying by 256 and adding $anum.

Info

The returned URL may have an ampersand in it. In an HTML/XML attribute, these must first be escaped by, say, LJ::ehtml. This function doesn't return it pre-escaped because the caller may use it in, say, a plain-text e-mail message.

Source:

cgi-bin/LJ/Entry.pm

Returns:

scalar; unescaped URL string