You are very welcome.JoelWong wrote:Holy cow! I have been searching for this for AGES! Thanks!!!
I have also submitted this mod to the Mod Database here, pending Validation:
http://www.phpbb.com/customise/db/mod/o ... ew_window/
You are very welcome.JoelWong wrote:Holy cow! I have been searching for this for AGES! Thanks!!!
The current version opens all links in a new window if they have an external URL. This includes pages, images, videos, and anything else that has an external URL.donna03281 wrote:This is what I'm looking for in connection with the links I use to reference other sites, however, how does this work for videos (i.e., youtube) that I've included in a post. Will those, too, open in a new window? Is there anyway to make to make a choice of whether or not to open in a new window? I have made some html based pages for my phpbb site, some of which I would want to open in new windows and some not, so I was hoping to be able to have either option. Is this possible? Was hoping to get the full picture before initiating the mod.
I use AutoMod. But for this Mod i tried to do it manually.digioz wrote:Are you trying to install manually or using ModX?
Code: Select all
<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
Code: Select all
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
Code: Select all
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
</script>