September 23rd, 2003

  • ruakh

S2: viewer_owns_style() : bool; journal_owns_style() : bool;

Arising from discussion here:

Currently, if a given style is being applied to given journal, that means either (1) that said style belongs to said journal account; or (2) that said style belongs to the logged-in viewer.

Now, in a custom style, it's easy for a layer to determine whether #1 is the case, by hardcoding the style's owner's username and comparing it to get_page().journal.username; and it's easy to use that to determine whether #2 is the case (#2 is the case whenever #1 is not, plus whenever viewer_is_owner()). (This isn't exactly best coding practice - their layer code will now be specific to them - but whatever.)

In a public style, there's no way to determine whether #1 or #2 is the case. Personally, I think it would be useful if a style like Component would only display the Free Text area (which is specific to the style owner) when #1 is the case (so that someone using Component with style=mine wouldn't see their Free Text area on others' journals). To this end, I think there should be a global function, journal_owns_style() : bool, to check if #1 is the case. Also, though I don't see a good use for it, and though it's easily derived from journal_owns_style() and viewer_is_owner(), I think symmetry would desire a global function viewer_owns_style() : bool to complement journal_owns_style().

What do you all think?

New Member Intro

The main page asked for an intro, so here goes.

I am a software developer working for a large non-profit missionary organization. We are looking into using Livejournal to handle prayer requests and communications for our 25,000 staff and 500,000 volunteers. I'm in charge of getting a test Livejournal server up and running, and diving into the code to make modifications. I've worked primarily with C++/C and Java before, but I've done some Perl too.

I think this could really work well for our organization, and hopefully we can be useful for you as well. I look forward to working with you all.