Open Link Forum Types in New Tab

@halilesen · 15 Apr 2024 · 844 views
Post Reply
User avatar
halilesen
#1 ·
Posts: 57
Joined: 24 Mar 2024, 18:09
Full Name: Halil ESEN
Has liked: 12
Been liked: 9
There are three forum types in phpBB: category, forum and link. When you select Link, you can list a link of your choice on your phpBB board. However, you may want the links to open in a new tab. Here I will show you how to do that.

You need to edit a style file to open link forum types in new tab. Open /template/forumlist_body.html file of the style you are using and find below:

Code: Select all

<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
There may be slight variations in some styles, so search with class="forumtitle" if you can't find it.

Replace:

Code: Select all

<a href="{forumrow.U_VIEWFORUM}"{% if forumrow.S_IS_LINK %} target="_blank"{% endif %} class="forumtitle">{forumrow.FORUM_NAME}</a>
We added the {% if forumrow.S_IS_LINK %} target="_blank"{% endif %} code after the href="..", so that only when clicking on the forum titles of the Link type, we will ensure that the link opens in a new tab.

Save changes. That's it. The links now open in new tab.
Post Reply
  • Similar Topics