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
6331
Features / Re: New revs
« on September 21st, 2011, 02:43 PM »
2 files, 5KB

Revision: 1020
Author: arantor
Date: 13:42:43, 21 September 2011
Message:
! Items in the generic show_settings template should have ids on their spans, in case we want to restyle them dynamically (e.g. if something is disabled and we can re-enable it by selecting a different setting/choice), and also convert the inline style for disabled items to a class style. (Admin.template.php, admin.css)
----
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/Themes/default/skins/admin.css
6332
Plugins / Re: Add-on Manager: Mechanics
« on September 21st, 2011, 02:28 PM »
That's one of the many refinements that can be added, that when setting up the hooks, we test for file existence prior to registration.

I didn't particularly want to add it to loadAddonSource though since I didn't really see a need for it (much as loadSource doesn't)
6333
Features / Re: New revs
« on September 21st, 2011, 02:24 PM »
1 file, 3KB

Revision: 1019
Author: arantor
Date: 13:24:24, 21 September 2011
Message:
! The language hook loader did not differentiate hooks properly, screwing up the path it was supposed to be using. (Subs.php)
----
Modified : /trunk/Sources/Subs.php
6334
Plugins / Re: Add-on Manager: Mechanics
« on September 21st, 2011, 01:26 PM »
*nods* Yeah, it's a valid concern and one that did need to be reiterated, but that I'm firmly against putting too much  support in for version checking.

In the case of PHP and MySQL, there are some functions whose behaviour varies between versions and can't readily be detected in any other fashion. (I mean, in some cases, you can imply a PHP version through looking for a function that only exists in a given release, but it's not particularly reliable when you need something that changed in, say, 5.3.2 vs 5.3.1)

From my point of view, it's the lesser of two evils, and I felt that the approach I'm adopting (i.e. changing the hook's name if you non-trivially change its behaviour) is a lesser evil than version dependence.

Note that file edits do have a version dependence and that's not likely to go away. Mind you, it's not encouraged anyway so hopefully it won't be a big problem...
6335
Plugins / Re: Add-on Manager: Mechanics
« on September 21st, 2011, 01:21 PM »
Add-ons adding their own hooks is going to be rare enough, and frankly if they're going to do that, they really should be renaming it anyway, because that's the only way to guarantee it will be handled properly.

You see, if version checking starts coming into play as a general rule, it's going to get back to hacking version numbers in things to make them work when they inevitably get unmaintained. Been there, done that, want to avoid it. That's why, all the way along, I've been pushing for hook detection and I've been mentioning this caveat since I first said about this direction, since I've always known this would come up.
6336
Plugins / Re: Add-on Manager: Mechanics
« on September 21st, 2011, 01:17 PM »
Yeah, it's not there yet, but it is on my to-do list, like a lot of the functionality here.

I really don't want to get into add-ons having version dependency on each other if at all possible. I'm not sure addons are going to cross-support each other half the time anyway and those that do will almost certainly be using hooks anyway.
6337
Plugins / Re: Add-on Manager: Mechanics
« on September 21st, 2011, 01:13 PM »
Bah, something else I forgot to document.

It's not actually implemented yet but the XML you'd need would be:
Code: [Select]
<required-functions>
<php-function>some_obscure_php_function</php-function>
</required-functions>

Just put in the function name and you're good. (If it's one of those functions where it got enhanced in a later version and you need the latter version's facilities, stick in a PHP version dependency:

Code: [Select]
<min-versions>
<php>5.3</php>
<mysql>5.1</mysql>
</min-versions>

(Both of those are optional, so you can force a minimum MySQL version or a minimum PHP version or both. Version checking on PHP and MySQL is already implemented, though.)
6338
Features / Re: New revs
« on September 21st, 2011, 12:36 PM »
1 file, 4KB

Revision: 1018
Author: arantor
Date: 11:36:26, 21 September 2011
Message:
! Make sure the absolute path to add-on JavaScript files is passed to the cacher, not the relative path even when we had already figured out the absolute one. (Subs-Cache.php)
----
Modified : /trunk/Sources/Subs-Cache.php
6339
Features / Re: New revs
« on September 21st, 2011, 12:20 PM »
1 file, 4KB

Revision: 1017
Author: arantor
Date: 11:20:19, 21 September 2011
Message:
! The admin menu should be able to load add-on files too. (Admin.php)
----
Modified : /trunk/Sources/Admin.php
6340
Other software / Re: More thoughts on SMF 2.1
« on September 21st, 2011, 12:05 PM »
It might be related, I certainly commented on things. But when I see someone whose skills are still pretty raw[1] proclaiming how easy something is, I really begin to despair.
Quote
It's also very close to my list of things some of which I've already done, others are planned. Interesting that I just have wiped the dedicated IM fields and the spell checker a couple of days ago...
Some of them are absolutely natural, some of them are suspiciously close to what we've talked about here though.
Quote
Imho, PDO doesn't make much sense if you go mysql-only (which is what he proposes).
*nods* That's really why it was never much of an option for me. I'd rather go with ADODB as a connector before I touch PDO, though, because PDO doesn't rewrite queries to suit different DB engines.
 1. Even if he has come a very, very long way since a year ago, when he couldn't even come up with a DB query by himself.
6341
Features / Re: New revs
« on September 21st, 2011, 02:41 AM »
4 files, 12KB

Revision: 1016
Author: arantor
Date: 01:40:20, 21 September 2011
Message:
! Fix some bugs in the error detection in add-ons, namely fixing paths in Windows (as debug_backtrace reports filenames with forward slashes, regardless of DIRECTORY_SEPARATOR), fixing the DB column to actually be wide enough and to display it usefully. Note that, at present, the "using filter" part still uses the add-on's full id, as opposed to the part right of the :, but it does something similar with normal filtering, it doesn't use the nice description but basically the same as what you put in the URL. I'll fix that sometime, but for now, it's an improvement. (install.sql, Errors.php, Load.php, ManageErrors.php)
----
Modified : /trunk/Sources/Errors.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManageErrors.php
Modified : /trunk/other/install.sql


(Yes, this now actually works properly, it's sorting out WedgeDesk errors nicely.)
6342
Other software / More thoughts on SMF 2.1
« on September 21st, 2011, 01:15 AM »
So, someone pointed me at http://www.simplemachines.org/community/index.php?topic=453157.0 - it's not even officially by a current team member and yet it's still the closest thing to a guide for 2.1 that anyone outside the team has.

Funny, it's almost as if he read through Wedge's feature list, you know.

I mean:
* Database Support
* Browser Support
* CSS3 & jQuery Implementation
* Bloated Profile Fields

These are things we've actually done already in Wedge, almost word for word.

Then the other stuff that is listed is stuff that has been talked about here, and it seems there is a lot of common ground there, you know, almost as if he'd been reading the forum...

Though I think he's talking out of his ass with PDO. While, yes, PDO does offer some things, sanitisation isn't exactly one of them (though, there is a valid argument to be made that prepared statements can deal with it for the most part), moving it to use PDO "just because" isn't really a good idea - and less hosts have PDO installed. There is an argment for making it an object, which we did, and are likely to expand on in the future.

I take exception, however, to:
Quote
but this can be figured out with PHP very easily, with no need to declare each column.
I'm assuming that he's referring to the db_insert stuff where you have to state the column type. Unfortunately for him, he's actually wrong on at least two counts where it can't be determined safely by PHP, though I will admit both cases are fairly rare.[1][2]

That, and the fact that you do actually have to state the list of columns you're inserting anyway, unless you're inserting an exact row into the table with all values added, and all columns in the exact same order.


Last but not least, I can't see them ever adding ReCaptcha, not least because that's a third party service and they don't use third party services (ever) in the core, but that it's unreliable at very best. I prefer our CAPTCHA, in all honesty, and I'm not saying that because I wrote it.
Posted: September 21st, 2011, 01:11 AM

Also if you want a laugh, they have a new board dedicated to discussion of what's in the next version. Took them long enough.

Mind you, there's still some absolute gems such as http://www.simplemachines.org/community/index.php?topic=375491.msg3165582#msg3165582 - if he thinks it's that simple, I'd love to see him write it.
 1. They are bigint and set/enum cases where the individual values are numeric. In the former case, PHP may munge the data if it's bigger than 2^52 and on a 32 bit setup, and in the latter, if provided as numeric it won't encapsulate the data and will likely cause a query error. In both cases, the data should be sent in quotes, you know, using the string type. Been there, done that.
 2. Mind you, if it were to assume that everything was a string instead and *always* quote everything in the SQL, which is perfectly valid in MySQL even for integers (which it isn't in other DB systems, which is why it's done the way it's done), you could skip specifying both, and just pass everything to the quote function, but that does have a slight performance implication on things that insert a lot of numbers, which is more common than you'd think.
6343
The Pub / [Archive] Re: Logo Madness
« on September 20th, 2011, 05:44 PM »
Quote
@Pete> No, only a drop shadow... It's not centered though.
Hmm, it definitely looks like there's a bevelled edge there.
Quote
lol..I guess you guys want to take another year doing logos then.. ;D (to me this is just stalling. Make a choice and stick with it..)
It's not actually really affecting development, it's more a fun diversion in the scheme of things, until we get something both of us are happy with (I'm happy with most of the recent ones personally)
6344
The Pub / [Archive] Re: Logo Madness
« on September 20th, 2011, 05:15 PM »
Is there a bevel around the edges of the triangles (and is there supposed to be)? Just because I see a slight bevel look on the brown triangle on the left hand image, and I can't see the same on the right hand image, and as a result the right hand image looks flatter to me.
6345
Off-topic / Re: Something kind of crazy
« on September 20th, 2011, 02:05 PM »
No, the Paradox Complete Pack is no longer available now, but it was a pretty epic deal.
Quote
Btw: You know that the avatars in message inbox are shown twice here at wegde.org?
Haven't seen that... not in any of the message modes :/