brain tags Je Maintiendrai

Posts from January 2004

Movistar GPRS

As everybody knows, WAP is not the mobile killer protocol, nor will it ever be. However, it has its uses. I use it for example to consult my bank account when I’m on the road.

For Telefonica — the Spanish phone monopolist — WAP also has its uses, since they offer Emoción; WAP-based services of which some bring in some money for every minute it is used. The thing I never understood is that they sell packages with modern phones like my T200 with badly configured WAP access. If it doesn’t work directly, many people won’t try it again!

The case is that the phone comes preconfigured with WAP over GPRS, but to use GPRS you’ll have to buy a separate contract or pre-paid card, which nobody does. But Telefonica finally got smart. Saturday, when I was taking a beer on a sunny terrace I suddenly noticed a new icon on my phone’s screen; I had GPRS access!!!

Of course I immediately changed my WAP configuration and tried it out. I surfed around in WAP space a little, until I came to my own WML feed, which failed miserably. One more point on my todo list…


Mobile posting with Mfop2

Using the service from Mfop2 I am now able to post my messages from any place I want. All I have to do is send an e-mail (including images if I want) with some special fields to Mfop2, and it will automagically appear on my site!

Now that I have my GPRS connection activated on my cellphone, this means that I can even do this from my phone.


MT update breaks validation

Today version 2.66 of Movable Type has been released, which addresses amongs others some of the comment spam issues.

I installed the update, and wrote a test comment to see how it works, but the entry did not show up anymore. Mozilla told me that there was a XML parsing error, and since I am serving my pages as application/xhtml+xml, Moz did not parse the page at all. I quickly changed my server settings so that my pages are served as text/html, and looked into the code.

The problem is that MT is now using a proxy script to link to the sites mentioned in comments, so spammers do not receive any ‘Google Karma’ by posting comments. The problem lies in the use of & in the URL, while they should have used &. For example, a link to this site appears as:

http://jeroensangers.com/cgi-bin/mt/mt-cmts.cgi?__mode=red**&**u=http%3A%2F%2Fjeroensangers.com%2F"

while they should have used:

http://jeroensangers.com/cgi-bin/mt/mt-cmts.cgi?__mode=red**&**u=http%3A%2F%2Fjeroensangers.com%2F"

I did a quick search in the new files, and found the error in the file lib/MT/Template/Context.pm at line 1189. Just add 4 characters, and MT produces valif HTML again.

[Update 2004.01.16]: Six Apart published MT version 2.661 to fix this problem.


2k4

Happy 2004!!!!

I am absolutely sure that this year is going to be a fabulous year. And with a new year come resolutions. Now I think that this is something crazy, because you can make your resolutions any day you want, and don’t have to wait for new year. The past period I made some resolutions in my mind and already started working on some, but nevertheless I will post them today:

  • learn to speak Spanish;
  • say “ja”;
  • call old friends;
  • finish work in the house;
  • be less afraid of risks;
  • think about the future;
  • spend more time in the nature;
  • learn to program in python.


A new computer

After 7 years of intensive use, time has come to say goodbye to my old PC. It simply has too much technical problems: I assume problems with the power supply, the memory and the CPU! As a result, my screen freezes frequently — usually when I am using Microsoft software.

So last Saturday I took the step and ordered a new PC. Just like the one I have now it is a low-budget (€500) white label box, which I hope will also last the same number of years. The box I ordered has the following specifications:

  • Intel Celeron 2,4 MHz
  • 512Mb RAM
  • 80Gb Hard disk
  • DVD player
  • DVD/CD-RW writer


Screendump

screendump

A small experiment to start the year ;-)

I installed SnagIt on my computer, which I configured to upload each 30 minutes a screendump of my desktop. Now everybody can see what I am doing during the day. As soon as I have a more powerful computer at home, I will do the same from there.


CeBIT

I am going to the CeBIT!

This year will be the first year that our company will have a stand at Europe’s biggest technology fair in Germany. And I can tell you that it takes a lot of work to organise everything. As we are a do-it-ourselves shop, I’ve had many meetings in which we were making sketches for the stand, writing texts for press announcements and thinking about all details involved in this project.

At this moment we are finishing the product catalogue, which is being translated into English and German. Our main interest is finding new European dealers for our software , but in case end-users visit our stand, we have some Dutch and German dealers present to help them with a complete solution.

We still have a lot of preparations to do, but I am sure that we will be able to make some impact over there. For those readers who are going to visit the CeBIT this year: you can find us in hall 1, at stand 7N8.


MT does not Remember personal info

When entering a comment in a Movable Type powered site, a radio button is available telling you that it is going to ‘Remember personal info’. However, sometimes when you come back to the same site and want to write another comment, all fields are empty. Your personal info has not been saved… :-(

The problem I described above appears regularly on the Movable Type support forum, and since the answer is always the same, I created this explanation, so I only have to point here to answer the question.

First a small explanation on how the system is supposed to work. If you enter a comment and select the ‘Remember personal info’ radio button, your name, address and URL are stored in a so-called cookie on your computer. This cookie contains the domain of the site, the directory for which the cookie is valid, an expiration date, and of course the stored value. For example, if I post a comment on an entry of this site, a cookie with the name mtcmdhome will be created with the following information:

Name: mtcmdhome
Content: http%3A//example.com/
Domain: .jeroensangers.com
Path: /
Expires: 28-01-2005

This will make sure that the URL I entered (http://example.com/) will be stored for one year, and can be used by any page on the .jeroensangers.com sites.

MT sets this cookie using JavaScript, which you can find in the Individual Entry Archive template. You can find this script at line 29 of the default template.

By default, the script does not specify a path for the cookie, so that the cookie is stored using the path of the individual entry page. So the cookie of this page would only be valid for pages in /archives/2004/01/mt_does_not_remember_personal_info, which is only one page. Since the cookie is not valid for my other pages, the details I filled in when commenting on this page won’t show up in other pages. Note that the default MT installation places all archives in a single directory (e.g. /archives), so this problem does not appear.

If you do place your archives into different directories, you’ll have to need to adjust the JavaScript in the template to fit your situation. The key is that you need to specify the directory for the cookie depending on the set-up of your site. If you have your own domain like I have, you can set it to ‘/’ to be valid for the whole domain. If you use a directory on the domain of your provider (e.g. http://example.com/username/), you can set it to ‘/username’.

To set the directory for the cookies, edit the functions rememberMe and forgetMe in your template. The location for the path has to be inserted between the two apostrophes before HOST. The original code is:

function rememberMe (f) {  
  var now = new Date();  
  fixDate(now);  
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);  
  setCookie('mtcmtauth', f.author.value, now, '', HOST, '');  
  setCookie('mtcmtmail', f.email.value, now, '', HOST, '');  
  setCookie('mtcmthome', f.url.value, now, '', HOST, '');  
}
function forgetMe (f) {  
  deleteCookie('mtcmtmail', '', HOST);  
  deleteCookie('mtcmthome', '', HOST);  
  deleteCookie('mtcmtauth', '', HOST);  
  f.email.value = '';  
  f.author.value = '';  
  f.url.value = '';  
}

The code for http://example.com/username/ becomes:

function rememberMe (f) {  
  var now = new Date();  
  fixDate(now);  
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);  
  setCookie('mtcmtauth', f.author.value, now, '/username', HOST, '');  
  setCookie('mtcmtmail', f.email.value, now, '/username', HOST, '');  
  setCookie('mtcmthome', f.url.value, now, '/username', HOST, '');  
}
function forgetMe (f) {  
  deleteCookie('mtcmtmail', '/username', HOST);  
  deleteCookie('mtcmthome', '/username', HOST);  
  deleteCookie('mtcmtauth', '/username', HOST);  
  f.email.value = '';  
  f.author.value = '';  
  f.url.value = '';  
}

After making these small changes, the cookie is valid for your whole site, and the details filled in when creating a comment show up on all the pages.