Links in New Window
In phpBB 3 proSilver style all links open in same window. It might be frustrating for visitors, especially not computer savvy ones. This tutorial explains how to change links to open in new window.
1. Forums with type=link
In styles/prosilver/template/forumlist_body.html find this:Code:
- <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">
and replace with this:
Code:
- <a href="{forumrow.U_VIEWFORUM}" class="forumtitle"<!-- IF forumrow.S_IS_LINK --> target="_blank"<!-- ENDIF -->>
2. Links inside posts
In styles/prosilver/template/bbcode.html find this:Code:
- <!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
and replace with this:
Code:
- <!-- BEGIN url --><a href="{URL}" class="postlink" target="_blank">{DESCRIPTION}</a><!-- END url -->
Then open includes/functions.php, find this (around line 2704):
Code:
- $html = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";
and replace with this:
Code:
- $html = "$whitespace<!-- $tag --><a$class href=\"$url\" target=\"_blank\">$text</a><!-- $tag -->$append";