Paolo Gabrielli’s Blog

Just another near empty WordPress.com’s weblog. But this is from Paolo ‘pkirk’ Gabrielli.

Archive for May, 2007

Saturday, Metro Olografix Hackin Party

Posted by paolo on 17 May, 2007

At the beautiful Palazzo Sirena, Saturday and Sunday will take place the Metro Olografix Hacking Party. After looking at the abstracts I think I’ll go on Saturday, after the lunch and I’ll come back home before dinner if I don’t meet someone I know or I know someone I meet :)

May the TomTom be with me! Just kiddin: it’s only 90Km south and the road is plain simple.

See you there!

Posted in thinking | 1 Comment »

WordPress plugin for old Permalink

Posted by paolo on 15 May, 2007

Sometime we change the Permalink structure in our WordPress installation but if we live thanks to search engines that bring most of our readers on our site, we’re gonna lost lot of them that will not find what where they looking for.

So I’ve coded a little WordPress Plugin that, thanks to a db query, will check if the post searched is a post that has an old Permalink Structure.

I don’t know why but in WordPress when you change the Permalink structure (Admin->Options->Permalinks) only the option in the wp_options table is changed, without changing the “guid” field in the wp_posts table, so, thanks to that field and this plugin, we can reach an old post.

Limitation:

  • released under GPL, so I can’t take any responsability for any damage et al.;
  • it’s based upon Fabrizio Tarizzo’s Old Plinks Redirects Plugin;
  • it works in my heavily modified WordPress 2.0.5 (not the latest even in its 2.0 branch) so it may take some modifies to work properly on another installation;
  • notable if WordPress is not on the root of the domain it will not work without some little modifies;
  • it will not redirect posts’ comments’ feed but we can work on it;
  • please don’t use it on a production site, or do it at your own risk;
  • even if I’ve changed the priority of add_action() to 0 (zero) I’ve got an “Headers alreay sent error” with another plugin that was echoing a var_dump() between HTML comments (<!– –>);
  • I don’t know how much is the Guid field in the wp_posts table is safe and reliable;
  • I don’t know if there is already a plugin that does the same thing: I’ve searched but nothing popped. If it exists is a lot better than this.
  • If in the meanwhile you’ve changed the categories’ of the post, this plugin will fail miserably.

TODO:

  • Now it doesn’t redirect if we already have an ID but we can save a query if we can also exit the plugin’s code when we are in home (is_home()), in category (is_category()) and so on.

Just drop me a line to have a limited (in time) support or leave a comment here.

Download it here, put it in your wp-content/plugins directory, rename it from .PHPS to .PHP and activate it from the Admin and cross the finger.

Posted in Wordpress, plugin | No Comments »

Joost goes live

Posted by paolo on 1 May, 2007

As I’ve just read on http://www.macnn.com/articles/07/05/01/joost.goes.live/ [via Digg], and tried myself, Joost finally decided to give unlimited invites to existing testers!

So, if you want one… as the previous post… just ask again if you doesn’t have received one because now they are unlimited :P

( Maybe a lot of other people are going to spread Joost, so I’m not going to cry if nobody comments this :D )

Posted in Joost | 30 Comments »