SSI includes and target=" "

Started by iAcademia, April 20, 2008, 07:31:04 AM

Previous topic - Next topic

iAcademia

Hey, Im using a few SSI includes, for example, 'login and register', and 'whos online'.

Login and register
<?phpif ($context['user']['is_guest'])   {      echo '', $txt['welcome_guest'], '';   }else   {      ssi_welcome();   }?>

Whos Online
<?php ssi_whosOnline(); ?>

Now, at the moment my website is hxxp:www.iacademia.org/index.php [nonactive]
If I wanted to open these SSI includes (I mean these SSI includes have hyperlinks in them) into another target window, such as an iframe, or a _blank page, how would I go about doing this?

Example:
Login and register both are hyperlinks, yet if I click on them, they will take me away from hxxp:www.iacademia.org/index.php [nonactive] and take me to hxxp:www.iacademia.org/forum/loginwhatever.php [nonactive]

I want it either to open in a target window of _blank, or perhaps an iFrame if I decide to set it up as an iframe.


I'm clueless..

Thanks mates

Kindred

1- you would have to modify the function in ssi.php
2- do not use an iframe.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

iAcademia

// Display a welcome message, like:  Hey, User, you have 0 messages, 0 are new.
function ssi_welcome($output_method = 'echo')
{
global $context, $txt, $scripturl;

if ($output_method == 'echo')
{
if ($context['user']['is_guest'])
echo $txt['welcome_guest'];
else
echo $txt['hello_member'], ' <b>', $context['user']['name'], '</b>', allowedTo('pm_read') ? ', ' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] == '1' ? $txt[471] : $txt[153]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == '1' ? $txt['newmessages0'] : $txt['newmessages1']) : '', '.';
}
// Don't echo... then do what?!
else
return $context['user'];
}


Is this the chunk of code your talking about? How would I go about putting in a target ?

Kindred

the same way you would in any other html code... you add target="_BLANK" in the <a href...> tag
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

iAcademia

Ah! Lol I shouldve peered closer into the code.
Thanks for your time!

Advertisement: