Trying the Seesmic Video Plugin [en]

[fr] J'essaie le plugin seesmic pour mettre de la vidéo dans mes articles. Il paraît qu'on peut laisser aussi des commentaires vidéo!

When I visited Seesmic in San Francisco, Loïc told me they were working on a (http://wiki.seesmic.com/Wp-plugin).

Here I am, trying it out.

{seesmic_video:{“url_thumbnail”:{“value”:”http://t.seesmic.com/thumbnail/NrZQ4aKmSu_th1.jpg”}”title”:{“value”:”My First Seesmic Video Post with the WordPress plugin.”}”videoUri”:{“value”:”http://www.seesmic.com/video/0i66jwr6zE”}}}

Similar Posts:

Bunny's Print CSS Plugin Upgrade [en]

[fr] Deuxième version de mon plugin pour insérer automatiquement une feuille de style impression dans n'importe quel thème WordPress. Il y a maintenant un panneau d'administration qui permet d'éditer le CSS directement depuis WordPress -- et le CSS en question a été enrichi.

The [little print CSS plugin](http://climbtothestars.org/archives/2008/01/07/print-css-plugin-wordpress-needs-css-guru/) I threw together the other day has had a little upgrade already, and is also now [available in the WordPress plugin directory](http://wordpress.org/extend/plugins/bunnys-print-css/).

First, [Kjell Knudsen](http://kjell.langvass.org/) was kind enough to add to the very basic [CSS file](/code/print-css/print.css) I provided with the plugin. It’s now a little richer and should support K2, for example. It’s still open to improvement, so don’t hesitate to link to your propositions in the comments! Maybe at some point I’ll be able to offer more than one stylesheet with the option to choose between them.

Option? Oh yes, option. Because, you see, Print CSS now has an option panel. I’m pretty happy, because it’s my first plugin with an options panel, and I’ve been thinking I should learn how to do that for some time now. The options panel doesn’t do much, however: it simply allows you to edit the print CSS file through the WordPress admin area (if the file permissions are right — chmod 777 or something).

I’d like to extend all my thanks to [Yaosan Yeo](http://www.channel-ai.com/blog/), who wrote the [MyCSS](http://wordpress.org/extend/plugins/mycss/) plugin. I heavily lifted the code for the admin panel from it, as it does essentially the same thing: allow the user to edit a CSS file. I’m really loving MyCSS by the way, even if [there is a little capitalization glitch in it](http://wordpress.org/support/topic/152160), because I’m always adding CSS to my themes and it’s a real pain to copy-paste it all over the place each time I switch themes (or from one blog to another).

Off you go now, check out [Bunny’s Print CSS](http://wordpress.org/extend/plugins/bunnys-print-css/) in the WordPress plugin repository!

Similar Posts:

Print CSS Plugin (WordPress) Needs CSS Guru [en]

[fr] Un nouveau plugin, qui permet d'insérer automatiquement une feuille de style pour l'impression dans son blog WordPress.

La feuille de style que j'ai pondue étant bien pauvre, incomplète, et franchement pas terrible, l'aide d'un gourou CSS serait fort appréciée pour mettre à disposition une feuille de style pour impression qui soit jolie, conforme, et à un peu près universelle. Crédit sera donné, bien entendu. (C'est un anglicisme, ça?)

Right, here we go — another plugin. I noticed some time back that many WordPress themes were provided without [a print stylesheet](http://www.alistapart.com/stories/goingtoprint/).

In my attempt to stop fiddling with my theme files, I dreamed up a simple little plugin that would add a link to a [print stylesheet](http://codex.wordpress.org/Styling_for_Print) in the page header, and provide a simple, universal, print stylesheet that people could use.

Well, I’ve got half the work done, and it’s my new plugin [Bunny’s Print CSS](/code/print-css.tgz) ([zip](/code/print-css.zip), [.phps](/code/print-css.phps). “Half the work” because it includes a sample stylesheet and links to it automatically in the theme header when activated, but the stylesheet is nowhere near “complete”, “universal”, “pretty”, or any other nice adjectives you’d like to find associated with a print stylesheet bundled in a plugin.

So, call to all you CSS gurus out there. Can you improve on my [print.css](/code/print-css/print.css)? It would be nice if it were at least somewhat sandbox/kubrick compatible. Credit will be (loudly) given.

Now, aren’t there other plugins out there doing similar things? Not that many, at least in the [plugin repository](http://wordpress.org/extend/plugins/). [MyCSS](http://wordpress.org/extend/plugins/mycss/) allows you to add custom theme-independant CSS to your blog. [WP-Print](http://wordpress.org/extend/plugins/wp-print/other_notes/) creates a “printable version” of your blog (if I understood correctly, by creating a set of print-friendly pages).

Similar Posts:

Two Plugin Updates: Basic Bilingual 0.32 and Language Linker 0.2 [en]

[fr] Je me suis levée à l'aube pour aller faire la nouille sur RSR1 et prendre un p'tit déj improvisé chez une ancienne copine d'uni. Ensuite, j'ai passé la journée les mains dans le PHP, ce qui veut dire que je n'ai beaucoup blogué, mais que j'ai mis à jour deux plugins: Basic Bilingual, qui permet de tenir sans peine un blog "bilingue" comme celui-ci (c'est ce qui me permet de rédiger et d'afficher ce petit extrait en français) et Bunny's Language Linker, très utile pour afficher des liens entre pages correspondantes des différentes traductions d'un site.

After waking up at an ungodly hour this New Year’s Day (for a [live radio appearance](http://info.rsr.ch/fr/rsr.html?programId=110451&bcItemName=le_grand_8&rubricId=8888&contentDisplay=last_five&siteSect=1000#mardi) and impromptu breakfast at a uni friend’s home nearby) I spent the rest of my day elbows deep in PHP code. As a result, I haven’t written the half-dozen of posts that have been sitting in my drafts list over Christmas, but I have updated two plugins — an old one, and a new-born.

**[Basic Bilingual](http://wordpress.org/extend/plugins/basic-bilingual/) 0.32**

[Download](/code/basic-bilingual.tgz) | [zip](/code/basic-bilingual.zip) | [.phps](/code/basic-bilingual.phps)

This release fixes the [disappearing excerpts problem](http://climbtothestars.org/archives/2007/12/18/nasty-problem-with-basic-bilingual-plugin/) (was fixed in 0.31 actually, but I never announced it) and replaces the ugly “language box” floating somewhere near the top of the post admin page by a pretty DBX (let me know what it stands for) box in the sidebar:

Basic Bilingual got a dbx box for the new year!

**[Bunny’s Language Linker](http://wordpress.org/extend/plugins/bunnys-language-linker/) 0.2**

[Download](/code/language-linker.tgz) | [zip](/code/language-linker.zip) | [.phps](/code/language-linker.phps)

(I always want to call it “Language Links”, which was the initial name I chose — still not sure I was right to change.) Anyway, this version is pretty exciting, as it does something I’ve been thinking of for a while: it puts the link to the other localized versions of the page you’re viewing in the menu bar if you’re using a Sandbox-based theme:

Language Linker link in the menu bar!

Otherwise, it puts it at the end of the page in its own div (you can style it the way you wish). I’m not saying this is the best, final solution, but I think it’s headed in the right direction.

Similar Posts:

Bunny's Language Linker: New WordPress Plugin [en]

[fr] Un nouveau plugin WordPress que je viens d'écrire. Celui-ci vous permet de gérer les liens entre pages équivalentes de deux versions linguistiques d'un site. Par exemple, si vous avez http://stephanie-booth.com/en et http://stephanie-booth.com/fr (deux installations WordPress séparées!), le plugin vous aidera à faire en sorte qu'il y ait des liens entre http://stephanie-booth.com/en/about et http://stephanie-booth.com/fr/a-propos.

Ladies and Gentlemen, I’m proud to announce the WordPress plugin [Bunny’s Language Linker](/code/language-linker.tgz) ([zip](/code/language-linker.zip), [phps](/code/language-linker.phps)).

I’ve been wanting to write this plugin for ages, and I’ve finally done it this evening. This is a plugin for people who have a WordPress site with content duplicated in more than one language, like I’m going to have with [stephanie-booth.com](http://stephanie-booth.com). For example, you have an “about” page in English, and another “about” page in German. This plugin helps you create and manage links between such “sister” pages. (“Pages”, not “posts”. It doesn’t work with posts at all.)

The plugin adds an extra field to the page editing form, inviting you to input the *page slug* of the sister page:

Bunny's Language Linker - Admin view

The screenshot is a bit small, but there on the right, there is a little box with “a-propos” — the slug of the French sister page. It works with more than one other language, too. You just need to edit the settings in the plugin file to specify which languages you’re playing with (instructions are in the plugin file). If I had sites in 3 other languages, say French, Spanish, and German, my settings line in the plugin file would look like this:

$bll_other_languages=array(‘fr’, ‘es’, ‘de’);

And the little box would provide three different fields for the page slugs of the different localized sites. (OK, I’m making this sound complicated, sorry.)

The plugin then automatically adds links to the sister pages you’ve indicated. Here’s what it could look like:

Bunny's Language Linker - Page view

There’s a readme file with the plugin which will give you some more details. I’ll soon have a client site in production using that plugin, so if these explanations weren’t very clear, hopefully the demonstration will help.

Similar Posts:

WordPress Deaf to Pings [en]

[fr] Mon installation WordPress semble refuser les pings depuis deux semaines environ. Aucune idée ce qui peut causer ça.

While I’m at it in the “technical annoyances instead of getting work done” department, with the [misbehaving plugin](http://climbtothestars.org/archives/2007/12/18/nasty-problem-with-basic-bilingual-plugin/) and the [Sandbox trouble](http://climbtothestars.org/archives/2007/12/18/wordpress-sandbox-theme-problems/), my WordPress installation has obviously become deaf to pings/trackbacks over the last two weeks.

I can send trackbacks fine, but not receive them. Even from my own blog. I don’t know where to start searching for the problem.

Oh, and I’ve lost the French excerpt to my post [Advisors, Boards, Companies, Partners, Oh My!](http://climbtothestars.org/archives/2007/12/17/advisors-boards-companies-partners-oh-my/) so if you happen to have a cached copy, would you check it out for me, please?

Damn. This morning is not turning out the way I hoped.

**Update, 17:30:** the pings from my most recent post just came through! I’m only running Spam Karma 2 now, deactivated both Akismet and Bad Behavior. Hope to identify the culprit soon.

**Update, 17:53:** now, when I save a post, it sends one ping. If there is more than one pingable URL in the post, I need to save it multiple times. Got bug?

Similar Posts:

Nasty Problem With Basic Bilingual Plugin [en]

[fr] Un problème avec le plugin Basic Bilingual qui fait disparaître les extraits dans "l'autre langue". Je bosse sur une solution (voir commentaires).

Heck. I just spent the last 15 minutes digging through the Google cache to retrieve “other language excerpts” which had been wiped from a good dozen of my recent posts. Not all of them, mind you — almost all of them. I haven’t yet managed to reproduce the problem, but clearly, the meta fields get reset in some circumstances.

I suspect it might be something that has to do with editing posts. Maybe related to the old [disappearing tags](http://climbtothestars.org/archives/2007/11/30/basic-bilingual-03-for-multilingual-blogging/) problem?

In any case, I’m afraid [Basic Bilingual](http://www.hyperborea.org/journal/archives/2007/04/07/when-tags-vanish/) must be misbehaving. Be particularly cautious when editing posts. Let me know if you have the same problem or a path to a fix — I’m working on it now.

**Update:** if somebody has the French excerpt to my post [Advisors, Boards, Companies, Partners, Oh My!](http://climbtothestars.org/archives/2007/12/17/advisors-boards-companies-partners-oh-my/) in their newsreader or browser cache, could you please send it to me or copy-paste it here as a comment? Thanks a lot.

**Update, 17:30:** I think I solved the problem (see comments) and corrected the files available on my server, bumping up the version to 0.31. Please [download the latest version](/code/basic-bilingual.zip) if you’re using this plugin.

Similar Posts:

WordPress Sandbox Theme Problems [en]

[fr] Deux problèmes avec Sandbox: les menus déroulants qui se déroulent décalés sur la droite dans IE, et l'absence de feuille de style pour l'impression. Toute aide bienvenue.

As you might have seen, [Sandbox](http://www.plaintxt.org/themes/sandbox/) is now [my theme of choice for WordPress](http://climbtothestars.org/tags/sandbox/). [Diurnal](http://www.sndbx.org/results/designs/diurnal/), here on CTTS, is built upon Sandbox, and I’m using it with a client to build a new design from scratch. It’s a nice base to work from, in a [CSS Zen Garden](http://www.csszengarden.com/) way.

However, there are problems. Here are two I’m stuck with on my client site. I posted them to the [Sandbox forums](http://www.sndbx.org/forums/), but I thought I’d mention them here in case one of you smart readers had an answer.

1. [No print stylesheet?](http://www.sndbx.org/forums/viewtopic.php?id=221): does anybody have a print stylesheet handy for use with Sandbox? If I can avoid writing one from scratch…
2. [Broken drop-down menus in IE](http://www.sndbx.org/forums/viewtopic.php?id=220): I’m far from a drop-down menu specialist, so I’m not sure where to start to fix the IE wonkiness I’ve noticed. The menus in IE do not drop right below the parent menu as [shown here](http://flickr.com/photos/bunny/1998710028/), but overlap on the neighbouring menu item on the right.

Thanks for any help or pointers you can bring me.

Similar Posts:

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

Here’s the proposal I just sent for [BlogTalk 2008](http://2008.blogtalk.net/) (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: [http://climbtothestars.org/focus/multilingual](http://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](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](http://www.stoweboyd.com/message/2007/11/proposal-for-bl.html) which do not include a paper. We’ll see!

I’ll also be speaking on [structured portable social networks](http://climbtothestars.org/archives/2007/08/16/we-need-structured-portable-social-networks-spsn/) during the workshop on [social network portability](http://webcamp.org/SocialNetworkPortability), the day before the conference.

Similar Posts:

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](http://climbtothestars.org/archives/2007/11/30/basic-bilingual-03-for-multilingual-blogging/), 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](http://www.neato.co.nz/)’s [Inline Tag Thing](http://www.neato.co.nz/wordpress-things/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](http://rmarsh.com/plugins/similar-posts/), 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](http://feeds.feedburner.com/ctts)).

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!

Similar Posts: