My first #Drupal related patch

I’ve recently installed the Corporate Clean theme on ANSOL’s website because of it’s fluid design and top slides.

However, the slides are implemented directly in php code in the page.tpl.php file. I hated that. So I pushed my hate towards a positive result: a fix proposal.

So now you just put some PHP block on the Slideshow region, add a custom field to the pages you want to show up there and use the Summary for the content. Seems simple enough and it’s possible to change the slides without needing direct access to the code, so you can let less experienced people just post content.

Setup front slides feature, new theme and Planet ANSOL

These last few days I’ve added a theme with slides feature to ANSOL’s website, changed the way it did them so it’s much, much more useful, and setup a feed aggregator for ANSOL’s members, that is Planet ANSOL. Read on to know more about what, and how it it changed.

The theme

…is called Corporate Clean, which not only carried a slides feature, but also has a more flexible layout for smaller screens like phones and tablets.

First I tried the default color, but then I changed to warmer colors as it was too cold for my taste, at least, and fixed up the logo which was looking a bit like, well, crap.

Went on to checkout how the slides worked and shrieked… this feature is hard coded on the page template! That will not do. So I hacked it in order to contain a region for the slides, duly called Slideshow, where I would be able to put a block.

Next, I added a custom Boolean field to the Basic and Event pages to mark whether that page’s Teaser/Summary was to be considered a slide. One only has to edit the Teaser/Summary and check the Slide check box by the end of the node edition page.

Finally, I wrote a small piece of PHP code that uses Entity API to query the database for nodes with that field set to true and display it’s teasers in the same manner that the theme had them hard coded.

The result is nice, and now you don’t need to hack code in order to make slides, although they do seem a bit too big to me, but maybe it will work.

The planet

… was very quick to setup with the Views and Feeds modules. I created an aggregation of the blogs I knew some members had, then hammered the view presentation options until I was satisfied with the result.

The main trick is to include all the feed fields you want to use, hide them from visibility and then use a generic text field to display them (using placeholders) in a more adequate form than the default one. Magic!

 

My favorite quote from Frankenweenie, applied to software

Frankenweenie is a very cool movie by Tim Burton, get it, watch it. My favorite quote from it is when the science teacher, Mr. Rzykruski, refutes the scaremongering against science that is launched by the mayor, who was very angry since his boy fell down a roof in a very unwise science project he and his friend were doing.

Ladies, gentleman.
I think the confusion here is that you are all very ignorant.
Is that right word, ignorant? I mean stupid, primitive , unenlightened.
You do not understand science so you are afraid of it, like a dog is afraid of thunder or balloons.
To you science is magic and witchcraft because, because you have small minds.
I cannot make your heads bigger, but your children’s is. I can take them and crack them open.
This is what I try to do. To get at their brains!
Ah, thank you.

This quote always reminds me of how so many people treat computers (well, the software) as some kind of magical thunder or witchcraft balloons and then proceed to make all sorts of bad decisions.

These go from colleagues and bosses to politicians and statesmen (in a generic form, not trying to tie out these roles to anyone in particular, mind you) and often the unwise decisions stemming from this ignorance have very, very bad results like wasting money of bad software solutions just because they have “support” (often so bad that it’s much worse than non SLA bases community support we’re used to on healthy Free Software projects) or stupid, primitive, unenlightened law proposals, some of which haven’t been stopped in time, some of which return in attempt after attempt like zombies from a B movie.

How can we fix this? Sigh.

4 (out of 5) ssh security tips

There are some security tips for your sshd_config at http://www.debian-tutorials.com/5-steps-to-secure-your-ssh-server however the third one, Change the SSH Port on the server, is a lot of hot air.

“By changing the default port you will make SSH server more secure. By changing the default port you will reduce the amount of brute force attacks.”

Only the second phrase of this statement is truthful, but still, not by a wide margin…

Security by obscurity never works, it’s better to follow the other 4 advices and use fail2ban or something similar.

Illegal procurement favouring #Microsoft in Portugal killed in the courts

PR_ESOP_2013-04-24_Processo_CM_Almada

Straight from the press release, ESOP, a Portuguese association of open source companies, challenged in the Fiscal and Administrative Court of Almada, a public procurement, 31A2012 for licensing and maintenance of Microsoft software, launched in September, last year, costing about 550.000,00 €.

The court decided it was indeed illegal and decided in favour of the accusation.

This is the first judicial decision on this subject matter in Portugal, and it found it was illegal to purchase licensing of software this way, in spite of numerous alerts and complaints by ANSOL and now ESOP as well.

The full press release is attached to this post.

This is huge!

Humour: Internet connected operating systems and sex

This one is on me, and here it goes:

Using computers connected to the Internet may be a bit like going around looking for sex.

Using Microsoft Windows is like going to parties and have sex with a lot of really interesting people… without protection. You either get pregnant, a disease or both. Except in real life you can’t start over from scratch.

Using Mac is like paying for grade AAA hookers. You can still get pregnant or a disease, but you’ll just say it’s a very random bad luck case. Except in real life you can’t claim your warranty in order to get a replacement. If you’re lucky to know you have two years rather than one, you’re living in the EU.

Using GNU/Linux is like having a loving, sexy and trustful partner. Even if you don’t have a lifelong relationship, you know your next one will be as loving, sexy and trustful. And you can get to know all about them.

That’s about it for my humour today 🙂

Which of these two *had* 3D acceleration?

So, can you guess which of the following two phones, a Tizen dev phone and an Openmoko Neo Freerunner (in practice a dev phone too) has or ever had 3D acceleration?

image

The one on the right never had 3D acceleration since it was made in 2008 (would require an unavailable blob, but it neither had the bandwidth for that), while the one on the left actually cam with 3D acceleration but lost it after flashing an upgrade image and there’s no legal way to get it back.

So… what happened? I found out that on June 13th a Tizen update was published. I hoped it would fix the phoning issue, making it finally possible to make calls (hint, it doesn’t solve that issue either), so I flashed it (it was a pretty easy and painless flash).

Reboot and… What.The.Hell? It was now very slow, almost as slow as the OpenMoko’s interface. There’s is no warning anywhere near that image, and being development snapshots I would expect a problem or two, a fix or two, etc… but not this… oh no… not this…

Apparently, the ARM Mali graphics chip that is inside requires distribution only with the hardware, no software distribution.

As such, no Tizen update can be installed without actually crippling the phone’s performance, and now I have no legal manner to get the driver back into the phone.

Knowing this, like Samsung must have known, the least Samsung should have done is keep a separate partition with the driver which would be mounted on system startup, thus providing the driver to any software update that they publish.

But oh no… that would be, what… too much trouble? Nobody would notice the performance loss?

Here goes another #facepalm moment!

image

I guess all that remains is try to boot from SD, if that is possible, then maybe one can setup an OpenEmbedded profile and perhaps get a real development platform for the phone.

One can only dream… but… this Tizen 1 dev phone looks more and more like a brick. Maybe it’ll be a shiny paperweight soon.

Which of these two can make calls?

So, can you guess which of the following two phones, a Tizen dev phone and an Openmoko Neo Freerunner (in practice a dev phone too) can make and receive calls?

image

The one on the right has been able to make calls since I received it in 2008 (albeit without buzz only after one year after a hardware patch performed by my heroes at TuxBrain at DebConf 9), while the one on the left, doesn’t even detect the SIM card.

The one on the left is made by a very successful phone maker with deep pockets, Samsung, while the one on the right was made in 2008 by a small company that had more will than capacity to do a great phone, OpenMoko, and still today carries my personal SIM with which I call and get calls from people, using a truly community built distribution based on OpenEmbedded called SHR.

This was my first #facepalm moment with this device with which I was very excited and had lots of expectations.

image