TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 247
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 168
  • Total: 168

Help with links

Started by technodragon73, January 21, 2006, 11:52:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

technodragon73

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?

IchBin

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>' : '';

technodragon73

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

IchBin

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.

technodragon73

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.