Help - Search - Members - Calendar
Full Version: Comment Author URLs in Same Window?
Movable Type Community Forum > Additional Resources > Tips and Tricks
JoshuaKaufman
Is there a way to keep comment author URLs from launching new windows?  I thought I saw this discussed before but I couldn't find it.  Thank you.
girlie
Edit line 1006 in lib/MT/Template/Context.pm:

CODE
return sprintf qq(<a target="_blank" href="%s">%s</a>), $url, $name;
JoshuaKaufman
Update for 2.6.  Edit lines 835 and 839 in lib/MT/Template/Context.pm.
JoshuaKaufman
How is this done in MT 3.0D?

Thanks.
shelley
Lines 1436-1443 in lib/MT/Template/Context.pm:

CODE
    $url =~ s/>/>/g;
    if ($c->id && !$args->{no_redirect}) {
    return sprintf(qq(<a target="_blank" title="%s" href="%s%s?__mode=red;id=%d">%s</a>),
     $url, $cgi_path, $comment_script, $c->id, $name);
    } else {
    # In the case of preview, show URL directly without a redirect
    return sprintf(qq(<a target="_blank" title="%s" href="%s">%s</a>),
     $url, $url, $name);
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.