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.
3121
Features / Re: New revs
« on April 29th, 2013, 02:18 PM »
rev 2082 -- just for the French audience. Okay... Just for me, then.
(34 files, 30kb)
* French translation. (Errors, index, Security)
* Updated all French language files to replace (non-breaking spaces) with narrow versions ( ), which I just realized even works in oldIE... So, why bother using nbsp? Except for the extra byte it takes, which I can live with... After all, we just added another kilobyte to the index language file... (Hopefully not forever, eheh.) For those wondering, thin spaces are supposed to be shown right before any punctuation sign with at least two strokes, which basically means [?!;:]. (34 files)
(34 files, 30kb)
* French translation. (Errors, index, Security)
* Updated all French language files to replace (non-breaking spaces) with narrow versions ( ), which I just realized even works in oldIE... So, why bother using nbsp? Except for the extra byte it takes, which I can live with... After all, we just added another kilobyte to the index language file... (Hopefully not forever, eheh.) For those wondering, thin spaces are supposed to be shown right before any punctuation sign with at least two strokes, which basically means [?!;:]. (34 files)
3122
Features / Re: return_raw buggy if enableCompressedOutput is on
« on April 29th, 2013, 10:00 AM »
Re: output buffers, nothing really surprising... I'll admit I was stumped at first, but then I remembered; ob_sessrewrite is only called at the start of the templating session (long after most of the PHP has been executed), meaning that it shouldn't be called at all if you're doing exit(), rather than obExit().
So, technically, I guess I could do without the ob_end_clean() calls... What mattered to me was not saving the cost of gzipping a few bytes (it's probably nearly free), but of running ob_sessrewrite on them, which would be potentially most costly.
I've double-checked other areas in Wedge that call ob_end_clean(), and they don't seem to generate any errors, so I'm *guessing* this is due to some codepath executed when in Ajax mode. The only two places where I get a crash, are in notification unread count, and thought retrieval. The first one probably generated the bug I mentioned yesterday (that the unread count cache wasn't invalidated when the number was changed), while the second never happened to me in the course of my testings, because thoughts are only ajaxively retrieved when they're not pure text (e.g. have a HTML tag in their rendition.)
I'm not going to delve too deep into this; just going to say I'm sorry for wasting your time with this, and just delete the ob_end_clean line...
I'm just wondering if that call to clean_ouput() REALLY is that necessary... After all, all it does is reset the output buffers. But at this point in the code, we haven't even started dealing with them in a proper fashion -- ob_sessrewrite isn't added to the output buffer list yet. Heck, suddenly it strikes me... Maybe it's going to run ob_sessrewrite twice instead..??!!
Just let me check... Nope, nope, I was a bit confused.
- clean_output() changes the output buffer list from "default, gzip" to "default" then to "default, gzip, ob_sessrewrite".[nb]Which is a problem, technically... It assumes that gzip is the only extra handler at this point. It should be doing the while() call, and then the rest..? I think. Warrants looking into.
- obExit() adds ob_sesswrite then shows the skeleton, but obExit(false) simply goes through obExit but skips both $do_start and $do_finish code-blocks, effectively NOT adding ob_sessrewrite to the list...
- so, technically, I could get away with just calling clean_output() and not calling obExit(false), so that Wedge doesn't execute the side-functions like sending mail or tracking stats... I guess, it would make more sense.
Well, what a complicated mess. To my defense, when I wrote the return_* function, I mainly copied-pasted code from somewhere else in our codebase, then tested it, and as it worked... Didn't really bother to see the magic it did. (Or needed to do.)
So, technically, I guess I could do without the ob_end_clean() calls... What mattered to me was not saving the cost of gzipping a few bytes (it's probably nearly free), but of running ob_sessrewrite on them, which would be potentially most costly.
I've double-checked other areas in Wedge that call ob_end_clean(), and they don't seem to generate any errors, so I'm *guessing* this is due to some codepath executed when in Ajax mode. The only two places where I get a crash, are in notification unread count, and thought retrieval. The first one probably generated the bug I mentioned yesterday (that the unread count cache wasn't invalidated when the number was changed), while the second never happened to me in the course of my testings, because thoughts are only ajaxively retrieved when they're not pure text (e.g. have a HTML tag in their rendition.)
I'm not going to delve too deep into this; just going to say I'm sorry for wasting your time with this, and just delete the ob_end_clean line...
I'm just wondering if that call to clean_ouput() REALLY is that necessary... After all, all it does is reset the output buffers. But at this point in the code, we haven't even started dealing with them in a proper fashion -- ob_sessrewrite isn't added to the output buffer list yet. Heck, suddenly it strikes me... Maybe it's going to run ob_sessrewrite twice instead..??!!
Just let me check... Nope, nope, I was a bit confused.
- clean_output() changes the output buffer list from "default, gzip" to "default" then to "default, gzip, ob_sessrewrite".[nb]Which is a problem, technically... It assumes that gzip is the only extra handler at this point. It should be doing the while() call, and then the rest..? I think. Warrants looking into.
- obExit() adds ob_sesswrite then shows the skeleton, but obExit(false) simply goes through obExit but skips both $do_start and $do_finish code-blocks, effectively NOT adding ob_sessrewrite to the list...
- so, technically, I could get away with just calling clean_output() and not calling obExit(false), so that Wedge doesn't execute the side-functions like sending mail or tracking stats... I guess, it would make more sense.
Well, what a complicated mess. To my defense, when I wrote the return_* function, I mainly copied-pasted code from somewhere else in our codebase, then tested it, and as it worked... Didn't really bother to see the magic it did. (Or needed to do.)
3123
The Pub / Re: Warning Message
« on April 28th, 2013, 09:20 PM »
Hmm... just noticed that my notification cache invalidation doesn't seem to work...
Also, the animation has a glitch in android. Hmm...
Also, the animation has a glitch in android. Hmm...
3124
The Pub / Re: Warning Message
« on April 28th, 2013, 09:18 PM »
Did you have a look at my magical one-line CSS code for the popup animation? ;)
As for your OP, I'm fine with the styling of everything. I can always tweak it a bit later if you want. I shall also have a look at the padding issue! Tomorrow, hopefully...
As for your OP, I'm fine with the styling of everything. I can always tweak it a bit later if you want. I shall also have a look at the padding issue! Tomorrow, hopefully...
3125
Off-topic / Re: Doctor Who
« on April 27th, 2013, 11:54 PM »
Any good? Will watch this Monday as usual...
3126
The Pub / Re: Thoughts one wireless theme/skin
« on April 27th, 2013, 07:24 PM »
Wouldn't expect anyone to!
3127
The Pub / Re: Thoughts one wireless theme/skin
« on April 27th, 2013, 07:04 PM »
Yes but it's good to have it if you don't have a PC around and need to apply something asap...
3128
The Pub / Re: Thoughts one wireless theme/skin
« on April 27th, 2013, 05:31 PM »
Just a few comments...
- Tablets use Weaving by default, anyway. If you end up being served Wireless on a tablet, please tell me the name of your tablet, and I'll fix it.
- While it's technically possible to have a regular Wireless and a bandwidth-conscious Wireless, it'd be a mess to implement. What Wireless does is test SKIN_MOBILE inside the Weaving templates (it's set to 1 in Wireless, and 0 in other skins), and redo the templates based on this -- such as, using only one column for some tables along with simple line breaks, instead of multiple columns, so that it renders more naturally in a horizontally-challenged device; so, yes, it removes some HTML here and there, but it doesn't remove any features. Doing that would beat its purpose, which is to make a responsive skin with the same amount of features as the others. In order to make an extra level of bandwidth consciousness, I'd have to add some new constant, like SKIN_MOBILE_DATA or SKIN_MOBILE_NOWIFI, and do even more tests in the template for this. It's doable, once again, but it just feels overcomplicated, and I don't really imagine other themers using that. Of course, considering that my plan is to entice people into doing skins rather than full-fledged themes, it might still be possible to do it.
- I can't determine your current bandwidth, except vaguely with JavaScript, meaning I can't redirect you to some skin or the other based on your bandwidth in a very predictable manner. This means that you'd have to manually select the bandwidth-optimized version, and it doesn't feel very natural. Wedge is cool in that it automatically presents you either the desktop, or the mobile version, for your comfort. (e.g. if you're a guest visiting a forum for the first time, you're more likely to stay on it if it's adapted to your current device.)
I just don't feel like removing so many stuff "by default" without requiring an extra effort from the user, and I don't see much of a point in trimming down our HTML when it's already much, MUCH lighter than any competitor's equivalent HTML.
The only thing I can realistically do, is ensure that mobile devices have a good-looking skin for them, and even that isn't always easy to do.
- Tablets use Weaving by default, anyway. If you end up being served Wireless on a tablet, please tell me the name of your tablet, and I'll fix it.
- While it's technically possible to have a regular Wireless and a bandwidth-conscious Wireless, it'd be a mess to implement. What Wireless does is test SKIN_MOBILE inside the Weaving templates (it's set to 1 in Wireless, and 0 in other skins), and redo the templates based on this -- such as, using only one column for some tables along with simple line breaks, instead of multiple columns, so that it renders more naturally in a horizontally-challenged device; so, yes, it removes some HTML here and there, but it doesn't remove any features. Doing that would beat its purpose, which is to make a responsive skin with the same amount of features as the others. In order to make an extra level of bandwidth consciousness, I'd have to add some new constant, like SKIN_MOBILE_DATA or SKIN_MOBILE_NOWIFI, and do even more tests in the template for this. It's doable, once again, but it just feels overcomplicated, and I don't really imagine other themers using that. Of course, considering that my plan is to entice people into doing skins rather than full-fledged themes, it might still be possible to do it.
- I can't determine your current bandwidth, except vaguely with JavaScript, meaning I can't redirect you to some skin or the other based on your bandwidth in a very predictable manner. This means that you'd have to manually select the bandwidth-optimized version, and it doesn't feel very natural. Wedge is cool in that it automatically presents you either the desktop, or the mobile version, for your comfort. (e.g. if you're a guest visiting a forum for the first time, you're more likely to stay on it if it's adapted to your current device.)
I just don't feel like removing so many stuff "by default" without requiring an extra effort from the user, and I don't see much of a point in trimming down our HTML when it's already much, MUCH lighter than any competitor's equivalent HTML.
The only thing I can realistically do, is ensure that mobile devices have a good-looking skin for them, and even that isn't always easy to do.
3129
Archived fixes / Re: 'Thoughts' Bug
« on April 27th, 2013, 10:36 AM »
And one of the 'little problems', is that with the major rewrite I did, what Ajax.php excepts from a deletion request is... a thought ID, and an empty thought. If I'm to reject empty thoughts, then I have to do it differently... :-/
Or, maybe I could simply show a confirmation popup when emptying the thought, so that the user knows what it'll do, but the only thing it'll do is add more bytes to the file...
Or, maybe I could simply show a confirmation popup when emptying the thought, so that the user knows what it'll do, but the only thing it'll do is add more bytes to the file...
3130
Features / Re: New revs
« on April 26th, 2013, 06:55 PM »
rev 2078
(2 files, 5kb)
+ Another one of my hobbies... I've had this running literally for weeks on my local install, with no discernable issues, so I'm assuming my regex and general code is flawless. Implemented :matches pseudo-selector in Wess, in a way that you don't have to do it yourself, instead it will group your elements as efficiently as it can (it's far from perfect, but really, it's better than nothing), and only on browsers that support it, meaning mostly Firefox and Chrome, as usual. This doesn't save a lot, I'm afraid... But still, it's something like 100 or 200 bytes on the main CSS file, gzipped, and it's basically free, except for the processing at cache time, so there you go. (Subs-Cache.php)
! Oops, committed some debug styles, it seems... (index.css)
@ And there we are, most of my code is now committed. There are still a few things here and there, but I've got only 12 outstanding files left to commit (mostly changes that will never make it because I'm not sure about them), which is very, very little by my standards. Yay, now I can have a look at my to-do list again, ah ah... It's never going to end, I think... ;)
(2 files, 5kb)
+ Another one of my hobbies... I've had this running literally for weeks on my local install, with no discernable issues, so I'm assuming my regex and general code is flawless. Implemented :matches pseudo-selector in Wess, in a way that you don't have to do it yourself, instead it will group your elements as efficiently as it can (it's far from perfect, but really, it's better than nothing), and only on browsers that support it, meaning mostly Firefox and Chrome, as usual. This doesn't save a lot, I'm afraid... But still, it's something like 100 or 200 bytes on the main CSS file, gzipped, and it's basically free, except for the processing at cache time, so there you go. (Subs-Cache.php)
! Oops, committed some debug styles, it seems... (index.css)
@ And there we are, most of my code is now committed. There are still a few things here and there, but I've got only 12 outstanding files left to commit (mostly changes that will never make it because I'm not sure about them), which is very, very little by my standards. Yay, now I can have a look at my to-do list again, ah ah... It's never going to end, I think... ;)
3131
Archived fixes / Re: 'Thoughts' Bug
« on April 26th, 2013, 06:30 PM »
It just sounded natural to me.
Does everyone, basically, want me to disable the ability to delete a thought by emptying it..?
Does everyone, basically, want me to disable the ability to delete a thought by emptying it..?
3132
Archived fixes / Re: 'Thoughts' Bug
« on April 26th, 2013, 05:16 PM »
Let's just imagine you're editing a thought, and then you realize you're better off WITHOUT the thought at all, as it makes you silly... Sometimes, your first reaction will be to just erase the thought and submit. Earlier, it wouldn't work. ;)
3133
Features / Re: New revs
« on April 26th, 2013, 03:31 PM »
rev 2077 -- another large commit with tons of changes made over the weeks... When is TortoiseSVN going to add cherry-picking, please..?
(6 file, 8kb) (very meager compared to the time I spent on these... :P)
@ By order of appearance in the index CSS file... (index.css)
! Fixed search popup width in IE6.
- Removed the Chrome hover/focus hack I added a few months ago, as the bug no longer seems to trigger in the latest versions. At least if it shows up again, this time I know where to look for a quick fix, eh...
* Moved .ie_button class to the IE6 file. We don't need to define it for other browsers, do we..? (Also, extra.ie6.css)
* Minor tweak to button styling in hover mode. Slightly better, I think...
* A NEARLY complete rewrite of the CSS and JS for main menus. The basic principle is the same, but I wanted to use a CSS-only image for menu arrows, instead of a GIF picture. This forced me to use alternate techniques, and add more bytes for IE compatibility, although I'm later planning to see if I can't just write a 'cleaner' version with more proper CSS, and have an oldIE-compatible version on the side, as an afterthought. Also, among the advantages of the rewrite: you'll no longer get 'stuck' menu arrows in menu animations, you can easily change the arrow color to match the menu's, the JS-free version actually behaves better (sub-menus are correctly located next to their parent entries, rather than at a fixed position next to them, which I always disliked), and the rewrite saves about 60 gzipped bytes of CSS and 90 gzipped bytes of JS, which is always nice... And more than compensates for the fixes and additions I made to the thought system in my last couple of commits. (Also, script.js)
@ And the other files...
! Fixed .pagesection showing scrollbars in IE6. (extra.ie6.css)
- Removed various IE6 and IE7 fixes for mini-menus and button backgrounds, as they were no longer needed due to the rewrite... Eh eh. (extra.ie6.css, extra.ie7.css)
* A few tweaks to Wine and Wuthering, to accomodate for the menu rewrite mostly, but also keep up with some other changes I made recently, and remove tweaks that were no longer in use. I don't always test these, maybe I should... (Wine/extra.css, Wuthering/extra.css)
(6 file, 8kb) (very meager compared to the time I spent on these... :P)
@ By order of appearance in the index CSS file... (index.css)
! Fixed search popup width in IE6.
- Removed the Chrome hover/focus hack I added a few months ago, as the bug no longer seems to trigger in the latest versions. At least if it shows up again, this time I know where to look for a quick fix, eh...
* Moved .ie_button class to the IE6 file. We don't need to define it for other browsers, do we..? (Also, extra.ie6.css)
* Minor tweak to button styling in hover mode. Slightly better, I think...
* A NEARLY complete rewrite of the CSS and JS for main menus. The basic principle is the same, but I wanted to use a CSS-only image for menu arrows, instead of a GIF picture. This forced me to use alternate techniques, and add more bytes for IE compatibility, although I'm later planning to see if I can't just write a 'cleaner' version with more proper CSS, and have an oldIE-compatible version on the side, as an afterthought. Also, among the advantages of the rewrite: you'll no longer get 'stuck' menu arrows in menu animations, you can easily change the arrow color to match the menu's, the JS-free version actually behaves better (sub-menus are correctly located next to their parent entries, rather than at a fixed position next to them, which I always disliked), and the rewrite saves about 60 gzipped bytes of CSS and 90 gzipped bytes of JS, which is always nice... And more than compensates for the fixes and additions I made to the thought system in my last couple of commits. (Also, script.js)
@ And the other files...
! Fixed .pagesection showing scrollbars in IE6. (extra.ie6.css)
- Removed various IE6 and IE7 fixes for mini-menus and button backgrounds, as they were no longer needed due to the rewrite... Eh eh. (extra.ie6.css, extra.ie7.css)
* A few tweaks to Wine and Wuthering, to accomodate for the menu rewrite mostly, but also keep up with some other changes I made recently, and remove tweaks that were no longer in use. I don't always test these, maybe I should... (Wine/extra.css, Wuthering/extra.css)
3134
Features / Re: New revs
« on April 26th, 2013, 11:08 AM »
rev 2076 -- had these optimizations around for some time, figured it'd be okay to commit them...
(4 files +32 image manipulations, 58kb)
! New thoughts could be empty, which is wrong. This is due to the latest rewrites, in which I added the ability to delete one's existing thoughts by editing them to nothingness, rather than using the Delete button. (Ajax.php)
* Optimized some image file sizes. Some of them were integrated into the CSS files, saving close to 200 bytes. Others aren't integrated, but that shouldn't excuse some of the (sometimes already optimized) files from being 100 to 300 bytes larger than they could be. Also of note, warning_mute doesn't seem to be used anywhere, but I'm not removing it because it might be hidden in some variable like $context['warning_status'].gif or something. I'll leave it up to Pete. (16 files in the attic, 16 in /images, including board status icons, warning icons, and Wedge footer logos.)
* I'm not convinced that warning icons should be integrated into the CSS. The only 'visible' difference between integrated and non-integrated is the extra HTTP hit, and I'm not sure warnings are a feature that is supposed to seen on every page... Is it? So I'm adding the no-base64 keyword to them, but it can always be reverted. (index.member.css)
* Admin intro could use some extra margin, I think. (mana.css)
* Translation. Eh... Sounds like a cool new feature for Wedge... ;) (ManagePosts.french.php)
(4 files +32 image manipulations, 58kb)
! New thoughts could be empty, which is wrong. This is due to the latest rewrites, in which I added the ability to delete one's existing thoughts by editing them to nothingness, rather than using the Delete button. (Ajax.php)
* Optimized some image file sizes. Some of them were integrated into the CSS files, saving close to 200 bytes. Others aren't integrated, but that shouldn't excuse some of the (sometimes already optimized) files from being 100 to 300 bytes larger than they could be. Also of note, warning_mute doesn't seem to be used anywhere, but I'm not removing it because it might be hidden in some variable like $context['warning_status'].gif or something. I'll leave it up to Pete. (16 files in the attic, 16 in /images, including board status icons, warning icons, and Wedge footer logos.)
* I'm not convinced that warning icons should be integrated into the CSS. The only 'visible' difference between integrated and non-integrated is the extra HTTP hit, and I'm not sure warnings are a feature that is supposed to seen on every page... Is it? So I'm adding the no-base64 keyword to them, but it can always be reverted. (index.member.css)
* Admin intro could use some extra margin, I think. (mana.css)
* Translation. Eh... Sounds like a cool new feature for Wedge... ;) (ManagePosts.french.php)
3135
Archived fixes / Re: 'Thoughts' Bug
« on April 26th, 2013, 09:46 AM »
Sorry! This is due to my recent rewrites, indeed... Something I forgot to document in the changelog: Wedge now allows you to delete a thought by editing it to an empty thought, which some might find more 'natural' than finding a Delete button, and I'm all for simplifying everyone's lives. However, I forgot to add a protection against empty thoughts, when actually sending a new thought... ;)
Fixed here, will be in my next commit too, obviously.
Fixed here, will be in my next commit too, obviously.