bbcode URL in new window (General)

by jacky, Saturday, August 13, 2011, 20:54 (4661 days ago)

i use mlf 2.2.8,how can i made that?

bbcode URL in new window

by arye, Saturday, August 13, 2011, 23:55 (4660 days ago) @ jacky

open: includes/functions.inc.php

find:

    // the code has been eneterd like this: [url]http://.../[/url]
    if(!isset ($attributes['default'])) return '<a href="'.htmlspecialchars($content).'">'.htmlspecialchars(shorten_url($content)).'</a>';
    // the code has been eneterd like this: [url=http://.../]Text[/url]
    return '<a href="'.htmlspecialchars ($attributes['default']).'">'.$content.'</a>';


replace with:

    // the code has been eneterd like this: [url]http://.../[/url]
    if(!isset ($attributes['default'])) return '<a href="'.htmlspecialchars($content).'" target="_blank">'.htmlspecialchars(shorten_url($content)).'</a>';
    // the code has been eneterd like this: [url=http://.../]Text[/url]
    return '<a href="'.htmlspecialchars ($attributes['default']).'" target="_blank">'.$content.'</a>';


It's only in bbcode "link"
As you wanted.

bbcode URL in new window

by jacky, Sunday, August 14, 2011, 13:16 (4660 days ago) @ arye

yes i got it.
very thanks for your help!arye!

Avatar

bbcode URL in new window

by Auge ⌂, Sunday, August 14, 2011, 14:02 (4660 days ago) @ arye

Hello

open: includes/functions.inc.php

find:

replace with:

    // the code has been eneterd like this: [url]http://.../[/url]
if(!isset ($attributes['default'])) return '<a href="'.htmlspecialchars($content).'" target="_blank">'.htmlspecialchars(shorten_url($content)).'</a>';
// the code has been eneterd like this: [url=http://.../]Text[/url]
return '<a href="'.htmlspecialchars ($attributes['default']).'" target="_blank">'.$content.'</a>';


It's only in bbcode "link"
As you wanted.

If you provide that solution don't forget to remember the needed change of the documents doctype.

--
Trenne niemals Müll, denn er hat nur eine Silbe!

RSS Feed of thread