The best Smarty + Zend View Helpers solution!

Tags:

Originally posted in my old blog at My Opera Coming on again with the Smarty and Zend View related articles, let's this time take a look at how to get Zend's View Helpers running with Smarty. Other examples for this that I have seen use a syntax like this: {helper helper=Url p='array(something)' p2=stuff}, which is kind of ugly and the …

Common Zend_Filter_Input problems

Tags:

Originally posted in my old blog at My Opera Zend_Filter_Input, while a very useful component of the Zend Framwork, has some oddities that can cause a lot of headache if you can't figure it out right away. Missing fields show up as valid even if they have validators that won't let empty values through NULL values for existing fields to …

Simple and efficient spam prevention techniques

Tags:

Originally posted in my old blog at My Opera I've previously outlined some alternative methods for CAPTCHA/spambot prevention in Different kinds of CAPTCHA. Josh Clark recently posted Seven Habits of Highly Effective Spambot Hunters which gives even more good methods for preventing spam. But with spambots gaining more and more features, what can we do to effectively prevent them, while …

Handling Ajax requests in the Zend Framework

Tags:

Originally posted in my old blog at My Opera Doing Ajax is quite simple these days with the various JavaScript libraries offering easy ways to do it. But how do you do it on the server side, without complicating things too much? Typically, in addition to the Ajax response, you need a traditional page response to a request as well …

How to make a modal AJAX login box with Mootools

Tags:

Originally posted in my old blog at My Opera Sometimes I've been asked to do a modal AJAX login box for a website. What is that you ask? It's basically what you can do in JavaScript with alert() but with different functionality: If you do alert('foo'), you get a box with text “foo” that you must close before doing anything …

PHP on .NET?

Tags:

Originally posted in my old blog at My Opera Microsoft's ASP.NET has a lot of useful features, things you might want to have in PHP too. But you can't run PHP as a .NET language because Microsoft already has ASP.NET… or can you? It appears that some Czech programmers came up with this idea few years ago and they made …

MacGyver and programming

Tags:

Originally posted in my old blog at My Opera The other day I thought about using MacGyver as an example when talking about programming. Why MacGyver? In the TV series, he builds clever tools from common everyday things. I think this is why MacGyver is a very good programming analogy – in both good and bad.

Preventing cross-site scripting attacks

Tags:

Originally posted in my old blog at My Opera Cross-site scripting attacks, also known as XSS attacks, are a type of vulnerability found in some web sites. For example, if your blog comment box allows users to write JavaScript snippets that aren't escaped in any way by the server and are ran, it's most likely vulnerable to an XSS attack. …