Opera 9 has added a solid ad banner blocker, under the guise of a generic "content blocker". (This indirect name is presumably only there to keep a good corporate image.) To block an ad (either an image, frame, or Flash animation), right-click an empty spot on the page and choose Block content. Then, simply click the banners which you want to block. When finished, click Done in the pseudo-toolbar that appears at the top of the page.
By default, this tries to use some logic to block all ads from the source, but this may sometimes be overkill. To correct this, click the image again (to unblock it), then Shift-click it. This will add only the specific image to the filter list. This filter can then be broadened by clicking Edit.
A filter will typically contain asterisks ('*'). These mean "any number of any characters", much like in filenames for operating systems.
For more information, go to the BlockAdvertisements page.
The following are pre-Opera 9 techniques for blocking ads. Needless to say, they are now completely unecessary as compared to the Opera 9, they are cumbersome interfaces to the a configuration file. Nevertheless, these are useful examples of techniques for extending Opera.
Opera has the ability to run external programs and scripts and pass various information to them from Opera commands. One use of this is to pass the address of an advert or other content that is annoying you to such an external tool and it can then edit a UserCSS file automatically and add in the advert to a blocklist. There are currently three flavours to this: the first using the large and powerful Python, the second the tiny Lua environment and the third a C++? executable (which means it does not need any additional libraries to be used). See these pages for more information: