Four Lazy WordPress Plugin Desires [en]

[fr] Quatre idées de plugins WordPress que j'utiliserais s'ils existaient.

Dear Lazyweb,

Here are a few WordPress plugins I’d love to use, if they existed.

  • hreflang: I’ve come to love the visual editor in WordPress (after years of hating it with a passion). The only thing I regret is that if I want to add hreflang attributes to my links, I have to go over and edit them in HTML. So I don’t do it. The little pop-up to add a URL has fields for title, target (blergh!) and class, so it shouldn’t be too hard to write a plugin that adds an hreflang field, should it?
  • unpaginate: I’ve always had mixed feelings about pagination. On the blog home page, it’s great, as it allows you to simply “read more”. On very long pages, it’s also good, because it allows you to not have to wait a whole year for the page to load. But often, if I’m on a monthly or category archive page, I’d like to be able to load all the posts belonging to that month or category so I can do a quick text search on it for something I’m looking for. What would be lovely would be a plugin that adds an “unpaginate” link at the bottom of the page (near “previous”). Upon clicking that link, the reader would be taken to an “all the posts” page with no pagination. This could be an option of the next plugin I’m going to describe.
  • post lists: I like it when blogs display full posts on their pages, but I know that in some cases it’s more practical to see a list of titles with excerpts, or even just a list of titles. This plugin would make WordPress generate list and excerpt pages for any existing URL in the system: 2009/12/list/ or tags/twitter/excerpt or category/writing/partial. These pages should not be paginated, I think (so the unpaginate plugin described above could be an option for this plugin, as the code to do it should already be included). Maybe a little admin panel to set the URL schemes and activate various options would be cool.
  • Tagul tag cloud: simple one! Give all the tags of the blog to Tagul to eat, and display the pretty tag cloud on the tags/ page. Bonus for tag clouds by month, category, and… tag.

That should keep you busy if you were looking for a little WordPress plugin coding project! Am happy to give more precise information if some kind soul is willing to give one of these a try. Fame and fortune (well, maybe not fortune) await you!

Mots de passe: moins de naïveté! [fr]

[en] I write a weekly column for Les Quotidiennes, which I republish here on CTTS for safekeeping.

Chroniques du monde connecté: cet article a été initialement publié dans Les Quotidiennes (voir l’original).

Je suis régulièrement sidérée de la naïveté avec laquelle le grand public internautique traite ses mots de passe. Alors qu’on se pose des grandes questions sur la disparition de la vie privée puisqu’on est de plus en plus présents en ligne, on fait preuve d’une légèreté effrayante avec l’outil même qui permet de gérer la confidentialité de nos données.

Je vois deux raisons principales à cela:

  • une méconnaissance des risques
  • les instructions pour “faire bien” que nous donnes informaticiens et autres professionnels de la sécurité qui sont, disons-le franchement, quasi-impossibles à respecter tant elles sont exigeantes.

A proscrire:

  • utiliser le même mot de passe partout
  • donner son mot de passe à autrui
  • utiliser comme mot de passe le nom du chien, un mot du dictionnaire, son signe astrologique…
  • entrer son mot de passe ailleurs que sur le site pour lequel il a été prévu (par exemple, quand Facebook vous demande votre mot de passe Gmail… non, non!)

J’en vois déjà qui pâlissent. Ne vous inquiétez pas, j’ai l’habitude de voir pâlir ainsi mes clients.

Mais pourquoi diable faut-il faire si attention? Craquer un mot de passe qui est un mot du dictionnaire, ça prend très peu de temps. Un petit programme qui tourne, et hop, le tour est joué, on est dedans. Une fois que quelqu’un a accès à votre compte, il peut changer le mot de passe pour vous empêcher d’y accéder, et se faire passer pour vous. Imaginez! Quelqu’un d’autre aux commandes de votre e-mail, de votre compte Facebook, de votre Twitter, de votre blog, de votre compte PayPal… Ouille!

