TinyPortal

Development => Feedback => Topic started by: technodragon73 on January 21, 2006, 11:52:48 PM

Title: Help with links
Post by: technodragon73 on January 21, 2006, 11:52:48 PM
I know this should be for the SMF forum...but I have not yet received any reply, and seeing as how the good people of this forum are quick to help I thought I would try asking here.

My problem is that when anyone clicks a link in the forum it opens in the same page.  How or what setting needs to be changed in order for links in the forum to open in a new window?
Title: Re: Help with links
Post by: IchBin on January 21, 2006, 11:58:25 PM
Add this to any of your links. target="_blank"
So for instance open the index.template.php file of the default theme. (mine is RC2)
Look for this code at the bottom:

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';



Change it too this:

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '" target="_blank">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
Title: Re: Help with links
Post by: technodragon73 on January 22, 2006, 01:00:49 AM
no, what i mean is if your read a post in the forum...the link in the post opens in the same window rather than opening a new window
Title: Re: Help with links
Post by: IchBin on January 22, 2006, 03:03:54 AM
I'm not sure if this is built in or not. I think this was added into the SMF 1.1 ....?? I'm not sure.
Title: Re: Help with links
Post by: technodragon73 on January 22, 2006, 03:39:32 AM
It is actually very frustrating...i can understand links that refer to other pages within the forum, but external links just end up taking members out of the site.