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.

Netvibes Widget of my Shared Items [en]

If you read this blog “on the blog”, and look at my very cluttered sidebar, you probably noticed there is a feed of my “shared items” from Google Reader hidden in there (grab the feed!). “Sharing” is the reason I switched to Google Reader over a year ago.

I’m sitting in a workshop about UWA widgets at Paris Web, which had me looking at netvibes again. Even though it never clicked for me, I know lots of you use it (I check my stats, yes I do).

So, here we go. One thing leading to another, I created a widget with my shared items in it. It’s more for fun than because it’s really useful, as you netvibes users can create it really easily — but hey, here it is:

Add to Netvibes

Update: how disappointing! I thought it was going to look like this in the blog post:

My Shared Items Netvibes Widget

Not there yet, it seems.

Update 2: something I’ve been wanting to do with netvibes (not sure how feasible it is, actually): create a tab with “my stuff” in it. See, I’m scattered online. And the stuff I “share” is also scattered. If I found it through my feed reader, it’ll appear as a whole post in my shared items. If I was randomly browsing around, it’ll be in my del.icio.us links. If it was a video I watched on YouTube, it’ll end up in my VLog. If I wanted to share a quote, it’ll be in my Tumblr. Creating something to collect all these “things of others that I consider worth passing on” would be really nice. I wonder if a netvibes tab would be a solution — and if people would use it at all.

WordPress Finally Has Tags! [en]

[fr] Après des années d'errance, WordPress implémente enfin un système de tags qui ne sont pas des catégories. Un billet un peu plus complet en français s'impose probablement. Qu'en pensez-vous?

I’ve known for some time that version 2.3 of WordPress would support real tagging. Today, Matt has just announced the deployment of tagging on WordPress.com.

From the start, I’ve been a very vocal supporter of the differentiation between tags and categories — and I really appreciate Matt acknowledging this in his announcement.

When I first met Matt offline for the first time nearly a year ago, at Blogtalk Reloaded in Vienna, I jumped on the occasion to pester him about tags and categories. He listened — but I don’t think he was convinced at the time.

A few months later, I was in San Francisco — and one of the first things Matt told me when we met again was “you know, I finally saw the light about tags and categories”. He told me version 2.3 would have both. I was overjoyed. I’ll never know exactly what role I played in Matt’s “seeing the light”, but I like to think I contributed 🙂

Looking back in time, Technorati started indexing tags in January 2005. They weren’t new for me then (I’d been tagging things on del.icio.us since May 2004 and on Flickr since October of the same year) but clearly, being able to tag posts was a great thing. You know me — my brain can’t sit still — two days later, I was rambling about some ways to combine tags in searches/sorting. Some of the stuff I talk about in there isn’t possible yet, but I hope it will someday.

Two days after that, I wrote my first WordPress plugin, Bunny’s Technorati Tags — which became quite popular and which I still use to this day.

I’m really glad to be able to retire this plugin, specially as Peter Westwood has written an importer for it. That means you should have no problems converting your bunny-tags into wp-tags. Thank you very much, Peter.

Bear with me while I dig though my archives: weighted tags by category is something I’d forgotten I’d wanted… does anything like that exist now?

My only gripe with the implementation of tags in WordPress, for the moment, is that they will be comma-separated. No! Please! We’ve been typing space-separated tags into Flickr and del.icio.us for three years now. Three years! When I chose space-separation for the tags in my plugin, it was because the existing interfaces for tags did it like that.

Spaces, please. Or at least an option to input them space-separated. Or a simple plugin. Tags separated by spaces, and multi-word tags between quotes.

WordCamp 2007: Dan Kuykendall, Podcasting and podPress [en]

[fr] Notes prises à WordCamp 2007. Introduction au podcasting et à podPress, un plugin WordPress qui le transforme en machine à podcaster.

Here are the notes I took of Dan’s talk on Podcasting and podPress. I did my best, but they may not be accurate.

WordCamp 2007 Podcasting and podPress

Dan Kuykendall is the author of the popular podcasting plugin podPress.

Podcasting is very similar to blogging (just audio/video). About getting your message out. All about content, in consumable ways. Feeds.

RSS2 feed + “enclosure” tag.

Difference with blogging: lots of offline podcast viewers/listening. (Not many offline blog readers.)

Gear? Microphone, recording software, site + RSS2, something to say/play. Dan has a $100 mike, a $100 external sound card — steph-note: fancy! but not even necessary… in-built microphone and soundcard can do for starters.). Software: Audacity is free, so is WordPress.

WordCamp 2007 Dan Kuykendall's Gear

Podcasting does not require a major investment.

Dan got into podcasting early 2006. steph-note: is that early, as far as the history of podcasting is concerned? Podcasting is a little more personal than blogging (voice, etc.) Podcasters, like bloggers, really crave feedback. At that time, podcasting wasn’t built into iTunes. WordPress looks great for that, but if you’re interested in podcasting more than blogging… hmm.

WordCamp 2007 Dan Kuykendall

Dan heard about the plugin system in WordPress… He had figured out how to do podcasting and make his podcast look good in iTunes, but what about others? => started writing a plugin, PodPress. “Which has now grown a bit out of control!” steph-note: indeed, problems with redundant queries which caused my site to be shut down by DreamHost twice in the last six months.

Podcasting is not just about pointing to your mp3 files. PodPress adds meta information, media players, etc. This means your public can view your podcast even if they don’t use a dedicated “podcast reader” (iTunes…)

steph-note: tour of podPress’s features, and demo (not blogging this)

WordPress: amazing blogging platform and CMS, with tons of hooks for plugin developers.

steph-note: my experience of podPress is lots of settings, does the job though, even with minimal settings. However, as I mentioned above, my blog has been taken down once and maimed at least once by DreamHost because it was raising the load on the server it was hosted on way too much. After narrowing down the problem, the culprit appeared to be podPress.

Q from Dan: who is providing media content in their blog, but doesn’t use podPress? steph-note: question unclear from me, in my mind a blog which provides media content is a podcast, as long as the media content is made available as an enclosure in the feed, which I thought WordPress did out of the box.

Q from audience: monetization? A: no, for free, but PayPal donations, though they haven’t really covered the cost of hosting…

Q Mark JaquithAaron Brazell: I love podPress, but the only problem is the weekly releases… could we space them out a bit? A: never sure when I’ll be coding, so when I get some stuff done I release it. => Q for Matt: will WordPress support some kind of plugin update automation? A (Matt): yes, for 2.3 (at least notification). steph-note: yay!

Mystery WordPress/Markdown Problem: Troubleshooting [en]

[fr] Description d'un vilain problème WordPress avec PHP Markdown Extra. Certains billets refusaient de s'afficher et faisaient tout simplement planter la suite du chargement de la page (donc, pages archives incomplètes, billets disparus). J'ai résolu (plus ou moins) le problème en remplçant PHP Markdown Extra par Markdown tout court, mais je n'ai toujours pas compris le fond du problème. Ce billet donne quelques détails sur les symptômes et mes déductions.

If you’re a WordPress person and you feel like a bit of juicy troubleshooting, this one is for you. I’ve narrowed down part of the problem, but have failed to identify clearly the cause of the problem. I’ve found a workaround by replacing a plugin by another similar one, however. I’ve made screenshots so that even once this problem is fixed (hopefully very quickly) you can make sense of this post.

Symptoms:

Some posts on the VibrationsMusic website fail to display their content, or display incompletely. When this happens, the page stops loading altogether, resulting in a truncated page. (So we have vanishing posts and incomplete aborted archive pages where they should appear.) No error messages in source, HTML code just stops.

Narrowing it down:

Removing post content makes the post display OK, so I figured it had something to do with the content. Removing the PHP Markdown Extra plugin removed the problem, to. So it has something to do with a combination of certain things in the content and the PHP Markdown Extra plugin. (Removing other plugins didn’t change a thing, so I deduce from that it isn’t a plugin interaction issue.)

Using the “cut-half-out” technique I tried to narrow down the problem to a certain type of post content. At first, it seemed to be caused by either (a) HTML links in Markdown lists or (b) embedded YouTube players (<object>). However, some posts with either (a) or (b) were displaying correctly. In one faulty post, replacing the embedded YouTube video with another removed the problem.

However, it seems more subtle than that. In some cases, removing the other half of the post also removes the problem. => post length? Not really either. In a quite weird case, one post stops displaying right at the end of the content (Technorati tags and closing divs don’t appear) and if changes are made to the next post (like removing its content) then the first post displays correctly (and the second one too).

This seems (to me) to point to some problem in the query-array-manipulation area (but I don’t know how things work well enough in that department to make a more precise hypothesis).

Workaround:

I replaced the PHP Markdown Extra plugin with the “normal” Markdown plugin, and everything displays fine.

Blogging 4 Business Conference [en]

[fr] Notes de la conférence Blogging4Business à laquelle j'assiste en ce moment à Londres.

So, unless some miracle happens, I’ll be blogging this day offline and posting it tonight when I get back at Suw’s. There seems to be no wifi provided for conference attendees unless you are willing to shell out £25 for a daily pass. (Actually, it seems there were a certain number of passes available.)

I would honestly have expected an event titled “Blogging 4 Business” to be “blog-aware” enough to realise that providing free wifi to connected people will encourage blogging of the event. Granted, most of the people I see in the room are taking paper notes (not that there is anything wrong with that) — this doesn’t seem to be an audience of bloggers. But wouldn’t it be an intelligent move to encourage the blogging public to “do their thing” at such an event?

I missed most of the first keynote and panel, spending time in the lobby chatting with Lee and Livio of Headshift (my kind hosts today), and Adam.

Panel 1 incomplete and possibly inaccurate notes (they’re more snippets than a real account of what was said, partly because I don’t understand everything — audio and accents)

How do you respond to crisis online? (cf. Kryptonite)

Ged Carroll: In the 90s, faulty lock was broadcast on consumer TV. Mistake: didn’t tell the blogs that they were monitoring what was being said in that space, and that they were working on a solution (they were in fact acknowledging the problem, but hadn’t communicated that state of things to the public).

Moderator (Paul Munford?): how do you prevent something like that from being so predominently visible (search etc.)?

Darren Strange: owns his name. Same if you type “Microsoft Office”, his blog comes up pretty quickly too. Blogs attract links, good for search engine ranking.

Question: brands need ambassadors, OK, but where’s the ongoing material to blog about Budweiser?

Tamara Littleton: brand involvement in the site keeps things alive and happening. Reward ambassadors with merchandise.

steph-note: on my way to London, I was reading the Cluetrain Manifesto (yeah, I’m a bit late on that train) and was particularly inspired by the part about how most of traditional marketing is trying to get people to hear a “message” for which there is actually no “audience” (nobody really wants to hear it), and so ends up coming up with ways to shove it into people’s faces and make them listen. This idea is kind of trotting in the back of my mind these days, and it’s colouring what I’m getting out of this event too.

Question: transparency is a big thing… “creating ambassadors” (*steph-note: one “creates” ambassadors?!)… where is the space for disclosure?

Tamara Littleton: it’s about creating an environment, not saying “if you do this you’ll get that reward”. Rewards could be access to information about the product. Invite people to take part in something.

Ged Carroll: two types of rewards: merchandise etc, and also reputation-ego. Doesn’t have to be tangible.

Darren Strange: trying to have non-techie people try new releases of Vista, etc. Installed everything on a laptop, shipped it to the people’s house, and gave it to them. “Take the laptop, use it, blog if you want to, write good or bad things, or send it back to us, or give it to charity, or keep it, we don’t really care.” Huge debate about this. Professional journalists will be used to this kind of “approach”, but bloggers are kind of amateurs at this, they don’t know how to react. Disclosure: just state when you received something. steph-note: and if you’re uncomfortable, say it too!

Panel: Lee Bryant, Adam Tinworth, David ??, Olivier Creiche

steph-note: got wifi, will publish

Blogging 4 Business

Lee presenting first. Headshift have quite a bunch of nice products in the social software department. “It aint what you do it’s the way that you do it, and that’s what gets results.” (Bananarama)

Concrete business use cases.

Olivier talking now. “To blog or not to blog?” Simple answer: blog. Serious Eats. Citrix: a lot of knowledge disappeared when people left the company — a lot of knowledge out there that is only waiting to be gathered out of people’s e-mail boxes. Used Movable Type for that.

Another case study: AEP, also wanted to prevent e-mails from being the central repository of company knowledge (e-mails are not shared spaces!) Start small, experimental. Need to find the right people to start with. Another one: Arcelor/Mittal merger. Decided to communicate publicly about the lot of stuff. Video channel. Wanted to be very open about what they were doing and how, and answer questions. Good results, good press coverage.

David: allowing lawyers to share their knowledge and expertise, not just in their offices. Blogs, RSS, wikis allows time-critical sharing of information. steph-note: like I’ll be publishing this as soon as the panel is over… Catch things on the fly and make them available over a very short period of time.

Adam: starting to roll out business blogs just to allow communication. Bringing about profound change. steph-note: very bad account of what Adam said, sorry — audio issues. Other problems: educational issues. Best to not force people to use this or that tool, but open up. Share. Get people inside the teams to show their collegues what they’re using.

Question (moderator): a lot of evangelising going on in terms of blogs. Do blogs/wikis etc deliver on the promise of breaking down barriers, etc, when it comes to internal communication.

Lee: not a simple black/white situation. It comes down to people. Big problem: people bear a high cost to interact with communication systems and get no feedback. But with social tools (lightweight), we get immediate feedback. Integration with existing corporate systems.

Question: is social media the end of communications as we know it.

Lee: every generation of technology sees itself as a ground-breaker. But they’re all layered on top of each other. We have technology that delivers on the initial promise of the web (equal publication, sharing, etc) (steph-note: yay! I keep saying that!)

steph-note: more northern English please 😉

David: now, using the web to create communities of practice, getting lawyers to communicate with people unthought of before.

Question: how do you deal with outdated material.

Lee: with mature social software implementations, any piece of information gathers its own context. So what is relevant to this time tends to come to the surface, so out-dated material sinks down. More about information surfacing when it’s time than getting out-dated stuff out of the way.

David: social tools make it very easy to keep your content up-to-date (which was a big problem with static sites).

BlogCamp: Multilingual Blogging Session [en]

[fr] Mise par écrit des notes de préparation pour ma présentation hier au sujet des blogs multilingues, lors du BlogCamp à Zürich. En deux mots: il faut des gens pour faire le pont entre les îles linguistiques sur internet, et la façon dont sont conçus nos outils n'encourage pas les gens à être multingues sur leurs blogs. C'est pourtant à mon avis la formule la plus viable pour avoir de bons ponts.

I presented a session about multilingual blogging at BlogCamp yesterday in Zürich. Thanks to all of you who attended (particularly as I was competing with Xing’s Nicolas Berg!) and wrote about the session (Bruno of course, Sarah, Sandra, Maira, Jens-Rainer, Waltraut, Jokerine, Antoine…let me know if I need to add you here), and to Greg in particular for filming the session.

Although I’m rather used to giving talks, this was the first time my audience was a bloggy-geek crowd, so it was particularly exciting for me. I prepared my talk on the train between Lausanne and Bern, and unfortunately prepared way too many notes (I’m used to talking with next to no notes), so I got a bit confused at times during my presentation — and, of course, left stuff out. Here’s a rough transcript of what I prepared. Oh, and don’t forget to look at this photo of my cat Bagha from time to time to get the whole “experience”.

Steph giving her talk.
Photo by Henning

Talk notes

In the beginning there was the Big Bang. Space, time and matter came to exist. (Physicists in the audience, please forgive me for this.) We know it might end with a Big Crunch. Internet looks a bit like this Big Crunch, because it gets rid of space. With the right link to click on, the right URI, anybody can be anywhere at any time.

However, we often perceive the internet as a kind of “space”, or at least as having some sort of organisation or structure that we tend to translate into spatial terms or sensations. One way in which the internet is organised (and if you’re a good 2.0 person you’re acutely aware of this) is communities.

Communities are like gravity wells: people tend to stay “in” them. It very easy to be completely oblivious to what is going on in other communities. Barrier to entry: culture. Language is part of a culture, and even worse, it’s the vehicle for communication.

What is going on in the other languageospheres? I know almost nothing of what’s going on in the German-speaking blogosphere. The borders on the internet are linguistic. How do we travel? There is no digital equivalent of walking around town in a foreign country without understanding a word people say. Note: cultural divides are a general problem — I’m trying to focus here on one of the components of the cultural divide: language.

Who speaks more than one language? In the audience, (almost) everyone. This is doubly not surprising:

  • Switzerland is a multilingual country
  • this is the “online” crowd (cosmopolitan, highly educated, English-speaking — though English is not a national language here)

Two episodes that made me aware of how strong language barriers can be online, and how important it is to encourage people to bridge the language barriers:

  • launching Pompage.net because at the time of the browser upgrade initiative I realised that many French-speaking people didn’t have access to all the material that was available in Anglophonia, because they just didn’t understand English well enough;
  • the very different feelings bloggers had about Loïc Le Meur when he first started being active in the blogosphere, depending on if they were French- or English-speaking, particularly around the time of the Ublog story.

A few questions I asked the audience (mini-survey):

  • who reads blogs in more than one language? (nearly everyone)
  • who blogs in more than one language?
  • who has different blogs for different languages?
  • who has one blog with translated content in both languages? (two courageous people)
  • who has one blog with posts in various languages, mixed? (half a dozen people if my memory serves me right)
  • who feels they act as a bridge between languages?

So, let’s have a look at a few multilingual blogging issues (from the perspective of a biased bilingual person). Despite the large number of people out there who are comfortable writing in more than one language (and the even larger number who are more or less comfortable reading in more than one language), and the importance of bridging cultural/linguistic gaps, blogging tools still assume you are going to be blogging in one language (even though it is now accepted that this language may not be English).

What strategies are there for using more than one language on a blog, or being a good bridge? Concentrate first on strategy and then worry about technical issues. Usage is our best hope to make tool development evolve, here.

A. Two (or more) separate blogs

  • not truly “multilingual blogging”, it’s “monolingual blogging” twice
  • caters well to monolingual audiences
  • not so hot for multilingual audiences: must follow multiple blogs, with unpredictable duplication of content

B. Total translation

  • a lot of work! goes against the “low activation energy for publiction” thing that makes blogging work (=> less blogging)
  • good for multilingual and monolingual audiences
  • technical issues with non-monolingual page (a web page is assumed to be in a single language…)

C. Machine translation!

  • getting rid of the “effort” that makes B. fail as a large-scale solution, but retaining the benefiits!
  • problem: machine translation sucks
  • too imprecise, we don’t want more misunderstanding

D. A single blog, more than one language (my solution)

  • easy for the blogger, who just chooses the language to blog in depending on mood, bridge requirements, etc.
  • good for the right multilingual audience
  • technical issues with non-monolingual pages
  • how do you take care of monolingual audiences? provide a summary in the non-post language

“Monolingual” audiences are often not 100% monolingual. If the number of people who are perfectly comfortable writing in more than one language is indeed rather small, many people have some “understanding” skills in languages other than their mother tongue. Important to reach out to these skills.

For example, I’ve studied German at school, but I’m not comfortable enough with it to read German-language blogs. However, if I know that a particular post is going to be really interesting to me, I might go through the trouble of reading it, maybe with the help of some machine translation, or by asking a German-speaking friend.

A summary of the post in the language it is not written in can help the reader decide if it’s worth the trouble. Writing in a simple language will help non-native speakers understand. Making sure the number of typos and grammar mistakes are minimal will help machine translation be helpful. And machine translation, though it is often comical, can help one get the gist of what the post is about.

