TinyPortal
Development => Support => Topic started by: wdm2005 on August 13, 2007, 08:19:14 AM
hi ive just created a custom action for my top sites and when iu click on a link it open in the same page i have read about this befor but i am unable to figar it out can someone help me please here is the code im using
<?php
// Version: 1.1.1; topsites
function template_main()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="', $scripturl, '?action=search2" method="post" name="searchform" id="searchform">
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td>', theme_linktree(), '</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>topsites</td>
</tr><tr>
<td class="windowbg">';
// load the topsites
echo '<center><iframe width="1100" height="1500" src="http://waynesworld.kicks-ass.net/topsites"></iframe></center>';
echo '
</td>
</tr>
</table>
</form>';
}
?>
thanks in advance wdm2005
when you click in the Iframe or outside of it? regardless you need to add target="_blank" to the <a href="link"> text</a> like this <a href="link" target="_blank"> text </a>
if its your iframe links than you need to edit the code on that site with the proper link structure to get it to open in new windows or tabs.