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] hfcougar.livejournal.com 2005-04-04 05:42 pm (UTC)(link)
You do realize you may be the hero of LJ now?

[identity profile] metahacker.livejournal.com 2005-04-04 05:50 pm (UTC)(link)
Ha! See here. Way to get my back!

Now, can you explain it so the rest of us understand?
tpau: (Default)

[personal profile] tpau 2005-04-04 05:51 pm (UTC)(link)
wow. doe sthis only work for S2?
siderea: (Default)

[personal profile] siderea 2005-04-04 06:14 pm (UTC)(link)
Hrm. I went to your page, and your Mar 13 entry had "[POST HAS BEEN CUT FOR LENGTH. SEE FULL POST AT THIS LINK.]" at the bottom. When I clicked the link (taking me to the page for that entry alone) I saw.... exactly the same text, with the same "[POST HAS BEEN CUT FOR LENGTH. SEE FULL POST AT THIS LINK.]" link at the bottom, and no more text than appeared on your page. Same with others, including March 9, where the cut falls in the midst of someone's screen name, so the link doesn't take you to your page, it takes you to their user info.

[identity profile] dglenn.livejournal.com 2005-04-04 07:17 pm (UTC)(link)
There are reasons (which I consider very good reasons, obviously) why I cut-tag when I do and don't when I don't, even for length. What you've done here hands partial control (they can't make something I've cut appear on their friendslist as though I hadn't, right?) to the reader, so that if they have an even better reason for wanting things cut than I have for wanting them uncut, they control their own reading experience without my having to accomodate them in a way that affects all my other readers as well. In a way this is sort of an extension of the "the web is not for control-freaks" design philosophy that says the user should be able to override colours and font sizes and such on web pages to adjust their reading environment for their own comfort and efficiency. This is pretty darned cool at a level beyond simple "I wish so-and-so would use cuts" grumbling.

Now we just need reader-filterable topic tags ...

(Despite my own attitudes toward cut tags (there are things I'd rather see cut, but cutting for length usually just means a bunch of extra mouseclicks and waits-for-download for me), I could see using your code myself if I ever get brave enough to look at friendsfriends again. (With as long a friends list as mine, friendsfriends finds an awful lot of entries at a time.) It could also be useful if I could design an "I only have time to skim" style to use in conjunction with my similar friends-filter, without affecting my ordinary view.)

[identity profile] dglenn.livejournal.com 2005-04-04 08:54 pm (UTC)(link)
FYI: Small glitchitude if the cutoff happens in the middle of an HTML tag (at least within an HREF). Take a look at houw my most recent entry appears on your friends page -- the auto-cut message is missing.

[identity profile] patrissimo.livejournal.com 2005-04-05 05:24 am (UTC)(link)
would you mind giving a step-by-step sort of tutorial on how to set this? I've never even glanced at any LJ customization options...is it easy to add this feature without changing my friends list style?