Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Arantor
2836
The Pub / Re: Logo Madness
« on September 10th, 2012, 02:34 AM »
I like it a lot, but in my head I keep hearing this voice from this... "BECAUSE I'M BATMAN!" from it. The blue part... because it's Batman.
2837
It's more a semantic thing to me personally. LESS uses @ everywhere to indicate mixins, functions and whatnot and that helps differentiate it from CSS. Having the @ will certainly avoid making mistakes between commands and selectors, but it also conflicts with the use of @ for media.

Conditionals are somewhere between commands and modifiers, semantically speaking. But consider something like lighten(value, 10%) - what's different when writing compared to if(ie[-8], #fff, rgba(255,255,255,.8)) ?

You're still expressing an expression in-line. The difference is that you have a three parameter expression rather than a two parameter expression. To me, they're the same thing. It's a bit trickier with the else part, but even then I still think it should do what normal functions do.

I don't really mind either way, just offering up my thoughts on a technical perspective. People coming to Wedge will deal with whatever's there, warts and all.
2838
@ is for directives like @media - it seems very odd to me to overload that. It sort of threw me when I first encountered LESS on its own when experimenting with Bootstrap, to have everything prefixed with @ throughout the entire source.

Either it needs to be be consistently with @ or consistently without to let @ be left alone as it was for @media type stuff. Unless you have a different symbol in mind that can be consistently used everywhere?
2839
Quote
Can you hear "solves the media query problem" already? Yes I'm sure you can...
Sounds good to me.
Quote
Meaning, "if $custom_color is set, then set background-color to it, otherwise set it to #fff".
Okay, so should this remain like this? Or would it feel more natural to use @ifnull instead of ifnull?
No, it shouldn't use @, since other similar constructs in Wess do not, e.g. darken(). If all of them overloaded @, it'd be OK.

* Arantor is somewhat sandbagged from today, having had to get outside on a bus on barely 3 hours sleep, then engage in psychological warfare, before coming home, leaving 20 minutes later to go visit a care home and arrange for my grandmother to be moved on Monday because of the country's social services system's inability to manage resources.
2840
The Pub / Re: Getting ready for an alpha release...
« on September 7th, 2012, 07:53 PM »
Quote
In what type of query?
The board index.
Quote
Hmm, no, I don't see the issue..?

SELECT something
FROM table
{query_enter_board}
WHERE condition

And {query_enter_board} = JOIN boards AS b ON (b.id_board IN {list_of_boards_I_can_enter}...
No? Isn't that just as simple as having WHERE condition AND {query_enter_board}...?
I know that I used something similar in Noisen (you still have the diff patch), and it felt natural to me.
What you end up doing is an INNER JOIN to something else. OK, let's figure out what that would actually give you. Something simple like the last 5 topics in all the boards we can see. (Expanding it to actually encompass this above)

SELECT t.id_topic, b.name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}boards AS b ON (b.id_board IN (1,2,3,4,5,6))
WHERE t.approved = 1 AND b.id_board = t.id_board
ORDER BY t.id_topic DESC
Quote
1   SIMPLE   t   ref   approved,id_board,last_message_pinned,board_news   approved   1   const   1   Using where; Using filesort
1   SIMPLE   b   eq_ref   board_id   board_id   3   wedge.t.id_board   1
As opposed to
SELECT t.id_topic, b.name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
WHERE b.id_board IN (1,2,3,4,5,6) AND t.approved = 1
ORDER BY t.id_topic DESC
Quote
1   SIMPLE   t   ref   approved,id_board,last_message_pinned,board_news   approved   1   const   1   Using where; Using filesort
1   SIMPLE   b   eq_ref   board_id   board_id   3   wedge.t.id_board   1
This is not a perfect example, performance it's mostly a push because the join doesn't actually benefit you in any way whatsoever. The ONLY way that join will ever be a benefit (and the context in which I actually meant that comment) is if you're not doing it this way.

The bottleneck in these queries is not the method of parsing or injection. It's the fact you're still doing what amounts to WHERE id_board = 1 OR id_board = 2 OR id_board = 3 etc. It doesn't matter a pair of fetid dingo's kidneys that it's been rewritten to the JOIN because it still has to be evaluated as that to actually perform the join.

When I referred to JOINs being faster, they are faster when you're dealing with tables, rather than injected variables like that. Hell, even a join to a subquery might be slightly faster if evaluating the selection criteria there.
Quote
Isn't that just as simple as having WHERE condition AND {query_enter_board}...?
No, it gets more complicated. Plugin authors cannot rely on {query_see_board} actually joining {db_prefix}boards AS b, because it wouldn't for admin users. Which means you either have to force that extra join for admin users (as opposed to bypassing it entirely for performance), or you have to join the table manually yourself to get things like the board names.

Which means that to reliably get board names you'd actually have to do this:
SELECT t.id_topic, b2.name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}boards AS b ON (b.id_board IN (1,2,3,4,5,6))      <------- this is the query_see_board line
INNER JOIN {db_prefix}boards AS b2 ON (b.id_board = t.id_board)
WHERE t.approved = 1 AND b.id_board = t.id_board
ORDER BY t.id_topic DESC

And then it starts to hurt, doing two joins to the same table instead of doing the correct WHERE clause.
Quote
That's good to know...
Like everything it's relative to context. Certain cases will outperform others.
2841
Archived fixes / Re: PHP errors in the memberlist
« on September 7th, 2012, 04:19 PM »
Bah, my fault.

Easy fix. Memberlist.php

Code: [Select]
foreach ($context['members'][$member]['custom_fields'] as $field)
$context['members'][$member]['mlist_cf'][$field['colname']] = $field['value'];

Code: [Select]
if (!empty($context['members'][$member]['custom_fields']))
foreach ($context['members'][$member]['custom_fields'] as $field)
$context['members'][$member]['mlist_cf'][$field['colname']] = $field['value'];

I've fixed it locally but am in the middle of nasty rewrite of quick moderation so won't be committing for a bit.
2842
Plugins / Re: Something I started working on
« on September 7th, 2012, 05:19 AM »
Quote
It wasn't finished based on the complexity IIRC
There were a good many things missing from it IIRC, that was one of the smaller things that just wasn't doable. :(
Quote
Figured as much ;) it was something you really wanted to get into the one you and Nas made under SD
It will get done this time. I'm just currently rewriting the quick moderation code that should make it hookable properly.
2843
Plugins / Re: Something I started working on
« on September 7th, 2012, 03:37 AM »
Just going to leave this one here... (in case it's not clear, the dropdown in quick moderation can be extended now without too much kerfuffle)[1]


Also, to answer Spoogs' question, yes, there will somewhere be a list of unsolved topics for the boards in question. But I still need to make other changes to Wedge to support some of the functionality I want, so it's further down the list.

Just to clarify, I need to do some more work to make quick moderation extensible, at the processing stage, and I need to support some sane way of extending configuration to support a list of boards.

Basically, while yes, ultimately, it will need to be possible to provide options in the manage-boards area for plugins, for something like this I'm really averse to storing it in the boards table for all the effort for that one column. What I might as well do - and what I can well imagine would be useful for other plugin authors - is to have a simple selection in the standard configuration pages, to quickly select which boards are applicable and which ones aren't.

There's already a 'permissions' type for that sort of thing, and I don't see that declaring board types is any more of a problem, in that respect. That way plugin authors can do it real quick and easy.
 1. In the mod that Nas and I worked on, though I can't remember if it was ever finished, under the SD Team account, we actually wanted to do this but there was simply no nice way of doing it in SMF.
2844
Features / Re: New revs
« on September 7th, 2012, 03:31 AM »
(3 files, 4KB)

Revision: 1686
Author: arantor
Date: 07 September 2012 02:30:13
Message:
! There are certain permissions that guests and regular members should never have. (ManageMembergroups.php)

! Clean up the dropdown for quick moderation, now it's accessible through the main message index hook (can't yet extend behaviour, just the displayed dropdown), and saves a bit of code on the side. (MessageIndex.php, MessageIndex.template.php)
----
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/Themes/default/MessageIndex.template.php
2845
Plugins / Re: Something I started working on
« on September 6th, 2012, 08:16 PM »
Did I mention no template changes? :D
2846
Plugins / Re: Something I started working on
« on September 6th, 2012, 05:48 AM »
Quick second preview before I go to bed. It's ugly, but you get the idea where this is going :)
2847
Plugins / Something I started working on
« on September 6th, 2012, 05:24 AM »
I've not been feeling 100%, but anyway, I wanted to kick off with a plugin tonight, just to get back into some semblance of a coding life.

So I figured I'd make a start on something that we might use here and that others might want to use. Colours are configurable from the admin panel, too, because I'm nice like that, and that way it's also preserved across installs of the plugin.

(Still early, this is about as far as I've got... without file edits.)
2848
The Pub / Re: Controversial idea: post moderation on by default
« on September 6th, 2012, 04:10 AM »
OK, let's say hypothetically, that soft-delete hides the post into a single barely-one-line-high message in place of the actual content, simply to say 'This post was deleted by a moderator', and that for those who can see it, there's an additional link 'To view this message, click here'.

We're only consuming a small amount of space on the screen but we're providing context.

For example, consider the following thread:

Post 1: <says something interesting>
Post 2: <blatant insult>
Post 3: The post above me is rubbish.

Now delete post 2. In the classic context you're left with:

Post 1: <says something interesting>
Post 3: The post above me is rubbish.

Which artificially distorts the meaning behind it, though unintentionally. Perhaps there's education that Post 3's author should be more specific, but whatever, it's caused more than one row that I've seen on sm.org, let alone elsewhere.

Under what I'm suggesting you'd have:

Post 1: <says something interesting>
 -- this post has been deleted by a moderator --
Post 3: The post above me is rubbish.

Now, no context is lost. It's quite clear to everyone who can see the thread what happened. No misunderstanding is made based on anything.

If you really did want to delete it, there should be a permadelete option but in almost every case I've encountered, moderators can all only soft-delete and only admins can permadelete, so in most cases nothing changes.

The only counter argument that remains as I see it is the fact you have a potential case of 'soft-soft-delete', for which you can then manufacture an argument of 'but I need a soft-soft-soft-delete' ad nauseum. I'm not convinced there needs to be an extra state, nor am I yet convinced that the ability to unapprove a post is required.

If you want to take it out of circulation, soft-delete it, that's what it's there for. You can put it back later if you need to, or you can spirit it away with the caveats of lost context above, but it should be more obvious in this situation.

* Arantor can fully understand where you're coming from, just not convinced that the described workflow is really ideal.
2849
The Pub / Re: Controversial idea: post moderation on by default
« on September 6th, 2012, 03:30 AM »
Quote
Soft delete could work also though I'm not much a fan of in-line delete.
What's the difference?

Essentially inline delete is a prettier version of what I did with SimpleDesk: the post is left in place in the topic, so pagination and post numbers are left the hell alone, just for everyone there's a very short 'This was deleted by a moderator' type notice, as other systems have. There's a reason they have it - it's a ton more elegant than what SMF does, even if what SMF does is probably a touch more efficient. (But only a touch, with a little imagination it doesn't have to be any slower than what we have now)

Remember that I'm effectively saying that the recycle board is hard-wired on and cannot be removed with the in-line delete idea.
2850
The Pub / Re: Controversial idea: post moderation on by default
« on September 6th, 2012, 03:11 AM »
In which case, wouldn't you use the report function (or some slightly different analogue, maybe rename it as 'discuss with moderators') to discuss it?

Or even just soft-delete and be done with it and then deal with it that way?