1 b_rad Mar 26, 2005 16:34
3 b_rad Mar 26, 2005 17:32
THANX WHOO! Exactly what I needed was found in that post :D !
In the /b2evocore/_class_item.php
if( $add_link && (!empty($this->url)) )
{
$title = '<a href="'.$this->url.'" target="_blank" title="link opens new window">'.$title.'</a>';
}
Thanx again, Brad
4 village_idiot Mar 26, 2005 17:44
youre welcome :) that was easy!
5 b_rad Mar 26, 2005 18:53
Here is the next dilemma...
the user hard codes a link like http://www.theirsite.com within the body of the post... and that link opens in the parent window. (not on this board, though, links open in new window)
Where is java script that ties to the 'Link' button when adding/editing the body of a post?
found a post: http://forums.b2evolution.net/viewtopic.php?t=1744
[from post]
Or, you can use this method, which is a little more complicated, and just as valid, but complies more with the "spirit" of the w3c's recommendation, since the "rel=external" tells us some semantic relevance about the link. Of course, you might not want to have all external links open in separate windows.
1. Put 'rel="external"' in the A element.
2. Put this function in the HEAD section of the page:
<script type="text/javascript">
function externalLinks()
{
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++)
{
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
</script>
If I knew where to put this snippet I could test, but don't know what file/where the REL and Javascript go? (b2edit.php, _formatting.php?)
nope thats "configurable" anywhere. its takes a file edit
there are a few posts talking about this, not related specifically to comments but still good reading
http://forums.b2evolution.net/viewtopic.php?t=776&highlight=comments+target+blank
if you are determined to open comment links that way, I can provide the changes or someone else will wander over here after me and do it. It can be done, obviously, just not done with a toggle on/off switch