coding argh
Apr. 8th, 2009 10:32 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
so I'm working on bugs 11/12/14 -- allowing maintainers to do awesome stuff to entries.
At this point, I have a) added entry logprops for these different actions, and b) gotten the interface to function so the logprops save.
I am at c) making those options do what they want to do. and I am stuck and it's taken all day just to get this far and I'm frustrated like fuck, but I've also sunk enough time and effort into it that I'm not going to just give it up.
So, issues:
* maintainer-defined security. I found sub visible_to in cgi-bin/LJ/Entry.pm (line 830), but that is only a binary 1/0. I can change it from using the actual security to using a local variable that initially is actual security but, if the entry is in a community and if the relevant prop is set, switch to the maintainer-defined security instead; I don't know if that's the best way to do it. (Maybe just my $security = $maintainerdefined ? $maintainerdefined : $userdefined - but dunno.) or is it sub security (294) that I should change?
* maintainer-defined security part deux: changes to visible_to will affect who can see the entry, but not how it shows up (i.e. it'll look like a public entry even though it's not behaving like one).
* maintainer-defined lj-cut. do I want to wibble around with one or all of the event-* subs (event_html and following subs) by something like $event="$event"? or do I do something in LJ::CleanHTML instead?
* similarly I want to add a [$event added by maintainer] thing at the end of the entry. but don't know how/where.
* maintainer-defined comment disabling. dunno where that logic is. 'fu says it's spread around, and suggests making a method to check for comments being disabled (either by user or maintainer), and replace various sorts of $blah->prop( 'opt_nocomments' ) with calls to that function.
* the adult content flag/reason, which I'm using as a model, has separate functions for determining what the flag is and who it was set by. which I can model for the above options but I don't know if I should.
... I am going to bed now because trying to figure this out is making my head hurt and I do not need another headache, but any comments from dev-types would be awesome. *whimper*
At this point, I have a) added entry logprops for these different actions, and b) gotten the interface to function so the logprops save.
I am at c) making those options do what they want to do. and I am stuck and it's taken all day just to get this far and I'm frustrated like fuck, but I've also sunk enough time and effort into it that I'm not going to just give it up.
So, issues:
* maintainer-defined security. I found sub visible_to in cgi-bin/LJ/Entry.pm (line 830), but that is only a binary 1/0. I can change it from using the actual security to using a local variable that initially is actual security but, if the entry is in a community and if the relevant prop is set, switch to the maintainer-defined security instead; I don't know if that's the best way to do it. (Maybe just my $security = $maintainerdefined ? $maintainerdefined : $userdefined - but dunno.) or is it sub security (294) that I should change?
* maintainer-defined security part deux: changes to visible_to will affect who can see the entry, but not how it shows up (i.e. it'll look like a public entry even though it's not behaving like one).
* maintainer-defined lj-cut. do I want to wibble around with one or all of the event-* subs (event_html and following subs) by something like $event="$event"? or do I do something in LJ::CleanHTML instead?
* similarly I want to add a [$event added by maintainer] thing at the end of the entry. but don't know how/where.
* maintainer-defined comment disabling. dunno where that logic is. 'fu says it's spread around, and suggests making a method to check for comments being disabled (either by user or maintainer), and replace various sorts of $blah->prop( 'opt_nocomments' ) with calls to that function.
* the adult content flag/reason, which I'm using as a model, has separate functions for determining what the flag is and who it was set by. which I can model for the above options but I don't know if I should.
... I am going to bed now because trying to figure this out is making my head hurt and I do not need another headache, but any comments from dev-types would be awesome. *whimper*
no subject
Date: 2009-04-09 06:35 am (UTC)no subject
Date: 2009-04-09 05:20 pm (UTC)even think of posting to dw_devwant to bother the Real Devs, who are working on open beta blockers, with idiotic questions about a non-obb issue.no subject
Date: 2009-04-09 10:56 pm (UTC)no subject
Date: 2009-04-11 08:35 pm (UTC)