learnedax ([personal profile] learnedax) wrote2005-04-04 01:16 pm

Auto cut-tagging achieved

Well, that was easy. I've been fiddling a bit with making my friends view block quizlets, which involves a bunch of string parsing that the LJ style language does not already include, and [livejournal.com profile] laurion commented that it would be handy to chop entries over a certain length. I realized that I could do that by adding two lines to the basic layout, so now my friends page auto-cuts after 1000 characters. (That number is actually rather smaller than I want for regular use, but works well for demonstration purposes.)

Take that, overlong uncut entries.

[identity profile] metahacker.livejournal.com 2005-04-04 06:36 pm (UTC)(link)
Where does this code go? What style FAQ should I be reading?

[identity profile] learnedax.livejournal.com 2005-04-04 06:58 pm (UTC)(link)
The Advanced Customization page (http://www.livejournal.com/customize/advanced/), which they have cleverly not linked to under any of the Edit My Style pages, even though I'm set to use S2. The docs are reasonably good.

In S2 you have the option to create a pile of different 'layers', but the basic one you want is a top-level layout layer. I copied and pasted the code of mine from the stock Tabular Indent layer, and then tweaked here and there, because I didn't have sweeping changes to enact. It is in this layer that I have added the new code.