FREN

Garoo


18 mar. 2004

New gadget on the blog: a live comment preview (via Binary Bonsai).

I’m out of time to finish the script because I must go to the supermarket, but it works. Ah, regexps…

Besides, it makes me want to edit my code so that simple HTML tags are accepted in comments. Well, it’ll keep me busy for an hour or two.

P.S. There you go. Simple tags are accepted (<b>, <i>…) but I failed to configure the regexps right for <a href>, so we’ll see about that later. It’s already something. And it’s nice. I find it so cute to see the little bit of text below the form being updated while I type.

And I did write <b> and <i>, not <em> nor <strong>. I’m not using those because I think they’re absurd (when you want to write in bold, you mean to write in bold, not to write “strong”), so I’m not going to let you use them here when you have no control over stylesheets and the definition of <em> and <strong>.

P.S. By popular request, I added a checkbox to deactivate the preview if it’s too slow on your computer. The option is saved in a cookie.

Want to know when I post new content to my blog? It's a simple as registering for free to an RSS aggregator (Feedly, NewsBlur, Inoreader, …) and adding www.garoo.net to your feeds (or www.garoo.net if you want to subscribe to all my topics). We don't need newsletters, and we don't need Twitter; RSS still exists.

K.I.T.T., 8 years ago:

Ben c'est pour tester le nouveau gadjet

K, 8 years ago:

A propos des commentaires, les afficher en side-bar est du plus mauvais goût.

Monsieur, votre blog ressemble à un joueb.


(Et ton gadget ralentit sensiblement le délais entre le moment où je tape sur le clavier et celui où le caractère s'affiche à l'écran. C'est bâclé.)

garoo, 8 years ago:

Tu dois avoir un ordinateur et/ou un browser de merde.

pwyf, 8 years ago:

j'en profite pour demander : tu publies quelle proportion des commentaires ? en fait, combien y a-t-il de commentaires qui ne collent pas à tes exigences ? et, es-tu tenté de ne pas publier ceux qui, sans être une attaque perso, sont dénués d'intérêt ?

ça me turlu-pine depuis que tu as mis en place ce système.

whore, 8 years ago:

Je voulais voir à quoi ça ressemble. J'ai l'impression d'être dans un film, où il y aurait un léger décalage entre les lèvres et la voix off.
Génial.

garoo, 8 years ago:

MDR. Vous avez tous des ordinateurs anté-diluviens ? Chez moi c'est immédiat. :)

Pwyf : je ne décide pas de l'intérêt des commentaires (sinon, y'en aurait pas mal qui passeraient à la trappe). Les seuls commentaires que je ne valide pas sont ceux des deux ou trois personnes blacklistées à vie, plus ceux qui sont totalement hors sujet.

Talae, 8 years ago:

Moi aussi je veux tester :) Ah oui, ça marche. Et ça rame pas du tout. Pourtant mon ordi est pas un foudre de guerre.

A. L., 7 years ago:

Tiens, avec du retard : pourquoi pas strip_tags($chaine, '< a >< b >< em >'); ?

garoo, 7 years ago:

Euh, parce que j'ai jamais fait attention à l'existence de cette option.

Mais tant mieux, j'aurais dû virer la prévisualisation si j'avais utilisé ça.

Legal information: This blog is hosted par OVH, 2 rue Kellermann, 59100 Roubaix, France, www.ovhcloud.com.

Personal data about this blog's readers are not used nor transmitted to third-parties. Comment authors can request their deletion by e-mail.

All contents © the author or quoted under fair use.