World’s First Internet Explorer 7 Tax

IE7 Tax
Australian online retailer Kogan.com has introduced the world’s first “tax” on Microsoft’s Internet Explorer 7 (IE7) browser.
The new 6.8% tax comes into effect on 13 Jun 2012 on all products purchased from Kogan.com by anyone still insistent on using the antique browser.
“As Internet citizens, we all have a responsibility to make the Internet a better place. By taking these measures, we are doing our bit.”
Good job – someone has to pay 🙂 Nice way of attracting attention and links as well.

Multiline regex search in NetNeans

Recently I needed to remove some old fashioned forms on an old fashioned project – static website with like 200 pages. Each form had a name attribute with value “form1” and varying contents spread throughout multiple lines. The idea was to use NetBeans Project’s Replace feature with “Regular Expressions” checked, to do it quickly like that:

<form name="form1">.*</form>

But it didn’t work. After a short research (still quicker then hand edit these 200 files) it became clear that “dot all” regex piece doesn’t include line breaks. The addition of “(?s)” part that indicates line feeds made it work for me, here’s the final line:

<form name="form1">(?s).*</form>

Few words about legal hacking

If you’re web developer here is a service that will help your ego grow (for better or for worse) and will definitely support your security skills.

Challenges illustrate common vulnerabilities and security holes, they are not really hard to break but some of them are better protected then say UN website, so it’s like real-world hacking, but it’s legal 🙂 Have fun!

How To Use Contao Search Engine

Don’t get me wrong, I think that Contao is a great system, it’s just some of its functions are kinda counterintuitive and search engine is one of them. Furthermore it’s not easy to find clear information as to how it works in later versions of the CMS (in this case I used Contao 2.10.1).

So you have a Contao website that needs search and you know Contao has built-in search engine, you just have to “turn it on”. You check out the official docs and see that there is only one module called Search engine that “Adds a search form to a page”.

Sounds simple, you create the module, put it into your layout or article, go to your website and voila, it works. One problem though, search results are shown right near your search box, which is in most cases not what you want. What you probably want, is a search box on all your pages and a search results page that shows, well, search results – that’s what Google, or say WordPress do.

Obviously Search engine module doesn’t just add a search form to a page, it also shows results, so what we need to do is manually divide the “form showing” and “results showing” parts. Here is how it’s done: Continue reading