

Bueno, allá por el 2005, cuando empecé a escribir este blog (después de haber dejado atrás el blog de EBK que tenía en Serendipity), elegí Drupal como opción porque entonces creía que era el CMS más potente que había (y lo era). Wordpress estaba siendo el motor para blogs más popular, pero aun así Drupal se veía como la mejor opción.
Cinco años después creo que no hay color. Cada vez que tengo que escribir algo en este blog me da mucha pereza, sobre todo porque poner imágenes y demás historias es un poco engorroso. También tener el CMS al día es más complicado, ya que Drupal todavía no dispone de ningún sistema de actualización automático.
No obstante, sigo pensando que Drupal es el mejor CMS para comunidades como spaniards.es. Pero para blogs, creo que Wordpress está hoy día a años luz de los demás. En cuanto tenga un rato, lo cambio.
It's been a few years I would say since some blogs implemented this random jumping functionality. It is not very useful, but it's fun and sometimes very handy when one is bored. Wikipedia has it, very popular blogs like Microsiervos have it... It is small, simple and fun.
Still I had never used it on my blogs. This morning, don't ask me why, I decided to implement it, which on Drupal becomes a very simple task. Let's see. In order to implement this functionality we need:
Both tasks are very easy in Drupal, if you are using Primary Links Menus and Page nodes. Now, let's see what the new page node has to do:
The two first tasks can be done on a single query using the MySql function Rand(). Also we can limit the query to return only one node. Next we redirect to the new done. Finally, we abort the execution of the page with an exit() call. This will indicate Drupal it doesn't need to keep generating and formatting the new random page, since the user will never see it actually. Here is the code:
Few days ago I installed a new Trackback module for this blog (Drupal doesn't support trackbacks by default). But today I just realized how spammed my blog had gotten in just a few days. I have just deleted more than 7000 fake-trackback-spam-entries.
Despite the trackback module has some anti-spam measures, like verifying the original link on the other website, I think it is not worth to have all that overload on the server. So I have removed the module. No more trackbacks!
I wanted to have a very simple archive page for my blog, but I didn't want to install any extra modules. So I just wrote this code:
You can see the result here.
Sometimes people ask me about some stuff I have done on my Drupal sites, like this blog or Spaniards.es. I was just updating the Popular items page and I thought it would be nice to paste the code here. After all, is very simple, but still it may help newbies :)
PS: This doesn't follow Drupal's standards.
Recent comments
2 years 4 days ago
2 years 1 week ago
2 years 1 week ago
2 years 2 weeks ago
2 years 5 weeks ago
2 years 8 weeks ago
2 years 9 weeks ago
2 years 10 weeks ago
2 years 11 weeks ago
2 years 11 weeks ago