Redirect forum new window

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Scam Warning
Locked
User avatar
optimusvault
Registered User
Posts: 108
Joined: Tue Jul 28, 2015 2:51 am
Name: Aaron

Redirect forum new window

Post by optimusvault »

Hi

What is the code to apply to forumlist_body.html that allows for redirection forums to open in a new window?
Cheers,
Aaron

User avatar
Sniper_E
Registered User
Posts: 807
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: Redirect forum new window

Post by Sniper_E »

The link in the forumlist_body.html

Code: Select all

<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
To open in a new tab I would use...

Code: Select all

<a href="{forumrow.U_VIEWFORUM}" onclick="window.open(this.href); return false;" class="forumtitle">{forumrow.FORUM_NAME}</a>
I think your question should have been posted in the support forum.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
optimusvault
Registered User
Posts: 108
Joined: Tue Jul 28, 2015 2:51 am
Name: Aaron

Re: Redirect forum new window

Post by optimusvault »

That makes ALL forums open in a new window.
I only want redirection/link forums to.

And I feel this is better in style support as it is a style edit.
Cheers,
Aaron

User avatar
Sniper_E
Registered User
Posts: 807
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: Redirect forum new window

Post by Sniper_E »

Sorry optimusvault I could have sworn this topic was in the [3.1.x] Styles in Development
It is in the correct [3.1.x] Styles Support & Discussion now. I must have read that wrong.

I misread you question also. Sorry there too...
I thought you wanted to redirect the forum link into a new window.

You want the redirect links to open in a new window.

Open forumlist_body.html - Find

Code: Select all

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

Code: Select all

						<!-- IF forumrow.CLICKS -->
						<a href="{forumrow.U_VIEWFORUM}" onclick="window.open(this.href); return false;" class="forumtitle">{forumrow.FORUM_NAME}</a>
						<!-- ELSE -->
						<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
						<!-- ENDIF -->
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
Sniper_E
Registered User
Posts: 807
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: Redirect forum new window

Post by Sniper_E »

optimusvault wrote:That code worked perfect Sniper_E.

Thank you!
:lol: I bet you supporters here get a lot of that around here. No response.

You're welcome optimusvault... I'm glad you got it working.?.?.?
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
optimusvault
Registered User
Posts: 108
Joined: Tue Jul 28, 2015 2:51 am
Name: Aaron

Re: Redirect forum new window

Post by optimusvault »

Oops sorry. Just got time to check this topic.
Thanks!
Cheers,
Aaron

Locked

Return to “[3.1.x] Styles Support & Discussion”