Forum Type "Link" open new Window

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
Thunder86
Registered User
Posts: 106
Joined: Fri Apr 07, 2023 6:21 am

Forum Type "Link" open new Window

Post by Thunder86 »

Hello,

I have checked the search but haven´t found a solution which works for me. I will Use the forum Type "Link" to bring people to my Listening Page. Because it's not an external link, the extension which is available unfortunately doesn't work for me.

How can I change the Code da the Links will show up in a new Tab like

Code: Select all

target="_blank"
?
Last edited by Mick on Sun Mar 24, 2024 1:46 pm, edited 1 time in total.
Reason: Solved.
User avatar
cabot
Registered User
Posts: 791
Joined: Sat Jan 07, 2012 4:16 pm

Re: Forum Type "Link" open new Window

Post by cabot »

Hello,

Open forumlist_body.html
Find:

Code: Select all

<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
Replace with:

Code: Select all

<a href="{forumrow.U_VIEWFORUM}" class="forumtitle"{% if forumrow.S_IS_LINK %} target="_blank"{% endif %}>{forumrow.FORUM_NAME}</a>
User avatar
Thunder86
Registered User
Posts: 106
Joined: Fri Apr 07, 2023 6:21 am

Re: Forum Type "Link" open new Window

Post by Thunder86 »

Problem Solved! Thanks!

Return to “phpBB Custom Coding”