Revision [12269]

This is an old revision of OpenExternalInNewWindow made by JasonHuebel on 2005-12-14 19:17:57.

 


This simple code modification will open all external links in a new window or tab, depending on your browser's configuration. This modification is useful to prevent users from navigating away from the wiki when they click an external link. External links are defined as any link that leaves the Wiki (even if they are on the same server).

Locate this line in wikka.php, somewhere around line 662:

        return $url ? "<a class=\"ext\" href=\"$url\">$text</a>$external_link_tail" : $text;


and change it to this:

        return $url ? "<a class=\"ext\" href=\"$url\" target=\"_new\">$text</a>$external_link_tail" : $text;


That's all there is to it. --JasonHuebel


CategoryUserContributions
There are 4 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki