conuly: (Default)
[personal profile] conuly
I know it's not consecutive (entry 10 is not followed by entry 11) but that it does go in some sort of order (entry 10 is always followed by an entry numbered greater than 10, even if that number isn't 11), so.... how does it work, exactly? And why couldn't it just be consecutive?

Date: 2005-01-20 04:30 am (UTC)
From: [personal profile] rho
There are two types of itemid. If I'm remembering rightly (and it's possible that I'm not, though the drift is definitely right), the first of these is the jitemid. This is what tends to get used internally most of the time, and this is just sequential numbers. Then there's the ditemid, which is what goes into the URL of the entry. This is given by (jitemid * 255) + RAND, where RAND is a random number between 0 and 254. It's not sequential because Brad is generally distrustful of sequential things, where you can just type it into your browser's address bar. I'm not entirely sure if there was any particular reason not to make ditemids consecutive, though.

Date: 2005-01-20 09:42 am (UTC)
From: [identity profile] phoenixdreaming.livejournal.com
*nods* I knew it was something like this, and was trying to think how to explain it. As ever, the reason I know about it is style-related. As far as I'm aware, it's not possible to get the jitemid directly in S2 (unlike in S1 -- see [livejournal.com profile] pthalogreen's friends page); instead you have to get it by dividing the ditemid by 256 (I think?) and ignoring the remainder. I haven't yet used this, though I've been meaning to try it out; I saw it mentioned in a post in a style comm, probably [livejournal.com profile] s2styles.

Profile

conuly: (Default)
conuly

December 2025

S M T W T F S
  1 2 3 4 5 6
78 9 10 11 12 13
14 15 16 17 18 19 20
21 22232425 2627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 27th, 2025 03:04 am
Powered by Dreamwidth Studios