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.
3751
Features: Forward thinking / Re: jQuery support
« on February 1st, 2013, 10:29 AM »Why did they even introduce .on? What's wrong with .bind? I sincerely don't get it. It sounds stupid.
They said it was to address an issue where unbinding an element would unbind another one. Which is due to the way they do delegate/live, but... What you gonna do eh?
The only point of these new functions, for me, is that they're shorter, and thus compress better. But because they didn't remove .bind/.unbind, jQuery itself is still larger than needed. To add insult to injury, they removed .live and .delegate, making it impossible to have code that's 100% compatible between 1.5.2 and 2.0... Pfft. I rewrote the .live in editor-func to a simpler .one() (it was begging for it, dunno why I forgot about that method!), but unfortunately I can't do anything about the .ip_button/.remove_button live events: it's got to be in one of the two formats... (Unless, of course, I rewrite the code to selectively spit out a .live or .on depending on the current jQuery version. Which sounds silly, because Wedge only supports one version at a time...)
You flick an electrical switch on and off, not a function! Bind/unbind make so much sense to me. I guess you can turn on an event, but you bind the function to the event. As in attach it.
Of course, they'll say that .on('click') is a reference to .onclick, but then what's .off('click') a reference to..?
3752
The Pub / Re: The Cookie Law (in the UK at least)
« on February 1st, 2013, 10:11 AM »
What say I?
- It's hilarious indeed.
- So, they've single-handedly educated all of us about cookies. If you ask me, it's a polite way of saying "we couldn't do it". I've started watching one of your shows called "Yes, Minister", and it's all about that: navigating in a political world where you may have the best intentions in the world, sometimes you just have to admit you're screwed. (But you won't.)
Considering that precisely they're not taking any action against anyone and are even stepping back, I don't see any reason to add anything to the core...
We could, however, do it core but disabled by default. Something like $settings['tastyEuropeanCookiesArentFatFree']...
- It's hilarious indeed.
- So, they've single-handedly educated all of us about cookies. If you ask me, it's a polite way of saying "we couldn't do it". I've started watching one of your shows called "Yes, Minister", and it's all about that: navigating in a political world where you may have the best intentions in the world, sometimes you just have to admit you're screwed. (But you won't.)
Considering that precisely they're not taking any action against anyone and are even stepping back, I don't see any reason to add anything to the core...
We could, however, do it core but disabled by default. Something like $settings['tastyEuropeanCookiesArentFatFree']...
3753
Features: Forward thinking / Re: jQuery support
« on February 1st, 2013, 09:18 AM »I'm interested in seeing how they're gonna handle the torture of wanting to add a new feature and being forced to do it via a plugin because they're not planning to do further major releases after that one... :^^;:
Okay, I've started working on the upgrade to jQuery 1.9/2.0.
One thing I have to say.
.on()/.off() is utter bollocks.
Because .unbind('click') shares a 'bind('click')' with .bind('click'), it compresses very well. While .on and .off don't share the same 'suffix'.
That means the actual compression rate is not as good as I thought it would be. Maybe it would help if I turned all .click() calls to .on('click'), but I did try that in the 1.5 days and it was disappointed and I reverted it.
Considering that .bind and .unbind are not deprecated (probably because they're used so much... So what's the point eh?), I could keep using them. But, fact is, I *do* save a couple of bytes per gzipped file when using .on(). The real only drawback is that we lose compatibility with 1.6 and below.
So, do you think we should keep .bind or drop it..?
3754
The Pub / Re: Remove flash dependency from AeMe?
« on January 31st, 2013, 11:48 PM »Entirely YouTube :P.
Methinks they're counting only MP4 when both are available.
3755
Features / Re: New revs
« on January 31st, 2013, 11:33 PM »
rev 1887
(3 files, 2kb)
* PMs viewed in conversation mode will now show a 'Reply to all' button next to the regular 'Reply' if there's more than one recipient. The problem with conversation mode is that it already adds a 'generic' Reply to all button at the top of the convo, but doesn't provide with a way to quote an actual PM and still forward it. I think it was an oversight on the SMF team's side... (PersonalMessage.template.php)
! Fixing a bug with Exifixer... Oops. Was too quick to commit. And nope, still haven't tested anything. Good times. (Subs-Exif.php)
- Segoe UI Light isn't good for a default font. Well, it's okay as a header font, but not for smaller headers. Given that a large percentage of users are still on Windows XP, and they don't have that font, I'd rather everyone have the same experience and see Franklin Gothic on a default Wedge install. Did you notice? I always come back to this one... (common.css)
(3 files, 2kb)
* PMs viewed in conversation mode will now show a 'Reply to all' button next to the regular 'Reply' if there's more than one recipient. The problem with conversation mode is that it already adds a 'generic' Reply to all button at the top of the convo, but doesn't provide with a way to quote an actual PM and still forward it. I think it was an oversight on the SMF team's side... (PersonalMessage.template.php)
! Fixing a bug with Exifixer... Oops. Was too quick to commit. And nope, still haven't tested anything. Good times. (Subs-Exif.php)
- Segoe UI Light isn't good for a default font. Well, it's okay as a header font, but not for smaller headers. Given that a large percentage of users are still on Windows XP, and they don't have that font, I'd rather everyone have the same experience and see Franklin Gothic on a default Wedge install. Did you notice? I always come back to this one... (common.css)
3756
Features / Re: New revs
« on January 31st, 2013, 11:08 PM »
rev 1886 -- why do they keep calling it 'exifer' when it's 'exifixer'?
(4 files, 75kb, 99% of which is not my own work.)
* Updated Exifixer library to an unknown version number. Apparently the guys in charge didn't notice they broke their official site, so I found it hidden in their github repo. Since there are so many changes in the library (it's grown by 30KB), I'll just consider they still maintain it, and thus update it. BTW the new version is totally untested. I don't think there should be a problem with the gettext() calls and all, but I'm ready to revert this file change at any time. (Subs-Exif.php)
! Fixed a minor JS error that came up when clicking an attached file to remove it. Good news is, the fix actually saves 5 gzipped bytes. I want more bugs like this one!!!!!!!!1 (post.js)
* Translation. (ManagePlugins.french.php)
* Spacinazi. (smfinfo.php)
(4 files, 75kb, 99% of which is not my own work.)
* Updated Exifixer library to an unknown version number. Apparently the guys in charge didn't notice they broke their official site, so I found it hidden in their github repo. Since there are so many changes in the library (it's grown by 30KB), I'll just consider they still maintain it, and thus update it. BTW the new version is totally untested. I don't think there should be a problem with the gettext() calls and all, but I'm ready to revert this file change at any time. (Subs-Exif.php)
! Fixed a minor JS error that came up when clicking an attached file to remove it. Good news is, the fix actually saves 5 gzipped bytes. I want more bugs like this one!!!!!!!!1 (post.js)
* Translation. (ManagePlugins.french.php)
* Spacinazi. (smfinfo.php)
3757
Features / Re: New revs
« on January 31st, 2013, 04:18 PM »
rev 1883 -- the stuff I could afford to commit separately.
(5 files, 4kb)
! Fixed error log getting broken when showing very long lines. This was desperately in need of a word breaker... (mana.css)
! Fixed mini-menus to ensure they don't generate warnings in the JS console when being animated. This was due to jQuery not checking that a position is set to 'auto' and animating it as if it was a pixel value. So, yeah, 'NaNpx' and 'autopx', not too smart. It didn't crash anything though, which is why it took me so long to spot it. This adds 5 bytes to the gzipped file, which is okay considering I really wanted that fixed. (topic.js)
- The onComplete param was never used in Zoomedia. Thanks to Closure for pointing it out to me during my tests, I guess...! (zoomedia.js)
- Removing a temp code block that I committed by mistake in rev 1880, and which I'm not going to implement anyway. (Display.php)
* Quotenazi. Meaning, a dozen strings or so were using double quotes when they could use single quotes. It's not even gonna save a microsecond, but whatever works. (Security.php)
(5 files, 4kb)
! Fixed error log getting broken when showing very long lines. This was desperately in need of a word breaker... (mana.css)
! Fixed mini-menus to ensure they don't generate warnings in the JS console when being animated. This was due to jQuery not checking that a position is set to 'auto' and animating it as if it was a pixel value. So, yeah, 'NaNpx' and 'autopx', not too smart. It didn't crash anything though, which is why it took me so long to spot it. This adds 5 bytes to the gzipped file, which is okay considering I really wanted that fixed. (topic.js)
- The onComplete param was never used in Zoomedia. Thanks to Closure for pointing it out to me during my tests, I guess...! (zoomedia.js)
- Removing a temp code block that I committed by mistake in rev 1880, and which I'm not going to implement anyway. (Display.php)
* Quotenazi. Meaning, a dozen strings or so were using double quotes when they could use single quotes. It's not even gonna save a microsecond, but whatever works. (Security.php)
3758
Features / Re: New revs
« on January 31st, 2013, 04:12 PM »
rev 1882 -- Google Closure implementation. Thanks for the headaches!
(11 files +1, 23kb)
* Improved handling of already minified files with the Wedge minification process. Instead of using that strange <wedge_jquery> keyword, I'll instead rely on the filename following the jQuery convention, i.e. '*.min.js', meaning you can now safely add your own minified files if you're crazy like me about providing the smallest possible file and testing it through UglifyJS, Google Closure and other minifiers. This also allows jQuery UI to be kept as is. Finally, ensuring that '.min' is not kept in the final filename. This is totally untested, but don't tell anyone! (Subs-Cache.php, Load.php, jquery-1.5.2.min.js, jquery-ui-1.8.24.min.js)
+ Speaking of Google Closure -- added support for its API to Wedge. You'll be able to use Google's remote minification service if you really want to, but it's extremely slow, as expected. The best compromise is still to use Packer, which is pretty much just as efficient as Closure, at least for the Wedge files. (ManageServer.php, Subs-Cache.php, LANGUAGES: Help, ManageSettings)
+ I actually wrote a convoluted regex to convert Closure's returned UTF characters (like accented chars) back to UTF, and realized that the final file was always a couple of bytes larger. So, it was a nice piece of code and I'm committing it just in case to the attic. Additionally, I added extra functions and code to allow for non-Closure packed language strings to be optimized the same way. The more accents, the better the compression is. (attic/Unused-convertU.php, Subs-Cache.php)
+ As mentioned above -- added new functions to the string object: entity_to_utf8(), utf8_to_entity() and entity_to_js_code(). There are plenty of areas that could benefit from them, but I've only done the change in one file, sorry. That's in mimespecialchars(). And it's not even tested. Well, that's what beta testers are for! Get to work, now! (Class-String.php, Subs-Cache.php, Subs-Post.php)
(11 files +1, 23kb)
* Improved handling of already minified files with the Wedge minification process. Instead of using that strange <wedge_jquery> keyword, I'll instead rely on the filename following the jQuery convention, i.e. '*.min.js', meaning you can now safely add your own minified files if you're crazy like me about providing the smallest possible file and testing it through UglifyJS, Google Closure and other minifiers. This also allows jQuery UI to be kept as is. Finally, ensuring that '.min' is not kept in the final filename. This is totally untested, but don't tell anyone! (Subs-Cache.php, Load.php, jquery-1.5.2.min.js, jquery-ui-1.8.24.min.js)
+ Speaking of Google Closure -- added support for its API to Wedge. You'll be able to use Google's remote minification service if you really want to, but it's extremely slow, as expected. The best compromise is still to use Packer, which is pretty much just as efficient as Closure, at least for the Wedge files. (ManageServer.php, Subs-Cache.php, LANGUAGES: Help, ManageSettings)
+ I actually wrote a convoluted regex to convert Closure's returned UTF characters (like accented chars) back to UTF, and realized that the final file was always a couple of bytes larger. So, it was a nice piece of code and I'm committing it just in case to the attic. Additionally, I added extra functions and code to allow for non-Closure packed language strings to be optimized the same way. The more accents, the better the compression is. (attic/Unused-convertU.php, Subs-Cache.php)
+ As mentioned above -- added new functions to the string object: entity_to_utf8(), utf8_to_entity() and entity_to_js_code(). There are plenty of areas that could benefit from them, but I've only done the change in one file, sorry. That's in mimespecialchars(). And it's not even tested. Well, that's what beta testers are for! Get to work, now! (Class-String.php, Subs-Cache.php, Subs-Post.php)
3759
Features: Theming / Re: CSS and JavaScript minification
« on January 31st, 2013, 10:49 AM »
The main problem right now is that I've rewritten a few things not directly related to Closure, that I'd like to commit still...
For instance, I've discovered that Closure's very very strange decision to convert all UTF chars to \u00xx is actually better for gzipping, so I rewrote @language handling to force including \u chars instead. Which in turn pushed me to write a 'generic' function for that in Class-String. Which pushed me to write the opposite function, etc... See the pattern?
I'll just make sure that the code for Closure can be reverted without too much hassle, but I'll still commit it, and just recommend against using it.
BTW, I think the 'x - -k' bug was also in earlier versions of Packer or something... Maybe that's where you heard about it..?
For instance, I've discovered that Closure's very very strange decision to convert all UTF chars to \u00xx is actually better for gzipping, so I rewrote @language handling to force including \u chars instead. Which in turn pushed me to write a 'generic' function for that in Class-String. Which pushed me to write the opposite function, etc... See the pattern?
I'll just make sure that the code for Closure can be reverted without too much hassle, but I'll still commit it, and just recommend against using it.
BTW, I think the 'x - -k' bug was also in earlier versions of Packer or something... Maybe that's where you heard about it..?
3760
The Pub / Re: Remove flash dependency from AeMe?
« on January 30th, 2013, 06:57 PM »
More interested in the alleged 2% market share for WebM... :wow:
3761
The Pub / Re: Remove flash dependency from AeMe?
« on January 30th, 2013, 05:26 PM »
There's no "standard" per se (at least not in the official capacity), so we can only talk about a "de facto standard".
Some people actually think that for a browser to be HTML5, they need to support MP4...
Some people actually think that for a browser to be HTML5, they need to support MP4...
3762
Features: Theming / Re: CSS and JavaScript minification
« on January 30th, 2013, 05:23 PM »
And, of course, compilation started working again about 10 minutes after I posted that...
I decided to work on zoomedia.js rather than script.js for this, it's shorter, maybe Google will be cooler with me. I simply moved the text strings over to it.
I've devised a relatively complicated preg_replace to go from \u1234 in the returned text to some actual UTF8 chars. What a mess, really...
Still -- now it seems to be working. I'd appreciate if people could test a full wipe of their JS cache folder with Closure activated, once they install the updated Wedge.
I decided to work on zoomedia.js rather than script.js for this, it's shorter, maybe Google will be cooler with me. I simply moved the text strings over to it.
I've devised a relatively complicated preg_replace to go from \u1234 in the returned text to some actual UTF8 chars. What a mess, really...
Still -- now it seems to be working. I'd appreciate if people could test a full wipe of their JS cache folder with Closure activated, once they install the updated Wedge.
3763
Features: Theming / Re: CSS and JavaScript minification
« on January 30th, 2013, 04:20 PM »
I've only called the API 5 or 6 times since this morning (i.e. about 7 hours ago.)
At all times, Google returned an "Error(22): Too many compiles performed recently. Try again later."
Their help site mentions having to wait for "an hour" before the quota gets reset, or something.
Yeah, sure.
If I can't do my tests, I can't implement it. Too bad, the code was working and all yesterday... :^^;:
I'll probably commit it to the attic, so that way if someone wants to re-use it later, they can. (e.g. Google fixes their strict policy.)
At all times, Google returned an "Error(22): Too many compiles performed recently. Try again later."
Their help site mentions having to wait for "an hour" before the quota gets reset, or something.
Yeah, sure.
If I can't do my tests, I can't implement it. Too bad, the code was working and all yesterday... :^^;:
I'll probably commit it to the attic, so that way if someone wants to re-use it later, they can. (e.g. Google fixes their strict policy.)
3764
The Pub / Re: Remove flash dependency from AeMe?
« on January 30th, 2013, 04:18 PM »
Well, personally I'm not fussed whether my browser uses Flash or HTML5 to show me a video.
Fact is, as a site author I'd be more inclined to go with Flash-only than with HTML-only because at least I don't have to provide two versions of my video files...
(I could have implemented the MP4/WebM thing in AeMe, too. I didn't, precisely because I never thought WebM would take over. Well, at least not since I started considering support for two video streams for a single item :P I'm still considering it but not for the MP4/WebM use case.)
Oh, and I got browser crashes from either HTML or Flash, so no winner for me here! ;)
Fact is, as a site author I'd be more inclined to go with Flash-only than with HTML-only because at least I don't have to provide two versions of my video files...
(I could have implemented the MP4/WebM thing in AeMe, too. I didn't, precisely because I never thought WebM would take over. Well, at least not since I started considering support for two video streams for a single item :P I'm still considering it but not for the MP4/WebM use case.)
Oh, and I got browser crashes from either HTML or Flash, so no winner for me here! ;)
3765
Features: Theming / Re: CSS and JavaScript minification
« on January 30th, 2013, 03:21 PM »
Very tempted to call it quits. It no longer wants me to compile anything...