Last modified: 2014-11-17 10:35:38 UTC
Install [[mw:Extension:RandomSelection]] on portuguese wikipedia. Consensus [[w:pt:Wikipédia:Esplanada/propostas/Adicionar extensão para exibir conteúdo aleatório (22fev2011)|here]].
It disables the cache (preferable to give a short cache time), doesn't pass frames. That preg_match_all looks ugly, but wouldn't probably be run too much.
We are planning a collaboration campaign that will use random banners on the SiteNotice, and it will be used in some portals to generate random images and other contents.
Any extension that generates random content, will unacceptably break the cache. The best way to create a random selector without breaking the cache would be to write a JavaScript (gadget).