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!

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.

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!

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.)

PJW Blogminder Plugin for WordPress [en]

[fr] J'en rêvais, on m'a prise au mot: un plugin qui vous envoie une alerte si vous n'avez pas publié quoi que ce soit sur votre blog depuis x jours (entre un et sept jours). Histoire d'éviter que la semaine entière passe sans s'en rendre compte!

A few days, ago, I was dreaming out loud on Twitter about a plugin which would let me know when I hadn’t published anything on my blog after a certain number of days. I guess that, once again, I’d reached the end of a week and realised that I had not written a single thing on CTTS.

Well, my wish was heard, and Peter Westwood has just released the PJW Blogminder plugin. The plugin adds a simple option to your profile page, where you can request a reminder if you haven’t published anything in the last few days (set the number of days between one and seven).

Blogminder screenshot

Nice!

(Now I just need to get my server to send mail… ahem.)

WordPress on my iPhone [en]

Wow, just checking out the new WordPress iPhone app. It now allows comment moderation management, post and page editing, as well as saving non-local drafts. I’m going to start using it regularly… Though maybe not for writing my usual unending posts for CTTS!

Progress in Restoring CTTS [en]

[fr] Voilà, après la destruction involontaire de mon blog il y a une dizaine de jours, j'ai pu remettre en ligne tous les articles écrits avant le 25 octobre. Le reste suivra en cours de semaine.

After the big blogging disaster, I had a pretty busy week (it was a bad one too, but let’s not dwell on that).

I have now restored all posts and content published before October 25, the last post being about Qwitting Qwitter (remember that one?). Pages are back too, and I’ve put a Pages widget here in the right column so you can access them.

The rest of the content will follow, on Tuesday, normally. With comments.

One side-effect of the import is that I have also “recovered” (haha!) all the duplicate comments that the Disqus plugin inserted in my database. I removed them sometime in January, and this time, unfortunately, removal will not be so simple: the “DISQUS” comment agent I used to identify them got lost in the export-import process.

Ah, and it looks like my categories are an even bigger mess than before: most of them seem duplicated. Maybe it’s time to cut my losses, convert them all the tags, and wipe the slate clean.

Disqus Plugin Aftermath: Removing Duplicate Comments [en]

[fr] Comment se débarrasser de 5000 commentaires à double dans sa base de données WordPress!

Now that Disqus integrates Friendfeed comments, I could be tempted to give it another try, if I hadn’t spent an hour yesterday cleaning up my database because of an earlier attempt to use Disqus on this blog. After the story, how I did it — in case you’re in the same mess and could use the help.

Back in August, I installed the Disqus plugin for WordPress. Things started off not too badly, though I was a bit concerned that the plugin seemed to have duplicated all the comments in my database. It didn’t seem to show up on the blog though, so I didn’t worry too much.

After a few months, I was a bit frustrated with Disqus and the plugin (which was clearly an older version than the Disqus plugin available now). Moderating comments through the WordPress interface seemed to work erraticly, and some spam just wouldn’t accept to stay in the spambox. I never really tried to identify the exact problems too closely, I have to admit, but things were not really working how I expected them to.

Then a few (unrelated) people told me they had completely failed to comment on my blog with the new system. At some point, I got fed up and uninstalled it. Unfortunately, the duplicate comments which had been hidden from view remained there after uninstalling the plugin, so all the old comments appeared on the blog twice. I let the problem sit for a long time before attempting to fix it — wild hope there might be a ready-made script out there I could just run& in vain.

Here’s how I tackled the problem this week-end and ended up removing the duplicate comments without too much trouble, through PhpMyAdmin (PMA for short).

  • In PMA, I made sure that duplication seemed constant — it was
  • I discovered that the duplicate comments had “DISQUS” in the user-agent field
  • I dug around until I identified the last duplicate comment (when I installed the Disqus plugin, actually; I sorted the database comments table by comment date to do that)
  • I did a search, selecting comments which were younger than the last duplicate comment date AND had “DISQUS” in the user-agent field (the date bit is important, because comments posted while the plugin were active have “DISQUS” in the user-agent field but are not duplicates)
  • Then, I deleted everything that came up in the search — about 5000 comments (it helps to tell PMA to display 3000 lines per page when doing that :-))

Hope this can help somebody, and remember: always back up your database first!