Arghl! Du spam par SMS! On fait quoi? [fr]

Il y a quelques minutes, la sonnerie de mon portable m’informe qu’un nouveau SMS m’attend. J’avoue que c’est assez fréquent, avec twitter surtout. Mais bon.

Je regarde mon SMS, toute curieuse, et… Un message m’invitant à obtenir des SMS gratuits ou que sais-je, depuis un numéro court.

Reviennent des souvenirs du temps où je bossais chez Orange: des histoires de numéros courts qui se comportaient mal, de clients spammés…

J’appelle Orange, service clientèle. Je demande à qui appartient le numéro court, ils me donnent le nom de l’entreprise et le numéro de leur service clientèle.

J’appelle, j’explique (poliment!) que je viens de recevoir un SMS du numéro court xyz, et que j’aimerais savoir comment ils ont eu mon numéro de téléphone. La gentille dame au bout du fil me demande mon numéro, fait quelques recherches, et m’informe qu’en 2006 j’ai envoyé un SMS contenant la lettre “b” au numéro zxy, et que j’ai reçu en retour un SMS en anglais disant ceci et cela. Et bien sûr, elle a spontanément dit qu’elle allait faire stopper les SMS publicitaires.

Nickel!

Je récapitule:

  • prendre note du numéro court en question
  • appeler son opérateur pour demander leur numéro de contact
  • appeler le numéro de contact associé au numéro court et demander comment ils ont eu notre numéro (si ça nous intéresse)
  • demander l’arrêt des SMS.

Badges at Conferences [en]

Laurent Haug blogs about conference badges and his desire to make LIFT a badge-free conference.

Funny, I was also thinking of badges at LeWeb3. But actually, the main thing I was thinking was: when are conference organisers going to stop making one-sided badges dangling at the end of a thingy that is designed to let them rotate freely?

I personally like badges and would be quite unhappy without them, because I’m a very bad physionomist. I index “person data” by name. Dozens of times at conferences, people come up to me saying “hey, Steph, how’ve you been?” — sometimes their face looks familiar, others it doesn’t even ring a bell. Half the time, I’m saved by the badge. I catch a glimpse of their name, and all I know about them, our shared history if we have one, comes back to me. I index people by name.

So, take away the badges, and I have to use the awkward “excuse me, before we say anything more, would you mind telling me your name, because I’m so bad with faces?” — I do it (I’m not one of these people who can pretend very well), but I really prefer the badges. I’m one of these rude people who’ll turn your badge around to read your name — but the presence of the badge makes it easier, because it suggests that we’re going around reading people’s names.

Also, I know a lot of people online without knowing their faces, and badges do help with that.

There are things I do not like about badges, though. I’d like to highlight two of the “cons” Laurent points to, because I agree with him:

  • Chest navigators. People who walk through the conference starring at badges looking for keywords like “CEO”, “Facebook” or “Press”, usually for bad reasons. You end up losing your time with these 95% of the time.
  • Misconceptions from titles. This is especially painful for people working for big companies where you HAVE to have a lousy and arrogant title. From a really cool dude I met at Leweb working for Microsoft: “People see Microsoft on my badge, so their crap filter goes up one level. Then they see Marketing and they start to draw strategies to get away from me”. The guy is brilliant, open, helpful, all the opposite of the stereotype that his badge could push you into.

Laurent Haug, “Badges”

I would definitely go for the following:

  • get rid of “castes” on badges
  • get rid of formal company names or job titles: let people choose what they want written on their badge
  • print them on both sides!
  • look for creating solutions like headwear — or maybe stranglers?! — to get badges off people’s chests
  • absolutely avoid pin-on or sticky badges (as a woman, I have to say I really don’t like putting them smack on my breasts, I’d rather have something hanging around my neck)

Some thoughts in the “Devil’s advocate” department, though:

  • there are situations where it is useful to know what company the person you’re talking to works for, or what position they have
  • badges printed on only one side are handy: write something on the back, stick business cards in, or the programme of the day
  • no badges adds serendipity to networking, which is good.

Feel free to share your badge thoughts and experiences.

Announcing Going Solo [en]

[fr] J'ai annoncé il y a quelques semaines que j'avais des projets de création d'entreprise: c'est en route, et nous préparons pour début mai une conférence-événement (une journée de conférences) à l'attention des indépendants du web. En dehors de savoir faire des trucs cools, être indépendant (ou une TPE) pose un tas de problèmes "accessoires": comment fixer les tarifs? approcher les clients, ou mieux, les aider à nous trouver? s'en sortir avec l'administratif? trouver un équilibre de vie entre travail et loisirs, surtout si l'on a fait de sa passion son métier?

Après avoir pensé à Berlin, Paris, et Londres -- nous visons un public européen -- nous avons finalement opté pour Lausanne. A deux pas de l'aéroport de Genève, très joli cadre, et aussi, pratique pour les organisatrices principales, toutes lausannoises.

Je vous parlerai de tout ceci plus longuement dans les jours à venir!

So, here we go. As I mentioned in my last post, things are shaping up enough for me to start talking about them, even though a lot is still “floating”.

I’m taking the plunge into the event business. The first one I’m organising is Going Solo, a one-day conference in the beautiful and easily accessible city of Lausanne in Switzerland, which also happens to be my home town. It will take place early May.

Going Solo will fill a gap in the current conference offerings: it’s an event for freelancers of the web industry (soloists, hence the name) and very small businesses — from all over Europe.

Being a freelancer myself, I’ve come to realise quite a while ago that there is more to freelancing than “knowing cool stuff” and having people around willing to pay for it. How do you fix your prices? Close deals? Find clients, or better, help them find you? Collaborate with others, whether soloists themselves, or employees in a huge company? Deal with taxes, contracts, accounting, and all the rest of the boring administrative stuff? Achieve that delicate “work/life balance”, when you’re one of the lucky ones who turned a passion into a job?

Going Solo will address all these issues (and others), providing those attending with valuable insights and tools which will help them become better at what they are doing in the business world. (Sounds almost like a press release, doesn’t it? I’m practising for the sponsor offerings… shhh.)

In simple words: this is the kind of event I would have wanted to attend two years ago when I was struggling with the idea of becoming freelance. It’s the kind of event I would have liked to attend a year ago when things took off and I started realising how complicated all this “business” stuff was. And it’s also the kind of event I want to attend today, having faced the ups and downs of freelancing in the fast-moving world of new media, in the early stages of starting a company, and wondering what “holidays” means now that my everyday life is split between “hang out online”, “travel to foreign cities”, and “talk about exciting stuff with people”.

Where-when-what-how-why?

I’ll follow up later with a little insight into what’s going on. Be warned, though: you’re going to be following some thought processes here, and might be faced with decisions-in-the-making and not-sure-what-I’ll-do-yets. I welcome all feedback.

News from LeWeb3 [en]

[fr] Je suis à la conférence LeWeb3, et pour une fois, je ne suis pas en train de bloguer les sessions. Je suis ici pour une autre raison: entamer des discussions avec des sponsors potentiels pour la conférence-événement que j'organise début mai. Je vous dirai plus à ce sujet dans un futur billet, mais si vous me voyez au Web3, n'hésitez pas à venir me demander, je vous en parle volontiers!

This is going to be a quick and dirty posting. Lock up your sheep and warn Grandma.

The reason you haven’t seen much liveblogging from LeWeb3 is that I haven’t really been attending the sessions. To be honest, not many seemed that interesting to me (I’m aware, this year, that I’m not the target audience, so that’s OK with me). But aside from that, this is the first time I’m coming to an event with an explicit goal other than “watch interesting talks” and “catch up with friends and make new ones”.

Remember, some time back, when I told you I was starting a company? Well, things are starting to warm up and take shape. I’ll blog about it in more detail (probably on the train going back home this evening), of course, but here’s a tidbit for those of you I haven’t yet had a chance to speak about it directly.

LeWeb3 2007 marks the beginning of my discussions with companies interested in sponsoring the event that I will be holding early May. And so far, honestly, I’m really excited about how people have reacted (potential partners and attendees). But as I said, more details in a bit.

Back to LeWeb3: first of all, I’d like to say I wasn’t really planning on attending as I had been quite disappointed with last year, but following the nasty things I said about the event last year, Loïc kindly invited me to come and see for myself that he wasn’t going to do “les mêmes conneries” twice in a row (his words) ;-). So, thanks for the invite, and here are a few complaints and praises.

  • The wifi was flakey yesterday, though not as bad as last year. I had a bit of trouble logging on right now, but finally made it. – The food is delicious, as it was last year. I think a buffet for lunch is a really good idea.
  • I didn’t like the first rows being reserved for the press — it did eliminate any impulse I might have had to liveblog.
  • I like the venue. The lobby is arranged carefully, with enough small tables to fill in the empty space and encourage people to congregate.
  • Shuttle bus: great. Really.
  • Badges with information printed on one side only. Really. Stop doing that, conference organisers. Specially if the hangy-thing for the badge is meant to swirl around.
  • Good to have video of talks in the networking area. I can write this post and keep an eye on it so I don’t miss Doc Searls. (You don’t want to miss Doc. Or David.)

Don’t hesitate and come up to speak to me, specially if you’d like to sponsor my event (I’ll tell you all about it). I’m not suffering from conference overload and oversocialisation right now and quite happy to network and chat.

Blogs en entreprise, un peu en vrac [fr]

[en] A brief overview of important points to consider/keep in mind when thinking about blogs in a corporate setting. The two posts with my conference notes, How Blogging Brings Dialogue to Corporate Communications and Blogging in Internal Communications, roughly cover this.

Quel est l’essentiel à savoir lorsque l’on commence à s’intéresser aux blogs?

D’abord, que le blog est trois choses:

  • un outil (technologique) permettant de publier très facilement du contenu
  • une culture avec des usages, une histoire, une éthique
  • une stratégie de communication misant sur le dialogue, l’authenticité et la transparence

L’outil lui-même est relativement simple à mettre en place et est gratuit ou presque.

Apprendre à utiliser le blog pour publier des textes est aisé. C’est très similaire (côté processus et interface) à publier un e-mail. C’est entre autres pour cela que le blog est un outil aussi populaire et que “n’importe qui peut en avoir un”.

Pour une entreprise, il vaut la peine d’avoir une personne à l’interne qui soit capable de gérer le blog côté serveur: mises à jour, installation de plugins, adaptation du thème (gabarit) à la ligne graphique désirée, résolution de bugs dus à des changements de version (PHP, base de données) sur le serveur — ça peut arriver.

Maîtriser les fonctions plus complexes de l’outil de blog peut prendre plus de temps: catégories, tags, gestion des commentaires, insertion d’images ou de vidéo, mise en forme, liens, contenu annexe. La plupart des blogueurs devront avoir une partie au moins de ces compétences afin d’être réellement autonomes.

Utiliser un blog comme outil de communication n’est pas une chose naturelle dans le milieu des affaires. Le style d’écriture est différent de ce dont on a l’habitude (assez proche de l’e-mail) et revêt une grande importance. Etre exposé à la critique et aux questions difficiles est quelque chose dont nous protège de façon générale la communication unilatérale. Renoncer à la langue de bois ouvre parfois la porte à des situations difficiles à gérer.

Etre un bon blogueur requiert en fait des compétences relationnelles et humaines assez génériques et qui font souvent partie de la “personnalité” — ou du moins, qui ne sont pas enseignées de façon formelle. Le coaching sur la durée est le meilleur moyen d’apprendre à gérer ces situations dues à la nature conversationnelle du blog.

Installer l’outil et apprendre à l’utiliser, d’un point de vue technique, ce n’est donc que la pointe de l’iceberg. L’investissement financier est minime pour l’outil lui-même, mais il vaut la peine de mettre le paquet pour accompagner le/les blogueurs dans leur apprentissage de la culture propre à ce nouveau média, et de soutenir l’entreprise dans ses difficultés (inévitables) avec une stratégie de communication qui ne correspond probablement pas à ce qu’elle faisait jusque-là.

En cas de réticences budgétaire face au prix d’une accompagnement de qualité sur, disons, une durée de six mois — il est bon de (se) rappeler qu’on investit souvent sans sourciller des dizaines de milliers dans des solutions techniques ou du matériel. Pour un blog, point de cela: l’argent ainsi économisé doit absolument être consacré à la formation et au conseil stratégique par un spécialiste du média.

Le plus possible, on cherchera à faire bloguer des personnes provenant de l’entreprise elle-même. L’efficacité du blog consiste à mettre en relation de vraies personnes: les blogueurs, et les lecteurs, qui peuvent laisser des commentaires, ou vont peut-être publier des réactions sur leur propre blog. Les blogueurs deviennent vite la “vitrine” ou la “face humaine” de l’entreprise. Il est à mon avis très dommage de confier ce rôle à des personnes externes uniquement — il y a là une incompatibilité entre le rôle du blog, qui est de rapprocher, et le fait de confier ce travail à des externes, qui montre qu’on ne veut pas “se mouiller”.

Le blog lui-même, a priori, ne va pas rapporter d’argent. On fait de l’argent “à cause” du blog, non pas “avec”. Le blog apporte visibilité et crédibilité, d’une façon difficile à imiter avec une campagne de publicité ou de marketing “classique”, car elle est basée sur le dialogue et la relation. C’est en discutant avec les gens de notre entourage que nous changeons d’avis, et prenons des décisions. Internet, via les blogs, permet de démultiplier l’effet bouche-à-oreille de la conversation personnelle.

Ces thèses sont développées de façon plus générique dans l’ouvrage The Cluetrain Manifesto (à lire absolument): nos décisions d’achat sont basées sur les expériences de nos amis; personne n’aime qu’on lui “parle contre”, ce que fait habituellement la publicité; nous ne sommes plus dupes, nous savons que la publicité est mensongère. Sur internet, avec les blogs, les forums, les wikis, les réseaux sociaux, ces conversations qui existaient déjà bien avant l’ère d’internet acquièrent un pouvoir supplémentaire en étant sur la place publique numérique.

La communication ne peut pas être contrôlée. Les blogs permettent aujourd’hui à n’importe qui de se faire entendre, si ce qu’il raconte est jugé assez important par ses pairs. On ne peut pas “taire” les gens à coups de communication bien léchée. La langue de bois est montrée du doigt dans les commentaires et les forums de discussion. Internet nous force à renoncer au contrôle absolu de son image et à se jeter à l’eau, à participer aux conversations qui ont déjà lieu à notre sujet, ou à les encourager à venir se passer chez nous.

Pour bloguer il faut être passionné, et c’est quelque chose qu’on ne peut pas “truquer”. Si le coeur n’y est pas, les centaines de personnes du public vont finir par le sentir, un jour ou l’autre — et les gens n’aiment pas la facticité. Le choix des bonnes personnes pour bloguer est donc crucial. Ce n’est pas un travail pour n’importe qui.

Ecrire dans le blog, ce n’est que la moitié du travail. Il faut garder un oeil sur les commentaires, y répondre, modérer parfois. Il faut surtout lire — d’autres blogs sur des sujets apparentés, ce que le public dit au sujet de son entreprise, de ses produits, ou du contenu du blog. Tout cela prend du temps. Cela ne se fait pas en 3 minutes entre deux meetings. Aimer ce dont on parle et être passionné, ça aide.

Idéalement, je l’ai dit, on choisira ses blogueurs parmi ses employés. Il faut tenir compte dans leur emploi du temps qu’il vont passer un certain nombre d’heures par semaine à bloguer, lire des blogs, échanger e-mails et commentaires là autour. S’ils n’arrivent pas à faire leur travail, éviter la solution facile de mettre la faute sur le blog. Chercher la vraie cause, et y remédier.

Voilà… voyez, c’est un sujet sur lequel on peut vite s’étendre. J’en resterai là pour aujourd’hui, non sans vous donner quelques pistes pour explorer plus loin (pas impossible que j’en rajoute après la publication de cet article).

Livres à lire, en anglais:

  • The Cluetrain Manifesto, incontournable et en plus, disponible gratuitement en ligne
  • Naked Conversations, panorama de plus d’une centaines d’utilisations des blogs dans le monde des affaires, de la politique, ou des médias

Livres en français:

  • Blog Story, pour une introduction générale au phénomène et à son histoire
  • Blogueur d’entreprise, que j’ai reçu mais pas encore lu (pour cause de pile de livres) mais qui est tout à fait recommandable, j’en suis certaine

En anglais:

En français:

N’hésitez pas à laisser un commentaire si vous avez quelque chose à ajouter, ou une remarque, ou même une question.

BlogTalk 2008 Proposal — Being Multilingual: Blogging in More Than One Language [en]

Here’s the proposal I just sent for BlogTalk 2008 (Cork, Ireland, March 3-4):

The strongest borders online are linguistic. In that respect, people who are comfortable in two languages have a key “bridge” role to play. Blogging is one of the mediums through which this can be done.

Most attempts at bilingual (or multilingual) blogging fall in three patterns:

  • separate and independent blogs, one per language
  • one blog with proper translation of all content, post by post
  • one blog with posts sometimes in one language, sometimes in another

These different strategies and other attempts (like community-driven translation) to use blogging as a means to bridge language barriers are worth examining in closer detail.

Considering that most people do have knowledge (at least passive, even if incomplete) of more than one language, multilingual blogging could be much more common than it is now. The tools we use, however, assume that blogs and web pages are in a single language. Many plugins, however, offer solutions to adapt existing tools like WordPress to the needs of multilingual bloggers. Could we go even further in building tools which encourage multilingualism rather than hindering it?


Extra material:

I’ve gathered pointers to previous talks and writings on the topic here: https://climbtothestars.org/focus/multilingual — most of them are about multilingualism on the internet in general, but this proposal is for a talk much more focused on blogging. Here is a video of the first talk I gave in this series (by far not the best, I’m afraid!) http://video.google.com/videoplay?docid=2096847420084039011 and which was about multilingual blogging — it can give you an idea of what this talk could look like, though I’ve refined my thinking since then and have now fallen in the grips of presentation slides. I also intend to base my talk on real-world examples of what bloggers are doing in the field.

Please don’t hesitate to get in touch if you would like more details for evaluating this proposal.

We had a long discussion on IRC about the fact that the submission process required a 2-page paper for a talk (in all honesty, for me, almost the same amount of sweat and tears as preparing the talk itself — I’ll let you figure that one out yourself). BlogTalk is a conference which aims to bridge the space between academics and practitioners, and a 2-page paper, I understood, was actually a kind of compromise compared to the usual 10-15 page papers academics send in when they want to speak at conferences.

The form was changed, following this discussion, to make the inclusion of the paper optional. Of course, this might reflect badly on proposals like mine or Stowe’s which do not include a paper. We’ll see!

I’ll also be speaking on structured portable social networks during the workshop on social network portability, the day before the conference.

Du lavage de linge sale en ligne [fr]

[en] Nearly two years ago, I did a piece for a paper magazine on blogging, Netizen. I still haven't been paid, and I'm not the only one to have this kind of complaint towards the company Pointblog's CEO, Christophe Ginisty. I think that there are circumstances, when you're wronged, where it's legitimate to use blogging to expose what has happened -- against popular ethics which discourage you from washing your dirty linen in public.

“L’affaire” Ginisty-Pointblog, dont j’ai l’honneur d’être une des victimes, refait surface avec la fermeture de Pointblog. J’attendais que Chryde nous raconte sa version des faits, après les quelques mots de Gilles Klein à l’adresse précédente, la “défense parfaite” de Ginisty, le lavage de linge sale de Cyril Fiévet il y a déjà longtemps de cela, pour faire un petit dossier récapitulatif sur ce qui a été dit.

Mais je les entends déjà, les bien-pensants: “laver son linge sale en public, c’est pas beau!” “citer des extraits de conversation privée, ça se fait pas!” “arrêtez d’étaler cette vilaine histoire sur vos blogs!”

Oui… oui. Oui mais. Quand il y a un conflit, et que la discussion n’est pas possible avec l’une des parties concernées… qu’est-ce qu’on fait? Eh bien, quand il s’agit d’argent, par exemple, on fait des procès. C’est public, les procès. Salement public.

En ce qui me concerne, on ne me doit “que” 1050€. Je suis une petite joueuse à côté d’autres lésés, j’en ai bien conscience. 1050€, c’est quand même une somme, pour moi. Cela représente près de la moitié de mon budget mensuel. Bah, j’ai appris à vivre sans, depuis le temps (bientôt deux ans!) que j’attends cet argent, envers et contre tout. Mais je peux vous dire qu’en temps de vaches maigres (comme ces jours) j’y repense, j’y repense.

1050€, il n’y a pas de quoi aller s’amuser à faire des frais d’avocats pour ça. Surtout si on habite en Suisse, et que le débiteur est en France, lui. Ah, s’il était en Suisse! Un petit commandement à payer, et voilà, le tour est joué. Mais en France, c’est pas si simple, à ce qu’il paraît.

Donc, nous y arrivons, au linge sale sur les blogs. Parce qu’un blog, comme je le dis souvent, ça peut être utilisé pour trois fonctions principales: partager, informer, dénoncer. Oui, dénoncer.

Alors non, en effet, ce n’est pas très beau de laver son linge sale en public. Mais c’est pas très beau non plus de mener les gens en bateau, de faire des promesses qu’on ne tient pas, de les laisser dans le noir, avec (probablement) l’espoir qu’ils se lassent. Au risque de passer pour hargneuse (je veux bien assumer), je ne vais pas me la coincer.

Mais il y a des circonstances, où, merde, on a bien le droit d’utiliser son blog pour parler de nos mésaventures et montrer du doigt ceux qui nous font des sales coups. Il faut assumer les conséquences, ensuite, bien entendu. Comme dans “la vraie vie” (que je déteste ce genre de distinction), quand on dénonce, on court le risque de s’en prendre plein la figure. Eh bien soit. Christophe Ginisty ne va certainement pas apprécier que je le montre du doigt, ou que je rapporte des choses qu’il m’a dites (il m’a quand même fait l’honneur de 2-3 conversations par chat, figurez-vous!). Peut-être m’écrira-t-il (enfin! depuis le temps que j’attends un signe de sa part!) comme à Chryde, pour me menacer ou m’expliquer encore à quel point il est la victime dans cette histoire.

Peu importe. J’en ai ma claque. Pour le billet plus long, mesuré, avec citations et tout le toutim, il faudra repasser dans quelques jours/temps. Ou pas — on sait jamais, avec ces satanés blogs, si et quand on écrira ce qu’on a l’intention d’écrire. Donc au cas où (et si vous voulez prendre de l’avance et vous faire votre propre opinion), voici ma petite collection de liens sur cette triste histoire.

Ridding WordPress Plugins of Template Tags [en]

[fr] Cet article décrit une méthode permettant de se défaire des "template tags" qu'utilisent certains plugins. Plutôt que de copier le fameux template tag à 3 endroits différents dans son thème (comme c'était le cas auparavant pour Basic Bilingual), il est possible de modifier à peu de frais un plugin pour qu'il injecte automatiquement son contenu dans le blog.

If you’re like me and use a bunch of plugins to liven up your WordPress blog, you’ve probably noticed that adding template tags in your favourite (or favourite-of-the-week) theme files can quickly become a royal pain in the neck.

One of the things I wanted to do with Basic Bilingual, and which I did with the last release, was make the plugin inject the text for the “other excerpt” (the French text you can see at the top of this post) automatically into the templates and feeds.

Once I’d figured out how to do that, I realised I could modify other plugins, too. And I’m going to tell you how you can do it, too. This method should work for any plugin which generates a template tag, as long as you want the content generated by the plugin to go immediately after or before the post content. (I’m still working on advanced rules for cases where you want to make modifications elsewhere in the template.)

Christine‘s Inline Tag Thing put me on the track (thanks!), as it does just that. Here’s the trick:

  1. create a function which concatenates (= “adds”) the plugin output to the content
  2. add an action hook to the plugin to apply that function to “the_content”.

Fear not, I’ll explain all. You don’t need to really know much PHP to do this, as long as you’re comfortable wading through a bit of code and copy-pasting stuff and making a few small modifications.

Let’s take an example: the Similar Posts plugin, which I’m now using to point out posts related to the current one (normally, in a box at the top of the post if you’re on the website, and as a list at the end of the post if you’re reading the feed).

Similar Posts provides a template tag, <?php similar_posts(); ?>, which you can paste in your template where you like the related posts to appear. Personally, I want them to appear on the main blog page, on the individual archive pages, and on the monthly, category, and taggy archive pages. This means I need to paste the tag into at least 3-4 different template files. And if I decide that I want the tag at the top of the post rather than the bottom, or I decide to remove it, there I go again. Not optimal.

So, here’s how I made it “better” (for me):

A. First, I looked at the plugin code to figure out where the template tag function was; in this case, quite easy, it’s the function called similar_posts(), logically. Here are the last two lines of this function, which do the actual data output:

print $result;
if (defined('POC_CACHE')) print $cache_time;

I changed them to:

return $result;
if (defined('POC_CACHE')) return $cache_time;

So that they didn’t print directly (ie, output text), but just return the value of the data we want to insert.

Then, I created the following function:

function sp_embed_similar_posts($content) {
    $content = similar_posts() . $content;
    return $content;
}

This function takes one parameter ($content), and sticks the output of similar_posts() in front of it. Now you see why we needed to change the other function so that it didn’t print. We’re just modifying the value of the $content string. This new function returns the modified value for the content (in our case, imagine it as being the content of your post with the code for the similar posts listing stuck in front.

Now all that is left to do is to tell WordPress to actually use that function at some point (plugins are usually a collection of functions, followed by a series of “hooks” which actually execute the functions at certain chosen moments). Here’s the action we’ll use:

add_action('the_content', 'sp_embed_similar_posts');

Try it!

This will also add the list of similar posts to the feed.

So, in summary, here is what we have done:

  • modified the template tag function so that it returns a value instead of printing it (in some plugins, you’ll find a function that already does that!)
  • created a function to stick that value on the beginning or end of a parameter, $content
  • add an action hook on the_content to execute the function.

Happy hacking!

Basic Bilingual 0.3 for Multilingual Blogging [en]

[fr] Une mise à jour de mon plugin "Basic Bilingual" qui permet de rendre WordPress bilingue. Modification majeure: il n'y a plus besoin de bidouiller son template pour faire apparaître l'extrait du billet dans "l'autre langue". Par contre, c'est toujours nécessaire pour rajouter les attributs lang.

Long overdue, an upgrade of my plugin Basic Bilingual. Grab the tgz archive or check out the code.

Some explanations. First, you all know of my long-standing interest in all things multilingual and in multilingual blogging in particular.

Years ago, I switched to Movable Type and then to WordPress because I was blogging in two languages. Movable Type allowed me to assign more than one category to each post — so I used two huge categories, fr and en, to indicate what language I was blogging in. This soon made the rebuilds a real pain in the neck, and WordPress allowed me first of all to happily hack it into being multilingual, and then actually write a plugin to do it in a cleaner way. The plugin hasn’t changed much since, and this upgrade isn’t a major one, but it’s a step in the right direction.

Ideally, I’d like people to be able to use the plugin without having to modify their templates at all. I’d also like the plugin to allow filtering out one language if that is what the reader desires. I still hope that WordPress will one day “see the light” and let us define language at post-level (Matt saw the light for tagging ;-), so I do have hope). By the way, I stumbled upon this Ajax Language Switcher for Basic Bilingual earlier today, and it will probably greatly interest those courageous ones of you who tend to have translations of each post or page.

Back to the plugin. It installs normally (unzip everything in the /plugins directory). If you’re using other languages than French and English, you’ll have to manually change the language codes in the plugin file (not very difficult, you don’t have to know PHP to do it; just look for “en” and “fr” and put the language codes for your languages instead).

I’ve fixed an annoying problem with slashes that popped up at some point (somebody else gave me the fix, but I can’t remember who — let me know!).

But most of all, I’ve made the “other language excerpt” appear automatically in the post content. Yes, you hear me: no need to add <php bb_the_other_excerpt(); ?> in your templates anymore. Yay! Added bonus: it will show up in the feeds, too — for that reason, I’ve added a text separator between the excerpt and the post so that there is a separation between the languages.

Basic Bilingual in Google Reader

Obviously, you’ll want to hide these separators and style your posts a little. Here is roughly what I’m using right now:

.other-excerpt {
font-style: italic;
background: #fff;
padding-left: 1em;
padding-right: 1em;
border: 1px solid #ccc;
}

.other-excerpt:lang(fr) p.oe-first-child:before {
content: "[fr] ";
font-weight: bold;
}

.other-excerpt:lang(en) p.oe-first-child:before {
content: "[en] ";
font-weight: bold;
}

.bb-post-separator {
display: none;
}

div.hentry:lang(fr) .entry-title:after {
    content: " [fr] ";
    vertical-align: middle;
    font-size: 80%;
    color: #bbb;
}

div.hentry:lang(en) .entry-title:after {
    content: " [en] ";
    vertical-align: middle;
    font-size: 80%;
    color: #bbb;
}

Now, notice there is fancy stuff in there which relies on the lang attribute. If you’re mixing languages on a page, you should use the lang attribute to indicate which language is where. This means (unfortunately, until I become buddies with PHP’s ob_start() function) that you need to touch your template. It’s not that hard, though.

Find the outermost <div> for each post in the template (it should have the CSS class hentry, by now). Add this inside the tag: lang="<?php bb_the_language(); ?>". Do so on every theme template which produces posts. With the Sandbox theme, it would look like this:

&lt;div id=&quot;post-" class="" lang=""&gt;

That’s it!

If you’re using this plugin, please leave a link to your blog. I’m also always interested in hearing of other examples of multilingual blogging or multilingualism online.

Tags and Categories, Oh My! [en]

[fr] Il est temps de faire de l'ordre dans les catégories de CTTS. Je veux en garder 20-30. Vos suggestions sont les bienvenues.

The time has come. WordPress now has native tagging. I’ve imported my old tags and my even older keywords (yeah, even though tags and keywords are slightly different… what the hell). I’ve created an index page for my tags and an index page for my categories. Go and look, then come back.

So, what do you think?

I think the “tags” page looks pretty good (just needs a little CSS fixing so that the huge tags don’t prevent you from clicking on the smaller ones they hide). I mean, it’s a sprawling mess, but that’s what a tag collection should look like. Later, I can add fancy stuff like related tag clouds in the sidebar, or something like that.

But my, look at that listing of categories. It’s a huge sprawling mess, and it shouldn’t be. It should be a concise listing of rather widely defined areas I write in. Not easy. So, dear readers, I’m going to ask for your help.

See, I’ve installed this neat plugin, Tag Managing Thing, which does a lot of what I was dreaming up for a possible future version of Batch Categories. Well, one thing Tag Managing Thing doesn’t do which Batch Categories did, was to assign posts to categories and remove them. Tag Managing Thing only deals in organising tags and categories — including converting one into the other. Update: Rob Miller has a Batch Categories plugin which should do the trick. I can’t remember if he used any of my work or started from scratch, but in any case, it looks very much like what I had dreamed up for it 😉 [/update]

So, here we go. I want to keep — oh, let’s be reasonable — maximum 20-30 categories. (I’ll convert the rest to tags.) Some of the new or obvious ones will remain: Events, Youth, Social Software (maybe Social Tools?), Languages… Here’s what we’ll do. I’m going to write a list of categories at the bottom of this post, and I’ll keep modifying it until it looks reasonably good. I’ll be (heavily) relying upon your input for this. Thanks in advance. I really don’t think I can do this alone.

New categories for CTTS:

  • Events
  • Languages
  • Youth
  • Blogging
  • Technology
  • Social Tools
  • Travels
  • Livre (the book)

Please leave your ideas in the comments! The category index handily gives a post count for each category or subcategory.