Even if the reader is totally helpless with the language at hand, the summary will help him know what he’s missing. Less frustrating. And if it’s too frustrating, then might give motivation to hunt down a native speaker or do what’s required to understand what the post is about.

Other bridging ideas:

  • translation networks (translate a post or two a month from other bloggers in the network, into your native language)
  • translation portal (“news of the world” with editorial and translation work done) — check out Blogamundo

Problem I see: bloggers aren’t translators. Bloggers like writing about their own ideas, they’re creative people. Translating is boring — and a difficult task.

Some more techy thoughts:

  • use the lang= attribute, particularly when mixing languages on a web page (and maybe someday tools will start parsing that)
  • CSS selectors to make different languages look different (FR=pink, EN=blue for example)
  • language needs to be a post (or even post element) attribute in blogging tools
  • WordPress plugins: language picker Polyglot and Basic Bilingual
  • excerpt in another language: what status in RSS/atom? Part of the post content or not? Can RSS/atom deal with more than one language in a feed, or do they assume “monolingualism”?
  • indicating the language of the destination page a link points to

Extra reading

The nice thing about having a blog is that you can dive back into time and watch your thinking evolve or take place. Here is a collection of posts which gravitate around language issues (in a “multilingual” sense). The Languages/Linguistics category is a bit wider than that, however.

Blogging in more than one language:

About the importance of language, etc.:

Promote Comments Plugin Idea [en]

[fr] Une idée de plugin que m'a soufflée Bruno Giussani: pouvoir "promouvoir" un commentaire et l'intégrer sans peine au contenu du billet.

A few days before LIFT’07, I had dinner with Bruno Giussani, who now happens to be one of the lucky people to live in beautiful Lausanne.

Amongst other things, he told of his frustrations with current blogging software (he’s using TypePad) and how the perfect tool didn’t seem to exist. I guess one simple reason this is so is that “perfect” means different things to different people.

I use WordPress, like it, and generally recommend it around me, because to my mind it’s the most complete and user-friendly platform out there, and because the plugin architecture allows for nearly any functionality to be added to it if somebody takes the trouble to code it.

Bruno shared with me one shortcoming of today’s blogging technology that he and Robert Scoble were talking about at LIFT last year (so this is not a “new” idea). Here is a write-up of this idea (with his permission of course), with a few implementation and interface details, in the hope that someone out there will pick it up and write the plugin. (I’ve heard enough people recently asking for plugin ideas to work their mad coding skillz on…)

Here’s the basic idea: there are often valuable contributions in the comments of a post, and we would like a way to be able to effortlessly “promote” a comment (or part of it) into the body of a post. This allows the blogger to easily act as an editor for the conversations taking place on his blog.

All this, of course, would have to be nice and ajaxy. Here’s how I could imagine it happening.

First of all, the plugin recognises that the author of the post is logged in, and adds a “promote” link next to each comment, in addition to the “edit” link. If that link is clicked, the comment text is automagically appended to the post content in a blockquote, complete with author name and link to original comment.

If part of the comment is selected when the promote link/button is clicked, then only that excerpt is quoted in the post.

Instead of the dreaded confirmation pop-up, a nice confirmation message should appear alongside the promoted comment in the post body, with an undo link.

From a back-end perspective, the promote link “knows” which post it belongs to (check the ID of the comment <div> it’s in). It shouldn’t be very difficult to grab author name, author url, comment permalink, format them all nicely (blockquotes, credit, microformats), edit the post, and add it to the end of the content with some introductory text (like “promoted comment”) and an “edited” stamp with time/date of promotion.

Possible problems:

  • if part of a comment is selected and the wrong “promote” link is clicked, what behaviour would be expected? Probably an error message of some sort, or even better (but probably trickier to implement), a choice: promote the whole post (based on link clicked) or the excerpt (based on selection)?
  • should promoted comments really be added into the post content, or stored as post meta data?

Taking this a step futher: wouldn’t it be nice to let the blogger introduce the promoted comment, or write a few lines after it? In this case, pressing the promote button/link would bring up a pop-up where more text can be added, with the option of displaying it before or after the quoted text.

And even another step futher (but I’m not sure it’s an interesting one): how about allowing the blogger to make a new post out of the promoted comment, instead of just appending it to the current post? Would this be interesting?

Additional thoughts on this basic idea are welcome (Bruno, let me know if I forgot something, it’s been a while since our conversation). If you’re a plugin author and you feel upto it, go for it (just make sure you give Bruno credit for the idea). I’ll be happy to try it out.

Excluding One Category From Blog Homepage (WordPress) [en]

[fr] Comment exclure une catégorie de la première page de votre blog WordPress tout en la gardant dans les archives.

The simplest method I’ve found up to now (and I’ve only just found it) if there are certain categories of posts you do not want to see appear on your main blog page, but that you still want to see in the archives, is to use query_posts().

Here’s an example:

This needs to come in right before the while ( have_posts() ) { line. The $query_string parameter means that you can still pass parameters in the URL, so things like special Event Calendar pages will still work.

Careful, though, this only works for one category at a time. You need to use WP_Query for that, and build a separate loop for the homepage.

Events in WordPress [en]

[fr] Prise de tête pour trouver un moyen d'utiliser WordPress pour afficher des événements (des billets spéciaux, mais pour lesquels on précise aussi une date de début et de fin d'événement). Il faudrait qu'on puisse afficher les "événements encore pas terminés" sur une page spéciale.

Deux plugins m'offrent des solutions partielles, mais je suis incapable de les transformer en solutions totales. Toute aide serait bienvenue.

Besides using WordPress as a blogging tool, a client of mine would like to use it to display a page of upcoming events. I’ve dug out a number of plugins which somewhat do the job, but getting things to work exactly as we want is proving to be a pain in the neck.

As I’ve been stuck on this for a few weeks now and still see no light, I’m offering this problem to the collective mind out there in hope that a bright solution pops up somewhere before we go live (which is… very soon — hear my desperate plea for help).

Here’s what we want

  • events should be posts (this rules out Shrikee’s Events Plugin)
  • events have a start date, and an end date — time is unnecessary (this rules out RS Event)
  • events should show up in the normal flow of posts and on their own category page (we don’t want them on the home page, but I can exclude the category manually, so that’s a non-issue)
  • we should be able to display upcoming events on a WordPress page (I’ll stick whatever code is needed in the template for that page) — “upcoming”, here, meaning events whose end date is not yet past.

Partial solutions

At first, I thought about using upcoming or eventful, but for quite a few reasons this won’t work out in our situation.

Event Calendar seemed like a good candidate, although we didn’t really need the “calendar” itself. I hacked the layout of the event posts so they displayed OK. However, the main bit is missing. Event Calendar provides a way to list all the events “after today”, by calling http://blog.address/?ec3_after=today for example. Unfortunately, this doesn’t work on our setup (probably something we did to the rather hacked theme. I’ve had a look at the source code but couldn’t really figure out what happened when that variable was passed, so was unable to reproduce anything ressembling it in a Page template.

Another problem is that this will not show events which have started yesterday but which are not yet over, if I’m not mistaken.

Last but not least, we have two event subcategories, so I’d have to create two (or even three) separate event pages — but I guess that if I manage to make one, filtering posts by category shouldn’t be too hard.

Another solution would be to use Posts Expire and Posts Begin as described in this forum post I stumbled upon yesterday. Again, these plugins provide a way to call “posts which have not yet expired” with a particular URL: home/?orderby=post_end_date. Again, I haven’t manage to dig out the code and stick it in a Page template — trying to rewrite a pretty URL to that one is source of much hair-tearing upon this server I have very little control on, and I haven’t found a way to make it work.

The other problem I’d have to work around if using these plugins is that expired posts are not displayed in the blog anymore. I’m not sure what code in the plugin takes care of that, but it would have to be commented out.

Help

So, I have two partial solutions here, but I’m stuck making progress on either. Do you have any ideas which could help me out — either to make one of my partial solutions a working one or to find a third one?

I’d really really appreciate help on this one. Thanks a lot.