ElkArte Community

Project Support => Support => Topic started by: Robert on August 15, 2018, 04:04:24 am

Title: Redirect URL in forum?
Post by: Robert on August 15, 2018, 04:04:24 am
My other forum has the option to create Redirect URL:

https://imgur.com/a/CyPD068

Does elkarte it?
Thanks.
Title: Re: Redirect URL in forum?
Post by: radu81 on August 15, 2018, 04:18:09 am
Hi and welcome to elkarte!
Yes, Elkarte has this option too. Go to Admin > Forum > Boards > Modify Boards > Create new board
When you create a new board you need to select the option Redirect to a web address:
You can also do it on an existing board, but the board needs to be empty.
Title: Re: Redirect URL in forum?
Post by: Mrs. Chaos on August 15, 2018, 05:01:20 am
Hi Robert!
The website then opens in the same window as the forum. If all extern websites are to be opened in new windows, then you have to do this in the GenericBoards.template.php:

Search:
Code: [Select]
<a href="', $board['href'], '" id="b', $board['id'], '">', $board['name'], '</a>';

Replace with:
Code: [Select]
<a', $board['is_redirect'] ? ' target="_blank"' : '', ' href="', $board['href'], '" id="b', $board['id'], '">', $board['name'], '</a>';
Title: Re: Redirect URL in forum?
Post by: Robert on August 15, 2018, 10:06:31 pm
It works  :) .
Thanks.