We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
[CODE]Switch it; switch it!; By Dark Aura
Topic Started: Jan 25 2010, 10:56 AM (131 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: Dark Aura
[CODE
 
Switch it; switch it!]Switch it:
this code will allow you to switch words you dont like such as Guests to Visitors or Warn to Reputation:

Preview
:
Board Wrappers -> Footers
Quote:
 


<script type="text/javascript">
<!--

function switchIt(item, item2){
if(!location.href.match(/=headersfooters2/i)){
if(document.createTreeWalker && typeof Node != "undefined"){
Node.prototype.switchTxt = function(r, rp){
function testNode(node){
if(node.data.match(new RegExp(r, "ig"))){
return NodeFilter.FILTER_ACCEPT;
} else {
return NodeFilter.FILTER_SKIP;
}
}
var nTree = this.ownerDocument.createTreeWalker(this, NodeFilter.SHOW_TEXT, testNode, false);
while(nTree.nextNode()){
nTree.currentNode.data = nTree.currentNode.data.replace(new RegExp(r, "gi"), rp);
}
}
document.body.switchTxt(item, item2);
} else if(typeof document.body.createTextRange != "undefined"){
var range = document.body.createTextRange();
range.collapse(true);
while(range.findText(item)){
range.text = item2;
range.collapse(false);
}
}
}
}

switchIt("WORD YOU WANT SWITCHED", "NEW WORD");

//-->
</script>


if you want to add more than one just add this as many times as needed:

Code:
 

switchIt("[COLOR=orange]WORD YOU WANT SWITCHED[/color]", "[COLOR=orange]NEW WORD[/color]");



invented by Proboards

edit whats in red to the word you want switched


Enjoy :yes:
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply