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.
5431
The Pub / Re: Bloc Madness
« on April 19th, 2012, 04:19 PM »
Don't even bother with him, Pete... Bloc just amounts to a troll by now. :(
5432
Features / New suffixes for skin files...
« on April 18th, 2012, 11:41 PM »
So, as I suggested elsewhere, I (locally) added support for a few new suffixes.
I'm asking for feedback about the concept. Is it worth including in Wedge?
- index.admin.css: only gets added to the CSS file if viewer is an admin.
- index.mod.css: only gets added if viewer is a local moderator.
- index.custom.css: this one already existed, so it doesn't change anything... but I also added:
- index.local.css: (maybe 'index.custom-local.css'?) only gets added if the file is located precisely in the folder of the current skin, i.e. ignore it if showing an inherited skin.
The last one I felt was needed because one my want to customize a few graphics in a specific skin, and yet still be able to inherit it without having to reset the changes caused by the index.custom.css in yet another index.custom.css file...
What do you think?
I'm asking for feedback about the concept. Is it worth including in Wedge?
- index.admin.css: only gets added to the CSS file if viewer is an admin.
- index.mod.css: only gets added if viewer is a local moderator.
- index.custom.css: this one already existed, so it doesn't change anything... but I also added:
- index.local.css: (maybe 'index.custom-local.css'?) only gets added if the file is located precisely in the folder of the current skin, i.e. ignore it if showing an inherited skin.
The last one I felt was needed because one my want to customize a few graphics in a specific skin, and yet still be able to inherit it without having to reset the changes caused by the index.custom.css in yet another index.custom.css file...
What do you think?
5433
Plugins / Re: Light URL Plugin Maybe?
« on April 18th, 2012, 08:07 PM »
Didnt know that. Okay, not core then ;)
5434
Off-topic / Re: Post count fever
« on April 18th, 2012, 07:46 PM »Well I didn't want to spoil the thing but it looks like I'll be getting the trophy by a thin margin and then you'll reach 10k before I hit 8k ;)
Congrats to the both of us!
5435
Archived fixes / Re: SMF bug 4956 (slash in cache key causes cache to fail)
« on April 18th, 2012, 07:44 PM »That's not strictly true. There are configurations of Apache that do not allow cascading. And not all servers run Apache (I'm looking at moving to nginx, for example)
Yeah, I know. Part of that is the pure I/O and part of that is the parsing stage.
5436
Plugins / Re: Light URL Plugin Maybe?
« on April 18th, 2012, 07:42 PM »
...Because it can then be used directly in tweets, things like that...?
Granted, it's of little use, but it's not of NO use at all. :)
Granted, it's of little use, but it's not of NO use at all. :)
5437
Archived fixes / Re: SMF bug 4956 (slash in cache key causes cache to fail)
« on April 18th, 2012, 07:40 PM »There are problems with doing that, namely that for every folder, you'd have to make sure that index.php/.htaccess were also added to each folder.
And if htaccess works -- it's only needed in the parent folder anyway.
Is % a valid filename character? ;)
Interesting. I guess it's hard to really optimise something like that properly.
5438
Archived fixes / Re: Topic Cache Triggers IDM
« on April 18th, 2012, 07:37 PM »
Yep. It's all about whether MIME types are correctly set... Don't worry.
5439
Archived fixes / Re: SMorg
« on April 18th, 2012, 07:34 PM »
Instead of doing that (again -- I don't know why it works in SMF and not here?), I've changed onposting to be stricter (i.e. refuse anything that starts with [url]). Can you test it in the Test board? :)
5440
Plugins / Re: Plugins I refuse to do
« on April 18th, 2012, 06:00 PM »Or negative numbers... what's 5 - 8 again? :lol:
I don't read AAF, but I have a tab opened on your list of recent posts, so I can try and follow what you're replying to ;)
It's not such a silly idea, except for the fact that so-called MATHCHA problems are generally easy for machines to solve (thanks to Google Calculator)
They'd have to know we have a math question at that point though...
Actually if we were doing that, I'd rather do a plugin that generated it automatically, rather than a core feature.
5441
Archived fixes / Re: Buggy Feed links
« on April 18th, 2012, 05:58 PM »You can't set it with ini_set. It's a PERDIR setting, not an ALL setting. You can only set it via .htaccess if your host allows you to do so (since it's a PHP setup thing, if you do it by ini_set, it's already too late as $_GET will by then already have been processed)
Obviously you can't set the separator *after* you started the PHP page, because you already have the query string in the $_SERVER variable, ah ah :)
I was a little too proud regarding that piece of code. Because I'd modified it for Noisen, I 'thought' I knew it by heart. I'd actually forgotten all about it...
No, no, no it doesn't. Read what the code does. It detects whether arg_separator is ; or not, if it is, it sanitises $_GET based on it, if it's not, it re-parses the query string.
Occasionally though, SMF uses '&', as in the SID injector, and I don't know what it's there for. I'm assuming this is to 'emulate' enable_trans_sid being set to 1. Because I guess some servers won't allow you to use ini_set, if it's at 1, then it automatically injects & at the end of the SID and then you end up with two different URL styles to deal with -- ?PHPSESSID=...; and ?PHPSESSID=...& -- so they chose to inject & and deal with it later (which I don't believe they do...)
I for one couldn't care less about that, but I suppose we should deal with it overall?
I did the same thing you did, a $context setting to have it never inject SID into URLs. But since you've committed it, I didn't bother (and I wasn't that happy with it, I felt there should have been something more elaborate)
Although I'm never one to refuse SID! But only if it's C64-related ;)
For the same reason IP addresses are unreliable as sin anyway, things like NAT routing, where an IP address does not relate to a unique computer any more nor to a unique user.
Except that I saw cases where the trailing ; was present and cases where it wasn't - in the same page.Quote Which was due to my currently doing a rtrim() on the final URL and deleting any extra characters like ";"...
Previously, it was first removing & at the end and then removing ; or whatever.
5442
Archived fixes / Re: SMF bug 4956 (slash in cache key causes cache to fail)
« on April 18th, 2012, 05:44 PM »It's not quite like that, no. The problem with cache keys is that they're all in the one folder - everything goes into $cachedir, and everything would notionally get the same md5() process applied, so you're not just considering collisions across the namespace of a single album's files, but collisions across everything that the md5() is applied to, which is potentially every media item (since we only need apply the md5 if there isn't a / in the supplied cache key)
At least it wouldn't break/kill the cache (at least too soon) if files can't be removed.
That said, md5 might be 128 bits, but it's not 128-bit wide in collision cases. It was proved a few years ago that for collision purposes, the keyspace isn't 2^128 but more like 2^40 due to weaknesses in the way it's generated.
Actually, there aren't that many characters truly valid in a URI, the vast majority of them have... extra meanings, and are normally just %-encoded instead.
Works for me. :)Quote Oh, Pete -- how about we calculate that md5 hash only ONCE per page...? It seems stupid not to do it. We could simply store it in $context['cache_hash'] or something... If empty, just fill it in...
I saved the hash into $settings['cache_hash'] (I know it's not a good idea to use that global, but I don't want to pull $context into itself within the cache functions... Bad karma?), and did some benchmarking. (1000 calls to retrieve 'settings', which is the bigger cache file...)
SVN version with md5, filemtime and base64: 0.45s in average (Which is probably already much faster than in SMF...)
My version with cache hash and bin2hex: 0.44s in average
I'm not kidding you...
I also tried removing the @ in front of the include call, to no effect.
Removing the include entirely gave me results between 0.01s and 0.03s, very unstable, so it's hard to determine which is faster. So I guess I'll still commit this, but not in an enthusiastic way :P
5443
Plugins / Re: Light URL Plugin Maybe?
« on April 18th, 2012, 05:16 PM »For putting this in core, I'm not sure why this is useful as compared to having Pretty URLs in core, but maybe that's just me
If you're creating short hashes that include t or b as references to topics and boards, that's fine - but how does that work for plugins?
Or even several letters... (This would ensure their hashes are tested against in priority.)
What hoops do plugins have to go through in order to work? Plugins will naturally just fall in with pretty URLs (e.g. domain.com/do/pluginaction) without any work, and if they want to use pretty URLs, they can declare extra filters, but even that is going to be more effort than it's usually worth, so they won't bother.
If you not expect them to have to work with yet another URL routing scheme (optionally or otherwise), it's just more hassle for plugin authors, especially when people will ask them how to make it work.
5444
Archived fixes / Re: SMorg
« on April 18th, 2012, 05:09 PM »
Title fixed locally. And here. I think.
The url bug... Well, it's probably a case of "I don't want to fix it before I understand why it works in SMF and not in Wedge..." :P
The url bug... Well, it's probably a case of "I don't want to fix it before I understand why it works in SMF and not in Wedge..." :P
5445
Archived fixes / Re: Time offset (auto detect)
« on April 18th, 2012, 05:03 PM »
I really can't for the life of me accept this timezone system as it is right now.
I was looking at php.net and everything, and was at a loss. What should I do?
Then I considered several solutions and would like to suggest it.
Just get the whole list of timezones, split them into continents, and offer a select box with continent categories and city names for each (sorted by name).
I'd really rather rely on Wedge asking me to say where my timezone is (Europe > Paris), rather than having to select a timezone based on whatever cities we decided to include in the list...
Heck, we could even simply ask them for their country (okay let me just type 'F' here in the dropdown list... That's it, France...), and then automatically load a list of available timezones for the country (timezone_identifiers_list(DateTimeZone::PER_COUNTRY, $country)). If there's only one, use that, otherwise show a new select box with a timezone list... (requires PHP 5.3, though. But by the time it's released, maybe we could expect it to be installed...)
I was looking at php.net and everything, and was at a loss. What should I do?
Then I considered several solutions and would like to suggest it.
Just get the whole list of timezones, split them into continents, and offer a select box with continent categories and city names for each (sorted by name).
I'd really rather rely on Wedge asking me to say where my timezone is (Europe > Paris), rather than having to select a timezone based on whatever cities we decided to include in the list...
Heck, we could even simply ask them for their country (okay let me just type 'F' here in the dropdown list... That's it, France...), and then automatically load a list of available timezones for the country (timezone_identifiers_list(DateTimeZone::PER_COUNTRY, $country)). If there's only one, use that, otherwise show a new select box with a timezone list... (requires PHP 5.3, though. But by the time it's released, maybe we could expect it to be installed...)