Rant of angryness

Emulate the CCK form validation process for a given field

Something that you may need to do one day or another is validating a custom form field value as if it was a Content field existing value, outside of the node form context.

There is something quite sad about Content module, that is the API does not seems (in Drupal 6, at least, I'm awaiting for a lot of improvements in D7 Field API) to expose any function for manual field validation. The whole process of validation goes through the numerous iterations in node_form and in hook_nodeapi() content module's implementation.

I found a way, quite ugly, but tested and working, let's analyse the following code (comments are inside the function)...

Aucun vote pour l'instant.

Le spam traduit en français du jour

Celui là me faut beaucoup rire :

Solution pour le problème de mâle délicat

Notez que j'ai volontairement mal placé le mot "délicat", je trouvais ça beaucoup plus drôle dans ce sens là.

Votre notation : Aucun Moyenne : 3 (1 vote)

Le spam traduit en français du jour

À partir de ce jour, j'ai pris la décision de traduire, régulièrement, un spam reçu sur une de mes boites mail en français. Le mail du jour est :

Les légendaires pillules sexuelles en ligne.

Bien que dégoûté d'en recevoir autant, environ une cinquantaine par jours, dont seulement 3 ou 4 d'entre eux passant mon spam assassin, je dois avouer qu'il me font parfois bien rire.

Votre notation : Aucun Moyenne : 4.8 (4 votes)

WTF is that!? - PHP will drive me crazy; Drupal FAPI too!

What do you think this code will output:

<?php
  $foo
= '7rray';
  echo (int)
$foo;
?>

If you answered NULL, 0 or '7rray', you're absolutely wrong. The magic with PHP is whatever you use (int) or intval() you get absolutely weird results, because it'll try to parse your string as an integer whatever is in it.

Aucun vote pour l'instant.

How to get rid of intrusive Ubuntu's Notify-OSD

Some people like Ubuntu's Notify-OSD deamon, because black bubbles are good looking; but in everyday's life, these are so intrusive that it becomes really anoying.

Aucun vote pour l'instant.