Create a multilingual Facebook Welcome page

June 13, 2011 by Remi G. - 1 Comment

EDIT: This just doesn’t work due to Facebook proxy making language to be en_US all the time. Please read “Multilingual Facebook Welcome page based on user language” instead


Today, i’ve created the Facebook page of a new online service i’m working on. It could sounds a bit early since it’s not gonna be released before a few months but i want to share with people how it evolves, ask feedback, get momentum asap. Will see how it work…

So to be the more attractive as possible, i need a sexy Welcome tab, with a like-button call to action. Not a big deal, i just type “coca” in searchbox and make a screenshot of their welcome page. Now i have the good width of window to optimize mine.

It’s a service dedicated to find bike rental station in my hometown (which you can already find in Paris as “Vélib“). Lille is located between Paris (55min by train), Brussels in Belgium (35min by train) & London (1h20min by train via EuroTunnel). It’s also a massive studient area with a lot of exchanges from all around the world. EuraTechnologies, a huge startup incubator, has a partnership with Stanford for more than a year.

So it’s pretty clear that this service must be in both french and english, same for its FB fanpage welcome page. The problem is: i can only enter FBML or HTML. Since FBML is deprecated, all i have is HTML. No javascript allowed. No prob, let’s just use a big image file but how to detect user language?

Here is how i did this: Using a PHP script as an image ressource. First, link image to your script:

Then, just use a simple PHP script to detect browser language so it can choose which image ressource to load:

<?php
$lg = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$lg = strtolower(substr(chop($lg[0]),0,2));
$lg = ($lg=='fr')?'fr':'en'; // only to provide a 'en' fallback for non french.

$f = file_get_contents('facebook-welcome_'.$lg.'.jpg');
header("Content-type: image/jpeg");
echo $f;
?>

nb: of course, you need to put a ‘facebook-welcome_fr.jpg’ & ‘facebook-welcome_en.jpg’ in the same directory…

Here is the final result:

Live demo on fanpage itself: VLille-map on Facebook

Have fun!

McDonald’s Interactive Billboard Pick n Play

June 9, 2011 by Remi G. - 0 comments

McDonald’s Sweden has put an interactive billboard in Stureplan, the main public square of Stockholm. Called “Pick n Play”, concept was dead simple: during a week & by completing a pong-like game in 30 seconds, users win coupons for free food in the nearest Mcdonald’s restaurant (7th to 14th of may)

Big news here: you just play right from your mobile web browser, no app to download!

http://picknplay.se/
(the webapp detects your geolocation so you can only play while nearby)

No technical information available, but even if the video shows people using iPhones, it clearly talks about “smartphones” so perhaps Android & Blackberry OS6 were supported too.

Thumb up to McDonald’s & DDB Sweden!

a plain javascript datepicker

June 7, 2011 by Remi G. - 0 comments

I’ve been looking for a good and simple to implement javascript datepicker lately. It’s always easier to choose a date using a calendar than using day, month & year select elements. And being quick & easy is always important, specially in a full of forms CMS dashboard.

And thanks JQuery or consors, you now first have to choose which javascript framework you want to use, then search for the best snippet to fill your needs in some random libraries of code. Don’t get me wrong, it’s not that bad, but why would i have to load a framework in memory just for a little date picker?!

Continue Reading →

Doom, now in HTML5

June 2, 2011 by Remi G. - 0 comments

What a better birthday present Mozilla could make to a geek like me than this: DOOM, now in HTML5.

It seems Mozilla has optimized medias (or code) for Firefox 4 since i get no sounds on Safari but WOW !! It’s fully works (even IDDQD & IDKFA) and runs like a charm (sorry touchscreen devices owners, a proper keyboard is needed to loose your daily productivity here).

Give it a try!

This could sounds just like a small geeky demo (like the Google Quake2 port) but as the computer ecosystem is pushing more and more a cloud-based way, HTML5 games could be a real game changer for this industry in the next years (ChromeOS anyone?!)

LaPoste est opérateur mobile: ne riez pas trop vite…

May 21, 2011 by Remi G. - 0 comments

La Poste devient opérateur mobile

C’est ce lundi que devrait être annoncé l’offre “La Poste Mobile”.

En effet, les 300 000 abonnés Simplicime (aka Simpleo) ont reçu le message suivant: « Le 23 mai prochain, Simplicime deviendra La Poste Mobile. »; Ce n’est donc pas un nouvel opérateur mais la reprise d’un opérateur virtuel existant. Simplicime appartenait à Debitel, filiale de SFR.

Petit tour d’horizon de ce qui au premier coup d’oeil fait sourire, mais pourrait bien changer le paysage mobile français.

Continue Reading →