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] 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] learnedax.livejournal.com 2005-04-04 07:53 pm (UTC)(link)
On the topic tags: I was very disappointed that LJ just picked more-pretty-styles to work on, rather than tagging. I hope that since tags were #2 in the poll they will at least get around to them sooner.

(Uncutting cut sections can't trivially be done, because the display view receives the entries after preprocessing, so the cut text simply isn't there.)

I'm definitely in favor of user-side content filtering when possible, for the reasons you describe. In this case, while I have pointed out to new users that the cut tag exists on occasion, in general I don't want to complain about the way people choose to present their own content. Now we each get our control.

The most straightforward condition to attach for the case you describe seems to be 'if ($p->view_title() == "Friends (Whatever)"', which I have tested and it seems to work fine, so you could stick that on and have a catch-up filter with ultra-brief entries.

[identity profile] dglenn.livejournal.com 2005-04-04 08:49 pm (UTC)(link)
Well ... that so many users who answered the poll picked "more pretty styles", anyhow ...

Thanks for the tip and code fragment. Until today I hadn't had enough incentive to go read the S2 docs yet.

(And I agree that it's reasonable to point out the option of using cut tags when a fairly new user seems unaware of them -- I've done that myself. I'm not completely anti-cut-tag; they do have their uses.)