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.
8191
Features / Re: New revs
« on November 18th, 2010, 02:59 PM »
I'm not ignoring you - I really just haven't had time to keep up with everything :(
8192
Plugins / Re: Plugin hooks
« on November 15th, 2010, 11:57 PM »
Could always actually call it plugins. Doesn't really matter, as long as it's a little different to be able to break the mindsets of old.
8193
Plugins / Re: Plugin hooks
« on November 15th, 2010, 11:28 PM »
It's a mindset problem. People think mods, they think of modifications under the hood. They won't see it as modules, no matter how hard we try. We need a clean break to be able to get away from that mentality.
8194
Plugins / Re: Plugin hooks
« on November 12th, 2010, 09:29 PM »
Don't forget the padding introduced by serialize'ing though, that adds a surprising amount of stuff.
8195
Plugins / Re: Plugin hooks
« on November 12th, 2010, 05:49 PM »Do you think 64KB (the max variable length (TEXT) in wedge_settings) will be enough to store all possible hooks...?
8196
Features / Re: New revs
« on November 12th, 2010, 05:46 PM »
Regarding the last change, I haven't looked yet, but I seem to recall that outgoing_email occurs before the email is sent, but the PM and create topic hooks happen after the PM is sent/topic is created...?
* Arantor will review in a minute, just trying to dry off after going out in the rain to get fixings for dinner...
8197
Plugins / Re: Plugin hooks
« on November 12th, 2010, 05:37 PM »
Neither is integrate_eggnog but hey, who's counting?
magic_quotes shouldn't really be needed though (only for those really weird CMSes that do strange mystic things when magic quotes is enabled)
magic_quotes shouldn't really be needed though (only for those really weird CMSes that do strange mystic things when magic quotes is enabled)
8198
Plugins / Re: Plugin hooks
« on November 12th, 2010, 03:46 PM »
There are instances where arrays are stored in $modSettings. None of them are consistent (e.g. the signature settings is a comma-separated value list, the censored words good/bad lists are newline-separated items, as are news items)
Storing an array is fine, but I personally wouldn't make it automatic, because you only have to unserialise it again later - and unless you're going to maintain a list of those things, you won't know what to unserialise en masse at the start.
Better would be to manage individual items yourself as and when.
Storing an array is fine, but I personally wouldn't make it automatic, because you only have to unserialise it again later - and unless you're going to maintain a list of those things, you won't know what to unserialise en masse at the start.
Better would be to manage individual items yourself as and when.
8199
Plugins / Re: Plugin hooks
« on November 12th, 2010, 02:26 PM »
To a point you're getting into the game of second-guessing the developer intent, and without any secondary information, it's hard to be sure.
Remember, the integration functions were originally for linking SMF to a third party app, so reset_pass makes sense there, because what you're doing is when a user changes their password in SMF, you're flagging a routine in A.N.Other system to update the same user's password there too.
I'd argue in that case, there shouldn't be a need for the value to be byref. Other instances, however, yes it should be a byref, particularly if it seems logical for a third party app to want to modify something before SMF has its wicked way with it.
We're sort of taking that idea and expanding on it, meaning that any original purpose is likely now somewhat irrelevant. For each hook, look at where it is, what local variables are applicable and make a judgement call as to whether it is reasonable and appropriate for third party code (of any kind) to be modifying that. reset_pass is one case it shouldn't be necessary, for example.
Remember, the integration functions were originally for linking SMF to a third party app, so reset_pass makes sense there, because what you're doing is when a user changes their password in SMF, you're flagging a routine in A.N.Other system to update the same user's password there too.
I'd argue in that case, there shouldn't be a need for the value to be byref. Other instances, however, yes it should be a byref, particularly if it seems logical for a third party app to want to modify something before SMF has its wicked way with it.
We're sort of taking that idea and expanding on it, meaning that any original purpose is likely now somewhat irrelevant. For each hook, look at where it is, what local variables are applicable and make a judgement call as to whether it is reasonable and appropriate for third party code (of any kind) to be modifying that. reset_pass is one case it shouldn't be necessary, for example.
8200
Features / Re: Scheduled tasks interface
« on November 12th, 2010, 11:57 AM »
Well, it's not *wrong* but from where I'm sitting, add-on is technically correct, because it's something you add on; it's sort of converting between a noun and a verb.
Whereas 'addon' is neither, and in fact in some parts of the UK, it's a corruption of the verb 'to don' as in to wear.
Add-on is, in addition to being 'correct', is also more accepted since it's what Firefox uses (even if their site is addons.mozilla.org)
I'm not actually that bothered; I'd just always write it with the hyphen because to me that's how I think it should be, and why I said about not being a hyphenazi ;)
Whereas 'addon' is neither, and in fact in some parts of the UK, it's a corruption of the verb 'to don' as in to wear.
Add-on is, in addition to being 'correct', is also more accepted since it's what Firefox uses (even if their site is addons.mozilla.org)
I'm not actually that bothered; I'd just always write it with the hyphen because to me that's how I think it should be, and why I said about not being a hyphenazi ;)
8201
Plugins / Re: Plugin hooks
« on November 12th, 2010, 11:02 AM »You want SD to be ported to Wedge, don't you...?
Integration is its purpose, but it shouldn't be its definition. Its definition is a hook.
Imagine that instead of calling parse_bbc(), you had to call parse_bbc_into_an_html_string()
Me neither. Probably another example of two vars that developed at pretty much the same time and were favored by one dev or another... Or they wanted to have the "me" equivalent to you's "$context['member']" or something.
Yeah, adding hooks in the main callee is perfectly fine and I would recommend it, too. Just don't add hooks in every Subs.php function, that's all
I'm sure most modders will work into making sure their modifications are all turned into hooks at that point.
(It's that's possible, of course. But right now I can't think of anything that isn't.)
8202
Features / Re: Scheduled tasks interface
« on November 12th, 2010, 10:53 AM »
With the hyphen, but we shouldn't hyphenazis ;)
8203
Plugins / Re: Plugin hooks
« on November 12th, 2010, 10:45 AM »But, see, what if the modder wants to do something in that place, but unrelated to the list of actions?
Goes back to what I said before - the running state in $context is fully manipulatable, but really there should be no need to abuse such a hook when a better structure can be put in place.
I think modders can start using hooks, as long as we provide them with a dummy mod that would show the correct ways of doing things. (Or some prominent mods start using hooks and they look into their code.)
And as I said earlier, we really should rename the hook functions, too.
Yeah, beginning with $context['user']...
I'm not much of a fan of anticipation, not because it's extra work for us, but more likely because if we start adding hooks in useless places, like at the beginning of every single function, it will waste CPU time for everyone, possibly for nothing.
Maybe for the most important mods, if there are any, we could offer the modder to convert their mods for them.
I think a good policy would be to add a warning when installing a package. In red.
* Arantor likes that idea.
Yes, but it's not very instinctive, see?
8204
Plugins / Re: Plugin hooks
« on November 12th, 2010, 10:20 AM »
Well, I'd love to get stuff out of the global scope generally, there's really not a need for some of the stuff to pollute global scope the way it does.
$modSettings is for modifiable settings, it contains the contents of the admin panel's options that are forum wide (as opposed to $settings which is theme wide and $options which is user-centric) that are modifiable through the admin panel without editing any files, and is the general home of modification settings too.
$modSettings is for modifiable settings, it contains the contents of the admin panel's options that are forum wide (as opposed to $settings which is theme wide and $options which is user-centric) that are modifiable through the admin panel without editing any files, and is the general home of modification settings too.
8205
Features / Re: Scheduled tasks interface
« on November 12th, 2010, 10:14 AM »
Keep it simple: add-ons