- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
// Real itemid is "contained" in public itemid in a bit tricky way. The formula is:
public_itemid = itemid * 256 + anum
// Quite easy, isn't it? Except where to get that anum. anum is some number assigned when you create a new post in LJ.
// But in fact, you don't need it. Because it is always less than 256, we can avoid searching for it, and just use simple Math to find itemid.
$anum = $public_itemid - floor($public_itemid / 256) * 256;
$itemid = ($public_itemid - $anum) / 256;
Прекрасный подход, то место, где вордпресс и ЖЖ сошлись воедино.
http://drumrock.skipitnow.org/livejournal-tools/itemid/
QNOZFti 25.08.2021 09:48 # 0