Page 1 of 1

Links Block in new window

Posted: 7. May 2008 02:49
by el_Vindicador
My renquest its easy,...

Some mod to open the links (of Links Blck) in a new window??

thank!!

pd: i just installed the rc1 version....its awesome!!! very happy for the election of this portal!

Re: Links Block in new window

Posted: 10. May 2008 09:21
by el_Vindicador
if someone need it

in template/portal/blocks/links.html

search

Code: Select all

<li><a href="{link.URL}" title="{link.TEXT}>{link.TEXT}</a></li>
and replace with

Code: Select all

<li><a href="{link.URL}" title="{link.TEXT}" target="_blank">{link.TEXT}</a></li>
:D

Re: Links Block in new window

Posted: 10. May 2008 10:12
by thomas.d
el_Vindicador wrote:if someone need it

in template/portal/blocks/links.html

search

Code: Select all

<li><a href="{link.URL}" title="{link.TEXT}>{link.TEXT}</a></li>
and replace with

Code: Select all

<li><a href="{link.URL}" title="{link.TEXT}" target="_blank">{link.TEXT}</a></li>
:D
Hola,

thanks for your suggestion.

But keep in mind that "Target" is not allowed in XHTML 1.0 Strict what the portal is based on!

Better (and still XHTML 1.0 Strict) is

Code: Select all

onclick="window.open(this.href); return false;"

what makes the same but does only work with JavaScript activated.

(viewtopic.php?p=737#p737)

Re: Links Block in new window

Posted: 10. May 2008 12:17
by JirkaX
So in your opinion replacement should be

Code: Select all

<li><a href="{link.URL}" title="{link.TEXT}" onclick="window.open(this.href); return false;">{link.TEXT}</a></li>
yes?

Re: Links Block in new window

Posted: 10. May 2008 12:48
by Ice
That's correct. :)

Re: Links Block in new window

Posted: 10. May 2008 19:04
by JirkaX
works fine, thanks

Re: Links Block in new window

Posted: 11. May 2008 08:22
by el_Vindicador
hola!!

i moded...like my post...and works perfect!!

its wrong?

Re: Links Block in new window

Posted: 11. May 2008 14:48
by thomas.d
el_Vindicador wrote:hola!!

i moded...like my post...and works perfect!!

its wrong?
Hi el_Vindicador,

it's not a question of right or wrong and sure your modding works.

The phpBB-Forum is written in compliance with the XHTML 1.0 Strict standard and so is the portal.

In this standard "Target" is not allowed as the user shall decide wether he opens a new window with a click a link.

The workaround with the JavaScript is according to the standard and it does what you intended.

So it would be better to use the Java instead of the "Target".