Allons droit au but, j’ai quelques conseils pour vous:

  • définissez trois (quatre, en fait) niveaux de sécurité pour vos divers comptes en ligne: finances (PayPal, Amazon, iTunes, banques), identité (blog, serveur, Twitter, Facebook), autres services — et dans un groupe à part, votre e-mail
  • blindez le mot de passe que vous utilisez pour votre e-mail: si quelqu’un rentre dans votre e-mail, il peut changer les mots de passe de tous les services que vous utilisez — le compte e-mail est donc le maillon faible
  • assurez-vous que vous avez des mots de passe solides pour le groupe “finances” et “identité” (au minimum un mot de passe distinct pour ces deux groupes, et différent de l’e-mail)
  • pour les “autres services”, bricolez-vous un algorithme avec un mot de passe de base que vous faites varier en fonction du nom du service (si l’un d’entre eux a des fuites, cela ne compromettra du coup pas tous les autres)
  • en plus des lettres, utilisez majuscules/minuscules, ponctuation, et chiffres dans vos mots de passe (autant que possible!)
  • une méthode pratique: prenez un long mot, et insérez au milieu de celui-ci des chiffres et signes de ponctuation (exemple — à ne pas utiliser! — biblio38!theque)
  • une autre méthode pratique: choisissez une phrase dont vous gardez la première lettre de chaque mot, ainsi que les signes de ponctuation (exemple à ne pas utiliser non plus: J’ai maintenant 3 chats et je vis en Suisse. => J’am3cejveS.)

Allez, au travail! Allez changer au moins les plus importants de vos mots de passe.

WPtouch iPhone Plugin Now on CTTS [en]

[fr] Le plugin WPtouch iPhone permet maintenant aux lecteurs de CTTS munis d'un iPhone de voir une mise en page adaptée à leur petit écran. Profitez!

Some time back I noticed that sites on WordPress.com were sporting a fancy iPhone-compatible theme, like this one:

Xavier put me on the scent of the WPtouch iPhone plugin, which I have just installed on CTTS — should make getting your daily (hrmm… almost) dose on your favorite phone a more pleasant experience!

WordPress Mobile Edition is another plugin which lets you customize your mobile theme more finely.

I Hate FTP [en]

[fr] Je hais le FTP. Donnez-moi un accès SSH et screen sur le serveur, et me voilà heureuse.

Ever since I discovered the magical combination of SSH + screen, I have come to loathe FTP. Although some of you will cringe at the idea, I like working directly on the server. No stray copies lying around, dated I-don’t-know-what. No chance of mistakenly overwriting your last set of changes.

Screen is a terminal multiplexer (just learned the term). What you do, basically, is climb inside it when you’re on the server, and do everything from there. The advantage is that:

  • when you disconnect your SSH connection, screen keeps running, so your workspace is how you left it next time you come in
  • you can have multiple “screens” (ie, terminal windows) you can easily switch around, so you can have your IRC channel running in one screen, be editing a file in another, etc. (basically, multi-tasking like you would do with windows in a graphical environment).

I learnt shell commands as I went along. Those I use the most are:

  • wget http://wordpress.org/latest.zip to download (instantly!) the latest version of WordPress directly on the server
  • unzip latest.zip to unzip it, still directly on the server
  • mv wp old-200910 to archive an old installation of wordpress (or move other files around)
  • cp -Rf plugins/* ../../wordpress/wp-content/plugins/ to copy all my plugins to the freshly unzipped install of WordPress
  • nano wp-config-sample.php to add my settings to the file and save it as wp-config.php

These are just a few examples. Once you know these commands and have them at the tip of your fingers, how fast you work is only limited by how fast you can type them. And you’re doing things directly on the web server. You’re not stuck looking at the “real world” (= the server) through the imperfect lens of an FTP client, waiting for uploads to happen (or downloads), paying attention not to overwrite stuff, having everything ready on your computer before pressing the magic button and hoping everything will be all right, because otherwise you’re in for another bout of download, edit, upload…

Some of my clients have WordPress installations on servers with no shell access. Obviously, I don’t have as much practice doing things the FTP way, but I swear it takes me 5 times as much time to do things with no SSH access. When you know how to use it, the command-line is wickedly fast.

The only situation where I actually do like FTP is when I’m using CSSEdit, because coupled to an FTP client, I can be editing my CSS file with the added power of the programme on my Mac, and have it upload and update the file on the server each time I hit save. Because yes, it’s nicer to write CSS in CSSEdit than in nano.

But for managing files and moving them around and minor edits… I’m much happier sitting on my server inside my screen.

WPML to Make Your WordPress Site Multilingual [en]

[fr] A tester absolument si vous devez mettre en place un site multilingue: le plugin WPML pour WordPress.

I’ve been wanting to play with the WPML WordPress plugin for a while now, and I finally took the plunge today and updated my professional site to the latest version of WordPress, as well as WPML. (Sadly, the content still needs a major overhaul.)

Until now, I had built it using two separate WordPress installations, one in English, one in French, linked together by my quick-and-dirty plugin Bunny’s Language Linker (which, in the light of today’s experiment, I will be retiring from rather inactive development — Basic Bilingual remains, though, and still very much makes sense).

Here’s a summary of what I did:

  • backed up my database
  • upgraded both WordPress blogs to the latest version and exported their content
  • removed the automatic language redirection based on browser language preferences to make sure it wouldn’t interfere (I want to find a way to insert it back in, help appreciated)
  • added and activated the WPML plugin on the English installation
  • went through the settings after activating advanced mode
  • translated widget text and site tagline
  • manually imported content from the French site (import failed due to PHP on my server not being compiled with ctype_digit()), but it was only a dozen pages — it’s easy to specify language and of which English page a new one is a translation of, if any)

Setting up WPML

I did encounter some grief:

  • when selecting the “different languages in directories” I kept getting an error message which didn’t make much sense to me; tip: if that happens, make sure that your site and pages all work fine (in my case, I had to reset permalink structure because it had got lost somewhere on the way — even though the settings didn’t change)
  • I’m using a theme with an existing .mo file for French, so I selected that option (to figure out what the textdomain is, look through a theme file to see what the second argument to the gettext calls is — they look like __("Text here", "text domain here")) but it seems that all the strings for my theme still appear in the “string translation” pane
  • initially the strings for my widgets and site tagline weren’t appearing in the “string translation” pane — you have to click the “Save options and rescan strings” button for that, even if you haven’t changed any settings (that was not exactly obvious to me)

Here’s what I still need to fix:

  • the rewrite rules are set to hide the “language directory” part of the URL when browsing the site in the default language — I want to change this as explained in this forum post
  • reimplement automatic language detection
  • set up a custom language switcher that looks more like “Français | English” somewhere at the top right of the page

And honestly, once that is settle, WPML is as close as it gets to my dream multilingual plugin for WordPress!

Basic Bilingual 0.4 [en]

[fr] Mon plugin bilingue vient enfin d'être mis à jour: version 0.4 à disposition, par les bons soins de Luca!

Another long-overdue update of my Basic Bilingual plugin (which, as you can see by following the link, now has its own page here, in addition to the page in the WordPress plugin repository).

Luca Palli e-mailed me a few months ago saying he had upgraded the admin code to make it compatible with WordPress 2.8. I’m happy to let you know that you can now drag the language and other excerpt fields to more convenient places in your post and page editing screens.

Basic Bilingual with new editing screen, thanks Luca!

Luca also added an options screen, and I have hope that I (or somebody) will at some point manage to write the code to set the languages through the options screen rather than by editing the plugin, as we have to do now (it’s pretty simple editing, though).

So, thanks a lot, Luca.

Thanks too to the “how to use Subversion” page on the WordPress extend site, as it saved my life once again. I update my plugins so infrequently that I completely forget how to use svn in between.

As always, back up your data regularly, and if you bump into any problems, let me know. If you want to contribute code, as you can see, you’re more than welcome!

Google Forms: Multiple Choice, List, Checkbox [en]

[fr] Attention: dans Google Forms, "multiple choice" n'est en fait pas un choix multiple. Il faut utiliser "checkbox" pour ça.

Like I did last year, I’m currently preparing the blogger accreditation request form for the LeWeb’09 conference in Paris (if you’re not a blogger and want to come, be sure to grab a very early bird ticket before the end of September — if you’re a student, get in touch with Géraldine). We’ll by the way shortly be letting you know which dates the form will be open for you to request an accreditation.

This is not the purpose of this post, however. I was a bit mystified by the difference between the “multiple choice”, “list”, and “checkbox” elements one can use to build a form using Google Forms, so I decided to build a quick test case to see how things worked. Brace yourself for a surprise (the test form is below, with explanations):

Loading…

Summary?

  • list is your normal “one choice only” drop-down list, no surprise here
  • checkbox is your real multiple choice list, with optional “other” choice which can be filled in manually
  • multiple choice is very poorly named, and is in fact a radio button “one choice only” list, but which allows an extra “other” choice which can be filled in manually

In all cases, multiple values are stored in a single spreadsheet cell as a comma-separated list. View the resulting spreadsheet.

I hope this will save somebody the trouble of working it all out themselves like I had to do!

Today is Backup Awareness Day! [en]

Two months ago, on February 24th, I hit the wrong “Drop” button in PhpMyAdmin, resulting in the immediate deletion of the blog you’re reading. I didn’t know when I had last backed it up.

The story ends well, though it cost me (and others) many hours (days, actually) of work to get the whole of Climb to the Stars back online again.

I’ve always been careless about backups. Like many of you, probably. We can afford to be careless because accidents don’t happen very often, and as with Black Swans, we are under the mistaken belief that having been safe in the past will keep us safe in the future. Not so. As I like to repeat, the first time a disaster happens, well, it had never happened till then.

So, I’ve decided to declare the 24th of each month “Backup Awareness Day”. Here’s what it’s about:

  • Back up your files.
  • Back up your website.
  • Blog about the importance of backing up (sharing tips, stories, advice).
  • Tell your friends to back up.
  • Help your friends back up.
  • Put in place automatic backup systems.

Bottom-line: decrease the number of people who never back up, or back up so infrequently they’ll be in a real mess if things go wrong.

Now, perfectionism is the biggest enemy to getting things done. Backup Awareness Day does not mean that you have to do all this. Here are a few ideas to get your started (better a bad backup than no backup at all):

  • If Time Machine (or any other regular backup system you use for your computer) has been telling you it hasn’t done a backup in ages, stop what you’re doing right now and plug it in.
  • If you use WordPress, when was the last time you went to Tools > Export to make a quick backup? It’s not the best way to do it, but in my case, it saved CTTS.
  • Do you use something like Mozy to have a remote backup of your most important files? Time to sign up, maybe.
  • Are you working on important documents that exist only on your computer, which is never backed up? At the minimum, pick up a thumb drive and copy them onto it — or send yourself an e-mail with the files as attachment, if your e-mail is stored outside your computer (Gmail, for example).
  • Do you have an automatic backup set up for your database or website? Set some time aside on Backup Awareness Day to figure out cron.
  • When did you make the last dump of your MySQL database? Head over to PhpMyAdmin, or the command line (it’s mysqldump --opt -u user -p databasename > my-dirty-backup.sql)
  • Do you have the backup thing all figured out? Write a post for your readers with a few tips or tutorials to help them along. (Tag your posts “backupawarenessday” — I thought about “BAD” but that wasn’t really optimal ;-))

I’m hoping to develop the concept more over the coming months. If you have ideas, get in touch, and take note of Backup Awareness Day for the month of May: Sunday 24th!

(Now stop reading and go do a few backups.)