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
1756
Bug reports / Re: SMF bug: replying to topic with mismatch of replies
« on January 27th, 2013, 04:05 PM »
Quote
No, Arantor is right...
I'm not entirely right on this one, though, as we'll see in a moment.
Quote
From what I can tell, the system CHECKS the reply count when you press submit, but it only triggers a message if the reply count is HIGHER (new messages have been posted since you started writing)
No, it actually checks the last id. There was a time when it did check the number of replies, however.
Quote
]Hey Arantor, if you are looking into the logic used...  what happens if a post is MERGED while you are in the middle of replying?
Well it's a little more complicated, I'm presuming you're actually talking about merging topics, not merging posts (which is also possible), but let's examine all of it.

Merging posts (post A, post B, then becomes post A which contains post B's contents as well) - if post B is created and merged in the time it takes the new post to be written, the last msg id is unaffected; it is effectively no different to post A being edited in mechanical terms. If the post B was present when starting to write the message, but is no longer present uniquely under its own id (because it's now been merged), this would be the sort of case where the last id would drop but no notification would occur to the user.

Merging topics... if we merge in a topic into the current topic, there are now more replies than before. However, it all comes down to whether there were any messages in the merged-in topic that are after the existing topic's last post, if not, there's no notification because as far as it knows, the last message id hasn't changed. If the last id has changed, then yes, it should trigger it.

If we try to reply to a topic that no longer exists, it tells us so with our old friend "The topic or board you are looking for appears to be either missing or off limits to you."
1757
Bug reports / Re: SMF bug: replying to topic with mismatch of replies
« on January 27th, 2013, 03:39 PM »
They did a change around last post being marked read before we forked, but I don't recall they changed this in any fashion.
1758
Archived fixes / Re: Plugin execution
« on January 27th, 2013, 03:07 PM »
Not merging, moving. The move topics stuff does a strange switch of languages.

I still haven't seen it fail yet...
1759
Bug reports / Re: SMF bug: replying to topic with mismatch of replies
« on January 27th, 2013, 07:26 AM »
Yes, bt that's not the point.

In this form, right here where quick reply is, it includes the number of replies "right now" . When the reply is sent off, it's compared with the number of replies on the server and if there are more replies on the server than there were when I started writing, boom, there's the message.

But if the reply count is suddenly lower, nothing happens. I'm just saying that we already fetch that information, we already process most of it, we just don't do anything currently if we split posts off or delete them. It is entirely possible to write an angry reply to a post only for that post to be removed unexpectedly.
1760
Bug reports / Re: SMF bug: replying to topic with mismatch of replies
« on January 27th, 2013, 02:13 AM »
Yeah, that was what prompted it :P

But yeah, I don't think it would be *that* common but remember, the bulk of the logic is already there anyway. Instead of checking the number of replies, check the last message id. If that's different, something's changed between starting to reply and hitting the button. It shouldn't even add any extra work that isn't being done already.
1761
Plugins / Re: Plugin JS language settings
« on January 26th, 2013, 07:48 PM »
Quote
You should look at the source code before typing for so long...
I'd rather clarify it here before wading through code, much easier to understand when the intent is known as well.
Quote
Maybe by saying "@language :index", where ":file" refers to the current plugin's file list, but... Hmm, I don't know, it's alright as it is for now...
I don't have a problem with plugins having to be explicit about it.
1762
Bug reports / Re: SMF bug: replying to topic with mismatch of replies
« on January 26th, 2013, 07:47 PM »
No, but providing last message id would probably be enough, unless we care about earlier messages being split off.
1763
Bug reports / SMF bug: replying to topic with mismatch of replies
« on January 26th, 2013, 06:47 PM »
We all know that if you try to reply to a topic that has been replied to in the intervening time, you should get a message. But it won't do that if there is a mismatch the other way.

Specifically, when you try to reply to a topic, the number of replies in the topic is known to the reply page. And if the number of replies is greater, it will throw you the message.

But if there are less replies than it said, it won't give you a message. Specifically in my case, I replied to a thread, only to discover that the last half a dozen replies had been split off into another topic, leaving my reply to be an orphan.[1]

Need to investigate about checking for a mismatch either way rather than just > count.
 1. And no, no amount of 'return me to my post' would have made it clear that that was what had happened either.
1764
Plugins / Re: Plugin JS language settings
« on January 26th, 2013, 06:10 PM »
Quote
@language xxx does exactly this: loadPluginLanguage('xxx').
Then it will be broken because all of the loadPlugin* functions need two parameters ;) They need the plugin id and the plugin file to load. I don't mind how we do that, as I suggested before we could accept it as author:plugin:file, explode on : then recombine the first two.
Quote
If you're telling me that a LPL parameter can have slashes in it, I'll just add a more generic [^\n]+ to the regex.
Well, there's no enforcement on what the id can be other than it has to be author:plugin and less than 255 characters (though, frankly, it probably should be alphanumerics only plus that middle : separator) and separating files to load with ,

Wait a minute though, if you're calling this for a given plugin, the implication is that you'll already have the plugin id... still gotta pass that through to loadPluginLanguage but otherwise yeah it's just a regular path that you're missing at that point.
1765
Plugins / Re: Plugin JS language settings
« on January 26th, 2013, 04:58 PM »
Quote
Blame me all you will, it won't do you any good... 8-)
I can blame me too for not keeping it in step :P
Quote
Fact is, it WILL work, but NOT on the first request, but it won't even be noticeable if the first request is done by someone who's using the default board language... (Because in any case it'll have the same filename.)
Is that 'first request' for any language, or first request for 'non default languages'?

Also, here's a thought to make it more complex. How does one call @language for a plugin's language file? Since the plugin's path is never exposed to the plugin itself (a plugin, by design, should never need to know where it actually is or rely on hardcoded paths, when $context['plugins_dir'] should be supplying it), it must somehow pass the plugin id, perhaps @language Arantor:plugin:file which could be fun if they have a separate lang dir like I tend to do on bigger plugins... @language Arantor:plugin:dir/file,Arantor:plugin:dir/otherfile
Quote
The more I see that caching function, the more I'm scared by the sheer complexity of it, although it's nowhere near that of Class-CSS's... Then again, they do their job :P
That is their job, yes ;) The entire magic process is complicated, I don't understand most of its details any more, I've sort of come to rely on them 'just working', even though I'm aware there are issues with the CSS loader.
1766
Archived fixes / Re: Previous/next topics don't work properly
« on January 25th, 2013, 08:34 PM »
The plugin server and the update process have common code elements. And it's why I'm so adamant about them being separate physical servers, to cope with the heavy load they're going to get.

But the plugin server is actually a higher priority for me to get running - I actually have no qualms about deferring an 'upgrade' process until we're nearer actually needing it, and honestly I have no problem with the first update or two being manually pushed out until we're in a position to do automated push updates.
1767
Plugins / Re: Plugin CSS in regular files?
« on January 25th, 2013, 08:32 PM »
The latter question is particularly important, because it's the one reason I specifically wrote add_plugin_css_file to not join all the plugin CSS files together on a single page load, because as far as I was concerned, if you did that you could have an exponential number of CSS files.

The former is also important because plugins don't necessarily advise other systems when they are disabled for any reason, and they're not going to force a cache rebuild either.

There are, as I see it, two distinct kinds of CSS that a plugin needs to add - CSS for its own stuff when it's in use, which will typically be its own file but otherwise static (e.g. the calendar has a CSS file, the helpdesk has a couple too), while I can also imagine adding inline CSS for the specific occasions where an entire file is not needed, or when it is dynamically computed for whatever reason.
1768
Plugins / Re: Plugin JS language settings
« on January 25th, 2013, 08:25 PM »
Well, the add_plugin_js_file malarky is primarily just a wrapper around the internal JS loading business (or it should be), so any behaviour like that is not a plugin's specific bug, but a bug spawned out of the fact that the plugin loader has not been kept in step with the main loader.

In theory, the add_js_file and add_plugin_js_file should behave consistently from calling perspective, i.e. they add the file requested. If the backend wants to perform some magic, it should do it consistently the same for both.
1769
Plugins / Re: Plugin CSS in regular files?
« on January 25th, 2013, 05:04 PM »
What happens when the plugin is disabled? Are you planning to add the name of the plugin to the name of built CSS file?
1770
Archived fixes / Re: Previous/next topics don't work properly
« on January 25th, 2013, 04:42 PM »
The plugin server is firmly in my domain ;)