Display External URL in New Window or Popup

mcnesco

Joined: 2009-08-09
Posts: 14
Posted: Sat, 2009-10-10 00:19

I have followed all of the threads that discuss the opening of new windows for links. (external URLs)

I found one reference to modification of modifier.markup.php in lib\smarty_plugins as follows:

Non-modified:

/* Output of HTML. */
/* The code is like http://.../ */
if (!isset($attributes['default'])) {
return '<a href="' . $content . '" rel="nofollow">' . $content . '</a>';
} else {
/* The code is like Text */
return '<a href="' . $attributes['default'] . '" rel="nofollow">'
. $content . '</a>';

Modified:

/* Output of HTML. */
/* The code is like http://.../ */
if (!isset($attributes['default'])) {
return '<a href="' . $content . '" target="_blank" rel="nofollow">' . $content . '</a>';
} else {
/* The code is like Text */
return '<a href="' . $attributes['default'] . '" target="_blank" rel="nofollow">'
. $content . '</a>';

The change being the addition of target="_blank" before rel="nofollow" in two places.

I've made this modification, and my external links continue to open in the existing window. Can anyone tell me what I'm doing wrong?

Gallery URL = http://www.scott-mcneil.com/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.3.11 cgi-fcgi
Webserver = Apache
Database = mysql 5.0.67.d7-ourdelta-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Gd, ImageMagick, jpegtran, Ffmpeg, LinkItemToolkit, Thumbnail
Acceleration = partial/3600, partial/3600
Operating system = Linux linhost288.prod.mesa1.secureserver.net 2.4.21-53.ELsmp #1 SMP Wed Nov 14 03:54:12 EST 2007 i686
Default theme = hybrid
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Rows in GalleryAccessMap table = 23
Rows in GalleryAccessSubscriberMap table = 9486
Rows in GalleryUser table = 10
Rows in GalleryItem table = 9482
Rows in GalleryAlbumItem table = 153
Rows in GalleryCacheMap table = 18