Jump to content

off site links v/s on site links

Guest bikertrash

Recommended Posts

I'd like to see IPB with the option of opening off site links within posts in a new browser window and on site links opening in the same window and or frame for IPB version 2.0.3

I found this:

<script language="JavaScript1.2">

//Open offsite links in new window option- By Jessica Hammer
//Heavily modified by Dynamic Drive
//Visit h**p://www.dynamicdrive.com for this script

//1)Enter domains to be EXCLUDED from opening in new window:
var excludedomains=["american-n-proud.com"]

//2)Automatically open offsite links in new window? (1=yes, 0 will render a checkbox for manual selection)
var auto=1

var excludedomains=excludedomains.join("|")
rexcludedomains=new RegExp(excludedomains, "i")

if (!auto)
document.write('<form name="targetmain"><input type="checkbox" name="targetnew" checked onClick="dynamiclink()">Open off-site links in new window</form>')

function dynamiclink(){

if (auto||(!auto&&document.targetmain.targetnew.checked)){
for (i=0; i<=(document.links.length-1); i++) {
if (document.links.hostname.search(rexcludedomains)==-1&&document.links.href.indexOf("http:")!=-1)
for (i=0; i<=(document.links.length-1); i++) {
if (document.links.hostname.indexOf(mydomain)==-1)

if (auto)

// -->

But it screws with the "Card" & "Delete" buttons.

How about it? Can you help me?

Email me if you have a solution/mod/fix. Anything!


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...