View Full Version: Post links open in same window

Big Boards > IF Administration & Moderation > Post links open in same window



Title: Post links open in same window
Description: 3 methods


HelenaZF - July 30, 2006 04:19 AM (GMT)
Issue: How to make a post link open in the same window:

Method 1:
Enable HTML for each member group.

To enable the [doHTML] tags, go to:
ACP > Users & Groups > Manage User Groups > Edit Group > Posting Permissions >
"Can use [doHTML] tag?" YES

CODE
[doHTML]<a href="TARGET URL" target="_self">LINK TEXT NAME HERE</a>[/doHTML]



Method 2: Install this code from IceMetalPunk: http://support.invisionfree.com/index.php?showtopic=276737

ACP > Skinning & Styles > Board Wrappers > Footers
CODE
<script>
tds=document.getElementsByTagName("td");
for (p=0; p<tds.length; p++) {
if (tds[p].className.match(/post[0-4]/i)!=null) {
tds[p].innerHTML=tds[p].innerHTML.replace(/\[url_self(?:=(.*?))?\](.*?)\[\/url_self\]/ig,"<a href='$1' target='_self'>$2</a>");
}
}
</script>

Use this BB code for the links you want affected:
CODE
[url_self=LINK]link text name [/url_self]

(Put the URL address where it says "LINK" in the above code.)


Method 3: To make all post links open in the same window, use this code:

ACP > Skinning & Styles > Board Wrappers > Footers
CODE
<script>
tds=document.getElementsByTagName("td");
for (p=0; p<tds.length; p++) {
if (tds[p].className.match(/post[0-4]/i)!=null) {
tds[p].innerHTML=tds[p].innerHTML.replace(/(<a .*?target=["'])(?:_blank|_new)(["'][^>]*>)/ig,"$1_self$2");
}
}
</script>




Hosted for free by InvisionFree