tyggerjai: (Default)
tyggerjai ([personal profile] tyggerjai) wrote in [site community profile] dw_dev2010-10-01 11:56 pm

Styles and "standouts" (and bears, oh my...)

I'm working on a bug in the preview code, and trying to add a "standout" box to preview/entry.bml, which I presume is a markup-vs-content approach to "This information is important and should standout, and we'll let the client decide whether that's bold or flashing red". For most pages, it looks like that would be trivial - there's a lot of "$ret .= <?standout", etc. However, preview/entry.bml seems to have 2 different methods of building pages depending on the styles. One uses the "$ret .= ", and that's fine. The other, however, seems to be a lot more dependent on LJ::S2 code, and that's the bit I'm stuck on.

I have the core2.s2 file now checking whether it's a preview page (thanks to exor674 :), and adding the text I need, but I'm not sure what the appropriate way is to make it "standout" at that level. Clearly for the $ret method, some kind of parsing happens before the final rendering, whereas the s2 in a sense is the final rendering (as far as I can tell :). So can anyone give me a clue as to whether core2.s2 is even the right place to be building the standout, or whether I should add it to $p in preview/entry.bml somewhere, so I can use the ?standout syntax, maybe.

And for the rest of you, hi, I'm Jai :)

jai.
.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-10-01 10:35 pm (UTC)(link)
For the record, the parsing you're referring to is called BML, if it helps with anything. That's generally used mostly for site schemes, though. I'm not sure what you need to do with S2; I haven't been near it at all :D
kareila: (Default)

[personal profile] kareila 2010-10-01 11:33 pm (UTC)(link)
I think putting new code in core2 and/or cgi-bin/LJ/S2.pm is probably the right approach. The preview/entry.bml file is a bit misleading in that it only uses BML for the if ($stylesys == 1) rendering branch. The else branch of that conditional, the S2 branch, is not using BML at all, and the <?standout?> syntax won't work outside of BML.
kareila: (Default)

[personal profile] kareila 2010-10-02 12:51 pm (UTC)(link)
There's nothing already available for coding standouts in S2 that I know of. :) Even the standout CSS classes are only defined in the stylesheets for the individual siteschemes. (I see a standout-border class in lj_base-app.css, but no standout class.)
kareila: (Default)

[personal profile] kareila 2010-10-02 12:47 pm (UTC)(link)
$stylesys == 1 means to use siteschemes (tropo, gradation et al) instead of user styles. It's not the same as S1, the old-style LJ layer rendering, which we don't support.

To use the sitescheme for entry and comment pages, uncheck "Show entry pages in my journal style rather than the site layout" under Customize Journal Style: Options: Presentation: Basic Options.
azurelunatic: Vivid pink Alaskan wild rose. (Default)

[personal profile] azurelunatic 2010-10-02 03:54 am (UTC)(link)
Whee, new devs! It's always lovely to see new devs about!