melannen: Commander Valentine of Alpha Squad Seven, a red-haired female Nick Fury in space, smoking contemplatively (Default)
melannen ([personal profile] melannen) wrote2009-04-19 01:38 pm

more on styles!

I had forgotten how I react to coding. This is how I react to coding: I went from knowing nothing about anything but basic html to dreaming about Core2 last night. In about six hours. (Of course, for some reason I also dreamed that [personal profile] treewishes was secretly Terry Brooks, so that may not be diagnostic.) I am not *good* at coding, because what I enjoy is crashing through reinventing the wheel and doing things the wrong way by trial-and-error and example without actually reading the directions or re-using old solutions; but I do find it hard to *stop*.

Anyway, after hours of pounding away, I now have a DW style that is a vague approximation of the ugly, crufty, half-broken S1 style I use in various hacked-together forms on LJ and JF. Only on LJ and JF it is high-contrast black, and my DW version is very, very pink, mostly to thumb my nose all all the anti-Tropo Red people. :P (The One Pig With Horns is just a placeholder image, though, promise, [personal profile] stellar_dust.)

The important thing, though, is that it has custom friendlist colors!!! I am just synesthetic enough that seeing my flist people without their proper color screws with my head. So, style with custom colors! (If anyone wants to use this style, which is a variant on LJ's Punquin Elegant, or the Generator port I made, I can give you the core2-compileable source, and if you'd like me to port another basic LJ style over instead, let me know and I'll try it; the code is really, really ugly though (I mean, even in the original S2 version before I mucked with them it was ugly, and I could tell this without even previously knowing anything about S2. Here's how ugly: I had to look at the Core2 test style in order to figure out how to add comments.)

What I'd actually like to do is take one of the actual Core2 styles - Transmogrify is pretty - and make it work with custom colors. But there is NO DOCUMENTATION for how to do custom colors ANYWHERE. For S2 or Core2. In S1 there's a convenient list of predefined properties, and it is very simple to just insert them in your code. In S2 and Core2, NOT SO MUCH.

It *appears* that the friend color values can be gotten from fgcolor and bgcolor. In order to use them in an S2 style, you seem to have to call them as parameters in the print_entry function, like so: function print_entry (Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) , and then you can use them in that function.

A proper Core2 style does not have a print_entry function. The equivalent functions in Core2 do not accept parameters. Similar values (like entry text and date) that are used in the Core2 style seem to come off a list that are gotten from some sort of external library, since they show up in the list of properties / functions without actually being defined in the code, and nothing that looks like it applies to fgcolor and bgcolor is in those lists. So it looks like Core2 just doesn't implement that yet. Or there's some sort of non-discoverable-by-grep way of accessing predefined stuff that I need to use, that is way beyond me. (I should probably figure out where to ask a) is it implemented, and b) if it's not implemented, should I wait, or would it be faster to just figure out perl and css and Core2 and Dreamhack and write the patch myself?)

Anyway, more important question (And test of polls!)

Poll #94 Ethics Poll #DW1
Open to: Registered Users, detailed results viewable to: All, participants: 13


Is it cheating to validate all the OpenID accounts I've got (which is probably around ten) just to get invite codes?

View Answers

Yes. It is cheating. Don't.
1 (7.7%)

Of course not! Do it!
1 (7.7%)

Only if you're going to use the accounts for something else later (like flists or claiming imported comments)
4 (30.8%)

Ooh, why didn't I think of that?
3 (23.1%)

Radio button!
4 (30.8%)


Post a comment in response:

From:
Anonymous
OpenID
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of people who comment anonymously.
Links will be displayed as unclickable URLs to help prevent spam.