ElkArte Community

Project Support => Support => Topic started by: Burke Knight on December 26, 2015, 12:43:13 pm

Title: Redirect Boards to New Tab
Post by: Burke Knight on December 26, 2015, 12:43:13 pm
I'd like to know, about making it so check mark a box in modify board, to have a redirect board open in new tab.
I know I am posting this in Support board, but was not too sure many people would care for this feature, so maybe move it there, if think it's better there, or in addon request board. I leave that up to the forum staff. ;)

Personally, I prefer not to send people completely away from my site, so having boards that redirect to other sites, even if my own, open in the tab the site is, takes them away from the site. I'd really prefer to have the redirect boards open in a new tab.
Title: Re: Redirect Boards to New Tab
Post by: emanuele on December 26, 2015, 04:20:39 pm
Not quite the same thing, but worth mention: http://www.elkarte.net/community/index.php?topic=2258.0

And to set a target="_whateveritis" for redirecting boards, the place if GenericBoards.template.php, let's say, this:
Code: [Select]
<a href="', $board['href'], '" id="b', $board['id'], '">', $board['name'], '</a>';
should become something like:
Code: [Select]
<a', $board['is_redirect'] ? ' target="_blank"' : '', ' href="', $board['href'], '" id="b', $board['id'], '">', $board['name'], '</a>';
Title: Re: Redirect Boards to New Tab
Post by: Burke Knight on December 26, 2015, 05:17:37 pm
Worked like a charm. Thank you! :)