Making Link Forum Links Open in New Windows
Description: This article describes how to make phpBB Link forum links open in new windows (or tabs).
In Categories: Miscellanea
- Link to this article: Select All
[url=https://www.phpbb.com/support/docs/en/3.0/kb/article/making-link-forum-links-open-in-new-windows/]Knowledge Base - Making Link Forum Links Open in New Windows[/url]
ProSilver
To fix this in ProSilver, open \styles\prosilver\template\forumlist_body.html and find the following code (at line #33 in phpBB 3.0.8):
Code: Select all
<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
and replace it with the following code:
Code: Select all
<!-- SHM Force Link forum links to open in new window/tab -->
<a href="{forumrow.U_VIEWFORUM}" class="forumtitle" <!-- IF forumrow.S_IS_LINK -->target="_blank"<!-- ENDIF -->>{forumrow.FORUM_NAME}</a><br />
SubSilver2
To fix this in SubSilver2, open \styles\subsilver2\template\forumlist_body.html and find the first instance of the following code (at line #24 in phpBB 3.0.8):
Code: Select all
<a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a>
and replace it with the following code:
Code: Select all
<!-- SHM Force Link forum links to open in new window/tab -->
<a class="forumlink" href="{forumrow.U_VIEWFORUM}" target="_blank">{forumrow.FORUM_NAME}</a>
Finishing Up
Save the files, upload them to your server and refresh your templates. That's all there is to it.
This fix works with normal links, counted links and even links with forum passwords.