A free, open source, PHP-based simple discussion forum. It favours removing barriers to conversation rather than massaging egos. Download Here: https://github.com/Kroc/NoNonsenseForum/archive/master.zip
Did some playing around with the link parsing after the discussion about opening links in a new window. Currently every link is given the nofollow status. I propose we only give this to external links, and make use of this difference to add external to the rel.
The following code is pretty much my quick-and-dirty fix. Milage may vary. Just putting it in here to illustrate my point. Starts at line 339 of functions.php of the current development branch.
)) $text = substr_replace ($text, $replace =
'<a href="'.($p=(@$m[2][0] ? 'mailto:'.$m[2][0] //is this an e-mail address?
: ($m[1][0] ? $m[1][0] : 'http://'))) //has a protocol been given?
//rest of the URL [domain . slash . everything-else]
//(encode double-quotes without double-encoding existing ampersands; this is the PHP5.2.3 requirement)
.htmlspecialchars ($m[3][0].@$m[4][0].@$m[5][0], ENT_COMPAT, 'UTF-8', false).'"'
.($p.$m[3][0]!==FORUM_URL?' rel="nofollow external"':'').'>'
.$m[0][0].'</a>',
//where to substitute
$m[0][1], strlen ($m[0][0])
);
This means the CSS for themes can now target outgoing links with a[rel~="external"]. And JS can target these to open them in a new window/tab.
Was indeed thinking of this, but thanks very much for going ahead and taking the initiative. I have no objection to the change so will integrate it at the next opportunity.
Did some playing around with the link parsing after the discussion about opening links in a new window. Currently every link is given the
nofollow
status. I propose we only give this to external links, and make use of this difference to addexternal
to therel
.The following code is pretty much my quick-and-dirty fix. Milage may vary. Just putting it in here to illustrate my point. Starts at line 339 of functions.php of the current development branch.
This means the CSS for themes can now target outgoing links with
a[rel~="external"]
. And JS can target these to open them in a new window/tab.