Jälleen kerran linkin avaamisen jälkeen suljin välilehden ja sinne hävis foorumi. Joten...
Tuolta löytyy mod joka sallii linkkien avautumisen uuteen ikkunaan
http://www.phpbb.com/community/viewtopi ... rime+links
tuolla on lisää ohjeita
http://www.phpbb.com/community/viewtopi ... &p=3366764
Tuossa on ohje laittaa head-osioon seuraava
For those times, this is what you should use...
Please this between your <head></head> tags.
Code: Select all
<script language="Javascript" type="text/javascript">
<!--
window.onload = function()
{
var links = document.links;
var length = links.length;
for (var i = 0; i < length; i++)
{
elink = document.links
;
if (elink.host != location.host)
{
elink.className= 'external';
elink.target= '_blank';
}
}
}
//-->
</script>
______________________________________________________
Ja tuossa lisää
Re: Submit links in topics
by Kjell on 30 Apr 2007, 23:01
Getting posted links to open in a new window (RC5)
These changes will make all url's created using the [url] bbcode to open in a new window and any plain text links after the change open in a new window. Any plain text links made before the second change will not open in a new window.
open styles/subsilver/templates/bbcode.html
Find:
Code: Select all
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
Replace with:
Code: Select all
<!-- BEGIN url --><a href="{URL}" class="postlink" target="_blank">{DESCRIPTION}</a><!-- END url -->
Open includes/functions.php
Find:
Code: Select all
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match[] = '#(^|[\n\t (])(' . get_preg_expression('url_inline') . ')#ie';
$magic_url_replace[] = "'\$1<!-- m --><a href=\"\$2\">' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . '</a><!-- m -->'";
Replace With:
Code: Select all
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match[] = '#(^|[\n\t (])(' . get_preg_expression('url_inline') . ')#ie';
$magic_url_replace[] = "'\$1<!-- m --><a target=\"_blank\" href=\"\$2\">' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . '</a><!-- m -->'";
Find:
Code: Select all
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match[] = '#(^|[\n\t (])(' . get_preg_expression('www_url_inline') . ')#ie';
$magic_url_replace[] = "'\$1<!-- w --><a href=\"http://\$2\">' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . '</a><!-- w -->'";
Replace With:
Code: Select all
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match[] = '#(^|[\n\t (])(' . get_preg_expression('www_url_inline') . ')#ie';
$magic_url_replace[] = "'\$1<!-- w --><a target=\"_blank\" href=\"http://\$2\">' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . '</a><!-- w -->'";
Netti on väärällään ohjeita miten tuo epäkohta korjataan. Saisiko korjauksen mahdollisesti pian. Jos ylläpitäjä ei ehdi niin saisinko tunnarit niin teen muutoksen itse.