The last few weeks were spent hunched over new designs and features we wanted to introduce in the near future, hopefully in time for Christmas. As a result, not much actual development was done despite many suggestions from our respected users.
However, over the last week or so we have managed to get a few new features in:
* Like it - a feature that allows users to indicate photos or videos that they like; in future we will also allow filtering based on this rating so that you can make muvees with only the best material ;-)
* Date changer - manually update the date at which a photo or video was taken from the view mode; in future we also want to offer our users a batch update mode to change the date of more than photo or video at a time.
* Facebook updates - the Facebook Connect feature looks nicer now ;-)
In the meantime we've also fixed a few bugs here and there, such as Windows Live and Gmail contacts import.
Another update will be scheduled in a few weeks, hopefully with more changes! And keep that feedback coming ;-)
Wednesday, October 28, 2009
Tuesday, October 27, 2009
IE6: we don't like you no more
IE6 is really a developer nightmare: a large part of the time we spend building shwup, is used to address cross-browser issues, with IE6 taking the largest chunk of time.
IE6 really is old technology. IE8 is now released, and there is a plethora of other modern browsers out there, such as Firefox 3.5, Safari, Opera, etc.
For that reason, we will officially be dropping support for IE6, from January 2010. IE6 users (if we still have any by then) will probably be greeted with a message inviting them to upgrade their browser to access shwup.com .
IE6 really is old technology. IE8 is now released, and there is a plethora of other modern browsers out there, such as Firefox 3.5, Safari, Opera, etc.
For that reason, we will officially be dropping support for IE6, from January 2010. IE6 users (if we still have any by then) will probably be greeted with a message inviting them to upgrade their browser to access shwup.com .
Monday, May 25, 2009
Authorization header passing in Apache/FastCGI
When PHP is running as an Apache module, any Authorization header is passed as HTTP_AUTHORIZATION inside $_SERVER; this, unfortunately, stops working when you switch to FastCGI.
The guys over at Best Host Ratings have a simple solution using mod_rewrite:
#Remove this part if you always have this module loaded
<Ifmodule !mod_rewrite.c>
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
You can put this piece of configuration in your virtual host definitions or closer to where you really need it.
Thursday, May 21, 2009
Paypal IPN issues with Unicode
I've spent several hours today trying to figure out why I couldn't verify the IPN data I was receiving from Paypal.
The code itself couldn't be easier:
The code itself couldn't be easier:
After reading Jacques' article regarding this issue, the source of my problems was easily found. As it turned out, the "Language Encoding" inside our profile page was miraculously set to "Chinese Simplified"; changing this to UTF-8 made the problem go away immediately.return 'VERIFIED'==file_get_contents(
'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate',
false,
stream_context_create(array(
'http'=>array(
'method'=>'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => file_get_contents('php://input'),
)
))
);
Thursday, May 14, 2009
Splitting a jquery object into 2
In shwup, using jquery, we had to handle a few times situations where we need to apply some actions on some elements, and other actions to all other elements. Typically, you'd do it with a filter, and then the same filter in a not(). For example:
The duplication of the filter is very annoying. Here is a nice jQuery plugin that we are using, discovered last year on the jQuery mailing list in a post by Oliver:
Now we can do:
And that works regardless of the filter function used, including is() and not().
I recently had to implement shifting some elements of a jquery set ahead of all other elements. This is using a set of floating nodes, not attached to the DOM _yet_. Using the nice 'others' plugin, here is some code to do that:
myJquery
.filter(".important").css('background', 'red')
.not(".important").css('background', 'yellow');
The duplication of the filter is very annoying. Here is a nice jQuery plugin that we are using, discovered last year on the jQuery mailing list in a post by Oliver:
$.fn.others = function() {
return this.end().not(this);
};
Now we can do:
myJquery
.filter(".important").css('background', 'red')
.others().css('background', 'yellow')
And that works regardless of the filter function used, including is() and not().
I recently had to implement shifting some elements of a jquery set ahead of all other elements. This is using a set of floating nodes, not attached to the DOM _yet_. Using the nice 'others' plugin, here is some code to do that:
var importants = myJquery.filter(".important");
myJquery = importants.add(importants.others());
Line continuation in JavaScript
Due to the nature of the language parser in JavaScript, strings cannot span multiple lines by just starting with a quote (or double quote) and ending with another, like:
var s = "helloBesides the normal ways around this (closing the string, appending a plus, opening the string), here's my recent favourite:
world";
var s = "hello \The use of backslash is not standard compliant, though the following browsers definitely support it:
world";
- IE6/7
- Google Chrome/Safari
- Opera
- Firefox 3
Tuesday, May 12, 2009
Fixing IE6 cache issues
At the brink of our next release, we came across an interesting article regarding IE6 fixes that deal with image caching issues.
More specifically, CSS background images in IE6 have the tendency to load, load again and maybe load one more time for good measure. On some of our pages this means dozens of requests for the dozens of images that are contained within. Debugging such pages in IE6 would take forever, and with our QA engineer temporarily cut off from her steady coffee supply ... well, you get the picture.
Apparently this topic is well documented, which makes this post a bit shameful for not having found these articles before ;-)
On the blog of Mister Pixel you can see how this fix utilizes a fairly unknown call inside IE:
Adding this command to the window load event makes IE6 load pages a lot faster and makes our servers happier ;-)
More specifically, CSS background images in IE6 have the tendency to load, load again and maybe load one more time for good measure. On some of our pages this means dozens of requests for the dozens of images that are contained within. Debugging such pages in IE6 would take forever, and with our QA engineer temporarily cut off from her steady coffee supply ... well, you get the picture.
Apparently this topic is well documented, which makes this post a bit shameful for not having found these articles before ;-)
On the blog of Mister Pixel you can see how this fix utilizes a fairly unknown call inside IE:
document.ExecCommand("BackgroundImageCache", false, true)
Adding this command to the window load event makes IE6 load pages a lot faster and makes our servers happier ;-)
Subscribe to:
Posts (Atom)