The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi, I need an advice how to hide header of the forums if they are loaded in an iframe. What I need is:
- use iframe to show/embed forums on one website, let's say www.website.com/en/forums - but if the forums are loaded as an iframe, hide its header/logo. The reason is I do not want to show two logos (one in website header, the second from forums) The header template has following code: Code:
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else /> </if>
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
$ad_location[ad_header_end]
Code:
<script type="text/javascript?>
isInIframe = (window.location != window.parent.location) ? true : false;
if (isInIframe){document.querySelector( 'body table' ).remove();}
</script>
Regards |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|