Archive for the 'website' Category

WordPress and daylight saving

WordPress has a wonderful feature: instead of providing a timezone where you live, you tell it how much hours your local time differs from GMT. Which just fails when dealing with daylight saving.

And I just noticed that my setting was still 1 hour, instead of 2. I remembered to change time on my wallclocks, mobile phone, but I forgot my blog... But changing that will change it only for future posts and comments.

So, for people who forgot like me, here are two SQL queries to fix the database:

update wp_posts set post_date = convert_tz(post_date_gmt, 'GMT', 'Europe/Paris'), post_modified = convert_tz(post_modified_gmt, 'GMT', 'Europe/Paris');
update wp_comments set comment_date = convert_tz(comment_date_gmt, 'GMT', 'Europe/Paris');

Don't forget to replace Europe/Paris with whatever your timezone is ;) . Note that this will require you to run, if you've never done it before, something like
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql

2006-06-25 22:39:02+0900

p.d.o, website | 2 Comments »

Anti comment spam measures

In the past months, I was getting more and more comment spam. Even though the configuration was set to moderate comments containing a link. It was a good filtering measure at the beginning, but became less and less handleable. When I decided to act, I was getting more than a hundred comment spams in my "Awaiting moderation" list. Per day. Maybe even more, I can't remember. And about the same amount were actually able to go past the moderation filtering, by not putting links in the comment itself, but in the homepage field of the comment form.

While wordpress' comment moderation interface is pretty efficient at deleting a lot of spam, the comment management interface just sucks, even in the "massive editing" mode. So, after having spent quite some time in this sucky interface, I decided I didn't want to resort to it any more.

First I had to remove all these comment spams. I had to use use the SQL delete command myself, since WordPress is useless. I basically deleted all comments posted after the last real one I saw. Sorry if someone posted one I didn't see. The tricky part was that the comment count for articles is kept in a field of the wp_posts table. Which means there was a difference between the actual comment count and the count displayed. For those who'd want to do the same at home, here is the magical SQL query to refresh the comment count:
update wp_posts set comment_count = (select count(*) from wp_comments where comment_post_ID = id and comment_approved = '1');

Next step was to avoid getting more spam. I didn't want to use captchas or any turing tests, because they basically all fail to be accessible in some way. So, I took a balanced decision. While I appreciate to get comments, I can't stand any more the spam that get in posts as old as the blog. The best thing to do then, I think, was to allow comments on recent posts only. Sorry for those who'd like to comment on old stuff, but being able to comment on the newer posts is still better than nothing. I also kept the link moderation policy, which seemed to be helpful at the beginning.

For the little story, again, WordPress was not very helpful, so I had to resort to an SQL query to close comments on all the posts.

It's been 3 weeks or so, now, since I switched to this new policy. I got only 1 spam to moderate and none directly in the comments. Let's hope it will last.

2006-06-25 20:27:18+0900

p.d.o, website | 6 Comments »

What kind of language is that ?

Consider the following code :


for (var i = 0; i < 20; i++) {
var j = i;
}
alert(i + ' ' + j);

That's javascript. It gives "20 19". Would you expect that from a decent language ?

Update: Same result with a var j = 0; before the for loop. No surprise, actually.

Update 2: It seems what I'm complaining about has not been well received ;). I'm not complaining about the values, I'm complaining about the fact that there are values...

2006-03-11 19:20:42+0900

p.d.o, website | 7 Comments »

Upgrade

I just upgraded to WordPress 2.0. The change in the backend is really impressive, and the upgrade very easy.

I still should spend some time with the custom theme, though...

2005-12-31 07:45:30+0900

p.d.o, website | Comments Off on Upgrade

This blog is worth…


My blog is worth $0.00.
How much is your blog worth?

How surprised am I.

2005-11-22 19:01:33+0900

p.d.o, website | Comments Off on This blog is worth…

It’s been a while

... since I last posted. And we got quite some changes around here.

First, on the real life side, I got married almost 2 months ago.
I met my wife in Japan, and guess what ? she's japanese. Her name is Miki (美希), and she is the most wonderful woman I've ever met. She's been learning french for a month now, and she often surprises me with all she already can say in french.

We are now living together in Colombes, not very far from Paris, and I'm still working for British Telecom in La Défense as an application server expert engineer (buzzwords detected). Finding a flat has been quite a challenge, considering how real estates are expecting you to have a stable and huge income, meaning it's quite hard to get something during your "trial period", which, when you start working as an engineer in France, lasts 3 months (and can even be reconducted for 3 more months). In fact, we got the flat a few days before the end of my trial period because it was almost done ; and actually moved in after it being theorically done. Theorically, because it has been reconducted, but the real estates didn't have to know ;). Anyways, now, it is finally over.

I've been offline quite a lot these last months, because of 1. being stuck in a place without net access (which appeared to be wrong, there was an open WiFi access point with ADSL access in the neighbourhood, but I got my laptop back quite late to figure out), and 2. because of Wanadoo (my ADSL provider) and France Telecom being lame and taking a month to configure an ADSL line... and making me pay for it while not having any access, but this story is not over yet...

Anyways, glandium.org has been migrated to my 3 years-old Vaio laptop behind this ADSL connection, and the site has switched today to a mix between the "old" RDF driven site and a WordPress powered blog. I'm hoping to have my own tool some day, but in the meanwhile, I chose to use WordPress. I gave a try to Dotclear, but support for multiple categories is lame, category hierarchy, not supported, and english support has to be done by hand by creating a custom theme.

I created a lame theme which tries to look like what it used to be with the old RDF driven site (WordPress theming just sucks. Truth is Dotclear is not much better). I must say i didn't put much effort in the comments stylesheet (actually, no effort at all).

So here is an almost new glandium.org site, which, I hope, will improve in the future (but Miki won't like it if I spend too much time on it, so it will take time).

On the Debian side, I managed to upload Firefox Deer Park alpha 2 into experimental a while ago, plus some other updates to my packages in unstable. Some more will be coming soonish (same as above, it might take more time than expected ;) ).

2005-08-13 10:02:00+0900

firefox, me, website | 2 Comments »

CSS power

If you came around recently, you probably noticed some changes in the look and in the amount of information on the home page. It is now globally in its final state.

A very few changes have also been made in the XHTML structure, these changes involving grouping the blog entries and the "as seen elsewhere" briefs in a "blog" div, moving around the date and the subject of blog entries, and replace links on briefs titles by a "Read more..." link.

As for the content, the home page must avoid to be heavy, so I removed a lot of stuff, put only one blog entry (and cut it if it's too long), 3 briefs and drastically reduced the amount of Releases, Articles, and ToDo List items.

The CSS, on the other hand, got a lot of changes, starting with a split of the stylesheet in several files. Some other changes involve bigger default font sizes, and a proper styling of most of the html elements in the page (much more were left with default style, previously). <teasing>I'm working on a better visual experience (which will probably render pretty bad in MSIE), all of which will happen without touching a single line of HTML code. I'm myself impressed by the result ;)</teasing>

The XSL stylesheets also got its load of refactoring, by splitting in smaller individual units, and its improvements such as adding ids in the blog so that the links to the blog entries on the home page go directly to the right item. Next step there will be to improve the RDF parsing.

Next global step for the site will be to have more subsections and pages. Stay tuned.

2004-11-28 02:21:42+0900

website | Comments Off on CSS power

RDF power

This is it. Now the main page is generated by treating 5 different RDF files through one XSL stylesheet. The power of XML to serve !

Next step will be to stop generating one flat page for everything and begin to split the whole in categorised parts, and actually make the navigation menu worth something, while improving the visual.

Stay tuned.

2004-11-21 21:38:31+0900

website | Comments Off on RDF power

Adding some style

Here we have the basics of the new design. Except adding some ids to the XHTML code, everything has been done without touching it. That's the power of CSS.

There are a lot of improvements to do, like avoiding overflow on the right, adjusting fonts, colors, add some graphics, but it's still better than the raw thing that used to be here until now.

I'm also working on the backend side, all in RDF. For now, it has some semantic flows, and I still haven't written all the XSLT stylesheets to transform it into XHTML, but that might come soon.

And if I find enough motivation, I'll publish some documentation about how all that has been made and works.

2004-11-14 23:42:32+0900

website | Comments Off on Adding some style

Welcome back

For now, this is a raw hand-written version of the web-site. It switched from mostly a combination of french and japanese to english, but some french and japanese might appear soonish, and from an XML-based xml-dtc powered kinda blog to an XHTML-based vim-powered ... thing, without even a CSS stylesheet. That will also change in the future, as soon as I'll settle myself on how to organize the whole stuff.

Keywords will be : XML, RDF, XHTML, CSS, Semantics, Debian, Life, the Universe and Everything.

2004-11-12 14:41:23+0900

website | Comments Off on Welcome back