:edit: Okay, that was a long post... Could you go through it and, while you're reading, compile a list of everything we're discussing in it, and what needs to be done, what needs to be further discussed, etc...? Because I'm feeling lost. And the more I talk about something, the less time I have to work on it
;)The only way to do it is to create a new rule.
And it's going to cause many people to ask about it... Then we'll make a FAQ rule, that people won't read... Then you'll give up and add a master setting
:PThere's already a moderation entry in the main admin settings menu, so we could have the master moderation setting there, something like "Enable Post Approval and Moderation Rules", maybe something shorter, and depending on that setting, we show the moderation filters menu or not... (Although it's likely that you'll want to have it very much in everyone's sight for starters, if only because it's a powerful new Wedge feature...) (Well, that could be a good opportunity to set post moderation by default.)
One possibility I just thought of, to make post mod faster... We keep a list of unapproved posts, right? I remember seeing that setting in the code I dabbled with this morning. Well, how about we simply add, in query_see_topic, a PHP check to see if there are any unapproved posts... If anything's found, add the t.approved code as needed. Otherwise, skip it!
Though, I guess we could add a tickbox, but I think it's going to be incongruous and out of place (which is why I deliberately didn't go down that road, and tied it into the rules logic as it currently is)
Your logic itself is sound and very commendable. I'm more worried about our users' logic. And mine
:PAs for disabling a filter without deleting it - why would you? Either it's not working for you and needs editing, or it is working and should be left alone.
I don't know -- just say you wanna test whether the filter is actually useful, so you disable it for a while, and if spam comes back or whatever, you re-enable it.
Or if a pre-moderated area is quite slow and you're going on vacation and want people to be able to post freely to it -- you disable it, until you come back and re-enable it without having to worry about re-entering a list of filters or whatever.
Yup, because you might decide to change the scope of the rule, e.g. you set it to new topics by accident but want to switch it to all posts.
Then I think it should be 'acknowledged' at the very least, for instance in the rule settings, instead of 'Posting in...', have something like 'Creating new topic in...' or 'Sending new post in...'?
As for 'posting in these boards', I couldn't think of a better way to phrase it. I suppose past tense is more correct, but the idea is to convey the notion that if the post is made in one of the boards you're picking (or not, depending on situation), that the rule will apply.
Your way of phrasing it is correct, it's just harder to understand on first use. It might be better with the suggestions I wrote above.
slideDown/slideUp didn't occur to me at all when building it, but I agree (having seen it used in the paid subs area too)
Yeah, I like them a lot eheh. I try and use them anywhere I can.
One of the annoying things with these JS toggles though (it's valid for both slide and immediate toggles), is that if you go back to a page (Back button) where you'd changed an opened div, usually the default opened setting will be reestablished and the default selection will stay the same (or the other way around), meaning you have to click once or twice to reset it the way you wanted. Anyway... It's just a minor tidbit, and something I never found a solution for.
SELECT ... WHERE stuff is always going to outperform SELECT ... WHERE stuff AND m.approved... unless (and only unless) the stuff in the first place excludes everything anyway. If there are any rows found by the stuff clauses, they will have to be evaluated by m.approved.
And if it only finds a few entries, it doesn't matter that m.approved is slow
;)I noticed earlier today while making my commit, that I'd at some put put a query_see_topic at the beginning of a query instead of the end. Oops! I immediately moved it to the end, specifically because I figured it would be evaluated last and thus would be much less expensive. So I was right, right?
And... hang on... it is testing for m.approved only when postmod is active.
Yes, in many queries. But not all... Look at Recent.php, for instance. There are more like that. I left them as is because I figured we should discuss it first. (Believe me, I did most of the hard work this morning with t.approved stuff... Was a bit messy and I believe I managed to make it behave, but m.approved, oh man, don't tell me I'm going to spend my day on this so I'll just discuss it
:P)
Can do if you like... it doesn't help that the rules are non typical because of the whole entity 039 thing,
Oh, my... That again? Oh, I try not to touch these with a 10-foot pole... It gave me nightmares so many times before. I'm so tempted to modify the import tool so that it converts all of these 39 and 039 entities to single quotes on the fly, but then I know I'll also have to review the entire Wedge codebase to try and make sure it doesn't keep sending these to the database...
:^^;: (Heck, maybe we could hook into the wesql code to check for 'body parts' and replace 039 on the fly...)
I discovered this on sm.org in their showcase board when I was a Friend. I'd see topics in the message index I wasn't supposed to but because they weren't approved I couldn't actually see the topics themselves. loadBoard should deal with that AFAIK.
So it's the opposite of what I thought, right...? I thought that people wouldn't be able to see the topics in the topic list, but would be able to access them by ID...
Some will want to show multiple badges too - e.g. if you have multiple groups. It's not an easy thing to solve.
That's what I'm saying... An admin setting would be good for that. Even the SMF codebase refers in a comment to how there are several schools of thought on this...
It may be just a detail, but if it can save us from people asking for a plugin for this... And I don't even know if it'd be doable as a plugin anyway
;)Hmm yes, that's the way it should be. I think I meant moderate_forum per se, though. Does giving moderate_forum permission to someone, also give them implicitly (or explicitly through code I couldn't find), the issue_warning permission...?
Not that I'm aware of. issue_warning is a regular permission in the permissions area.
Ah, bugger...
Then again, I'd tend to go to someone's membergroup and check permissions accordingly. But it's always unclear what moderate_forum does. Plus, SMF/Wedge tends to... be a bit lazy about it, and sometimes it adds allowedTo('moderate_forum') for something, where in other situations it won't...
In the same way that YaBB was Yet Another Bulletin Board, perhaps Wedge 1.0 should be codenamed YaSBS - Yet another SMF bug squished :P
More like YaPoS to me. Don't ask me what that stands for.
:niark:A subselect should be faster than a FIND_IN_SET, I believe.
If not, then there's no point in using extra tables and such... Imagine a whole world running on FIND_IN_SET... Lol, what a mess
:lol:Well, I suppose we could add something in loadBoard... Check $topic, and if it's filled, add a query_see_topic?
Yup, sounds like a plan - it would nail down a lot of edge cases that rely on that behaviour.
Okay, doing that right now.
Okay, done.
Interestingly, it was already done this way... I just had to add the AND {query_see_topic} to the INNER JOIN. Problem solved. Hopefully!
A table would be better but you still have to get the query running nicely, though having the option of subqueries should help.
It isn't exactly fantastic to add two tables (I suppose -- one for topics and one for thoughts), but it would probably be best if anything. Plus, allows for fantastic fine-tuning of topic privacy... I mean, if you can actually enter specific member names... Everyone will be over the moon! Another good reason to switch to Wedge
:POh, and reminds me of something... Maybe, MAYBE we should allow for topic privacy to be respected even by admins... I mean, somehow, it's exactly like private messages, or PMs sent to multiple recipients (in the case of "contact-list-based topic privacy").
Because topic privacy is unlikely to be used on a majority of topics, it would keep the table quite small. Maybe we could even get rid of any privacy fields in the topic table, and just do a LEFT JOIN but I don't think it's very practical to do, just a silly idea.
Doing the left join would probably be faster actually.
You think...? Because it would be run even if topic privacy is set to default... (Of course, it wouldn't return anything.)
Well, technically it couldn't be a left (or inner) join I think -- if it doesn't find anything, does it mean it's a public topic, or it's private but you can't access it...?
A healthy dose of computer addiction ;)
And I'm not even getting started on this forum I found through googling for 'wedge fork' a couple of days ago, 'anotheradminforum', where I was surprised to find you and a bunch of our members discussing Wedge and other things... And nobody even cared to tell me
:P Of course, you *had* to post nearly 3000 posts over there in the last 4-5 months, which is more than your post output on wedge.org... And I thought you'd gone quieter over the end of the last year
:PBut I'm not sure it's any good. I mean, why would I would people to be able to view something or not? I want authors to be able to determine that themselves... They're the ones who should know whether they want a thought to be public or private.
Consider it here. Who sets the rules about thoughts here? It's done based on whether you're a Friend or not... isn't that really the same thing as what I'm talking about?
Not really...?
My concept:
Admin: does nothing
Author: determines who can view their thoughts
User: views thoughts based on author's decision
Your concept:
Admin: determines who can view thoughts and replies
Author: determines who can view their thoughts... Well, APART from the people prevented from doing so by the admin
User: views thoughts based on author's and admin's decision
A penny for your thought. I believe in freedom of speech -- and thought. Admins could possibly disable the thought system (which I'm wary of -- considering I haven't even begun to implement this in the first place... not because of laziness but because of freedom), but I'm not sure there's a point in letting them determine that only a single membergroup can access thoughts.
Of course, I *suppose* you thought of that because of Wedge.org's current implementation -- you're thinking that it'd be simpler to just give 'View thought replies' permissions to Friends, and 'View thoughts' permissions to everyone else... Right?