io uso questo:
Codice PHP:
<script src="gallery.js"></script>
[url="javascript:gallery('/img_grande/img.jpg')"][img]img.jpg[/img][/url]
il codice del file 'gallery.js' è invece questo e puoi modificarlo come ti pare. io ad esempio al suo interno ho inserito un iframe che visualizza un banner sopra la foto grande
Codice PHP:
function gallery(url){
var w=window.open('','','resizable,status,scrollbars,width=700,height=500');
var d=w.document;
random = parseInt(Math.random()*1000) ;
banner = '<iframe src="http://www.sito.it/banner_468x60.asp" width=468 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>
';
var c='<html>\n';
c+='<TITLE>ZOOM</TITLE><base target="new">\n';
c+='<META HTTP-EQUIV="imagetoolbar" CONTENT="no">\n';
c+='<style type="text/css">\n\n</style>';
c+='<body bgcolor="white"><center>' + banner + '\n';
c+='<center>[img]' + url +'[/img]
<font face=tahoma size=2>[b][/b] ' + '
<font face=tahoma size=1>
\n<span class="chiudi"><a onclick="javascript:window.close()"><span class="chiudi"><INPUT TYPE="SUBMIT" VALUE="Chiudi Finestra"></a></span>
\n';
c+='</html><NOSCRIPT>\n';
d.write(c); d.close(); }