Address to redirect users to: Question

Started by Arebias, March 15, 2009, 02:41:34 AM

Previous topic - Next topic

Arebias



When creating a new board and using the option of Address to redirect users to: I can't seem to figure out how to force the link to create in new tab or window.

Any help would be appreciated.


cme1st2302

How is the info added?  Is it coded in or is it just typing in an address in a input field?

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Arebias

Just typed in the address.

http://www.example001.com

I messed around trying to use BB code but no luck.

karlbenson

You can't choose the target window.  The field will only accept a url.

You can alter the default behavior for redirect boards quite easily.

Themes/default/BoardIndex.template.php
FIND
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
REPLACE
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '"'. ($board['is_redirect']? ' target="_blank"': '') .'>';

AND

FIND
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

REPLACE
<h4><a href="', $board['href'], '" name="b', $board['id'], '"'. ($board['is_redirect']? ' target="_blank"': '') .'>', $board['name'], '</a>';

Themes/default/MessageIndex.template.php
FIND
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';

REPLACE
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '"'. ($board['is_redirect']? ' target="_blank"': '') .'>';

AND

FIND
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

REPLACE
<h4><a href="', $board['href'], '" name="b', $board['id'], '"'. ($board['is_redirect']? ' target="_blank"': '') .'>', $board['name'], '</a>';

Arebias


I thank you for that. That is what I was hoping for was that someone could come in here and tell me where and how. You did just that. I will probably do that tomorrow. Will make sure and post my results.

Thanks again.

Arebias



Well that did not work very well. I found the references fine and replaced as directed. Then it could not load the page.

Maybe you could take a second look at the code you provided and check for errors.


Arebias


I will try to bump this up a bit.

Quote from: Arebias on March 15, 2009, 02:41:34 AM


When creating a new board and using the option of Address to redirect users to: I can't seem to figure out how to force the link to create in new tab or window.

Any help would be appreciated. Version 2.0 RC-1



darksideHELL

Quote from: regularexpression on March 15, 2009, 03:00:35 AM
You can alter the default behavior for redirect boards quite easily.

Big Thx for this tut, worked well.

Arebias



I went back and looked at what I had, or had not, done correctly. It was, of-course, on my end and now it works great.

Thanks you for that fix.

Marked Solved

Advertisement: