News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Redirect Boards to New Tab by BurkeKnight Enterprises

Started by Burke ♞ Knight, December 16, 2013, 12:13:01 PM

Previous topic - Next topic

Burke ♞ Knight

Redirect Boards to New Tab by BurkeKnight Enterprises - Link to Mod

Version: 1.1
Compatibility: 2.0

Made by: BurkeKnight - BurkeKnight Enterprises

This modification makes it so when people click a board that redirects, it will open in a new tab/window.
Originally posted in a topic reply by Arantor: How to have redirect boards open in a new tab or window?

Will also work when click the redirect icon, thanks to: Freñçh

Support:
If need support for this mod, please go to BurkeKnight Enterprises and register there.

We have a support ticket system for mod support.

We will no longer be supporting this mod here at the SMF site,
as we feel it is easier to keep all support at our site.





To all users of my mods and themes. I am happy that you have chosen my work to add to your site.
I now have a support ticket system for support of my mods and themes. It is located at:

http://www.burkeknight.com/index.php?action=helpdesk

You have to be registered at my site, to use the support system.
There are 3 departments in the system as of now:

SMF 2.0.x Mod Support
SMF 2.0.x Theme Support
Web Site Templates Support

I would prefer to handle all support for my mods and themes, including any BK-SMF and BK Modding mods and themes there, as I can do that more efficiently. But, I will, of course, still monitor the support topics, here, as well.
This will make things easier for me and the users of my mods and themes, as most of my updates and changes are put on my main site, first.

Thank you, and I apologize for any inconvenience this may cause.

Burke Knight

BurkeKnight Enterprises
Formerly BK Modding and BK-SMF

MicroGuy

Thank you for making this mod. I have installed it and it's working.  :D  ;D  :D

A couple of things I notice is that when the board is a child board and you click the board it does not open in a new window. Also if you click on the board's icon the link does not open in a new window.

There is a discussion of the icon problem here: http://www.simplemachines.org/community/index.php?topic=495322.msg3473628#msg3473628

Maybe you could update the mod to take care of these two problems?

Thanks again.

MaccabeeY

#2
Nice mod.

I added a change so redirect child boards that are listed as a link in the BoardIndex under "Child Boards: ..." also open in new window/tab.  You may want to add that to your mod too.
ED


$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

TO

$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '" target="_blank">' . $child['name'] . '</a>';

French

Quote from: MicroGuyAlso if you click on the board's icon the link does not open in a new window.

Find & Replace in BoardIndex.template.php and in MessageIndex.template.php
Code (Find) Select

<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';

Code (Replace) Select

<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '"', $board['is_redirect'] ? ' target="_blank"' : '', '>';

Burke ♞ Knight

Thanks guys.

I'll try to update the mod in a couple days.
Right now, I'm a bit laid up with a bad arm.
So trying to take it easy for a couple of days, until the sprain heals.

But good catches, and ones I will implement to the mod. :)

aprilrobertson

Thanks this will help me retain new potential members :)

Burke ♞ Knight

#6
If need support for this mod, please go to BurkeKnight Enterprises and register there.

We have a support ticket system for mod support.

We will no longer be supporting this mod here at the SMF site,
as we feel it is easier to keep all support at our site.

Advertisement: