Author: digioz
Modification Description: Open External URL in a New Window
Modification Version: 1.0.0
Requirements: None
Supported PHPBB Versions: 3.0.8, 3.0.9, 3.0.10
Download: link_mod_1.0.0.zip
Source Code: DigiOz Github phpbb-mods
Demo: Demo Forum
Description: I was looking for this feature and the existing mods related to this subject all involved making changes to the actual database records, and I didn't want to do that. So this is an alternate way to open all external links using jQuery library
Update:
7/28/11 - Added ModX Installer Download Link for installing through AutoMod.
- Open the file "./styles/prosilver/template/overall_header.html (repeat for all other styles).
- Add the following code to the header region of the template (~line 92)
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>
Pete