If you have a script to block the iframing capture technique, the Theme Preview (I think it uses thickbox) doesn't work.
Does any elegant idea?, by checking referer perhaps?
S!, srry lang.
If you have a script to block the iframing capture technique, the Theme Preview (I think it uses thickbox) doesn't work.
Does any elegant idea?, by checking referer perhaps?
S!, srry lang.
Ok, my solution in case someone needs it:
<?php
// Comprobamos el referer para no bloquear el preview de themes propio:
if ( isset($_SERVER['HTTP_REFERER']) && '' != $_SERVER['HTTP_REFERER'] )
$realReferer = parse_url($_SERVER['HTTP_REFERER']);
$selfReferer = parse_url($siteurl);
//DEBUG: echo $realReferer['host'] . ' = ' . $selfReferer['host'];
if ($realReferer['host'] != $selfReferer['host']) :
?>
<!-- Prevent your web under iframes -->
<script type="text/javascript">
//<![CDATA[
//DEBUG: alert('No frames active.');
if (self.parent.frames.length != 0)
self.parent.location=document.location.href;
//]]>
</script>
<?php endif;
Hope it is useful.
S!
This topic has been closed to new replies.