News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Links in posts

Started by MaXiMiUS, May 13, 2009, 05:07:52 PM

Previous topic - Next topic

MaXiMiUS

I'm trying to figure out how I can remove this: target="_blank" from links made in posts. I want to allow my users to choose whether or not they want a link to open in a new window. I'm not sure where to begin editing to change this, though. Any help would be appreciated.

Thanks in advance!

Kermit

in Sources/Subs.php

Code (find) Select

array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


Code (replace with) Select

array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

B

You could also just use the [iurl] tag. :)

B


Conquer Club - Free Global Domination Game
Think the board game Risk on steroids!

Advertisement: