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.
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.
siderea: (Default)

[personal profile] siderea 2005-04-04 06:15 pm (UTC)(link)
Having checked you Mar 9 entry under my style, I see there is more text which isn't appearing on the entry's page under your style.

[identity profile] learnedax.livejournal.com 2005-04-04 06:29 pm (UTC)(link)
You are correct. I hadn't yet added in the special case to deal with different views, so it didn't have the desired behavior for my own entries. The permalink_url provided by LJ's Entry object will point to the page in its native style, so it only had that quirk when the style was mine. I've set it to only cut in friends view now.